JBKacerovsky / objWriter

saves Wavefront .obj files from Matlab
8 stars 0 forks source link

.obj export functions for Matlab

saves Wavefront .obj files from matlab

Saves triangulated meshes (FV struct, such as the output from the built-in isosurface function) as .obj files, together with the corresponding .mtl files in the current working directory.

View Save Wavefront .OBJ files (simple or colour) on File Exchange

Examples for how these functions can be used and combined to save multiple different mesh objects (with different types of material/colour definitions) into a single obj file are shown in demo_obj.m The resulting .obj and .mtl files have been uploaded as examples to poly.google.com:

The functions objwrite* make unix-specific system calls to use grep. This works for MacOS and all unix based OS, but will not run in Ms or some other OS. For systems that do not have command line "grep" available please use the functions starting with SYS in the folder systemIndependentFunnctions which use: us (2020). grep: a pedestrian, very fast grep utility (fileexchange/9647-grep-a-pedestrian-very-fast-grep-utility), MATLAB Central File Exchange. Retrieved June 12, 2020. These should work on all systems. Syntax and usage is identical to obj_write