Skip to content
Snippets Groups Projects

Obj textures

Merged Jan Möbius requested to merge obj_textures into master
5 files
+ 37
7
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 12
0
@@ -16,3 +16,15 @@ OpenMesh provides functions that read and write meshes from and to files:
om.write_mesh(trimesh, "bunny.ply")
OpenMesh currently supports five file types: .obj, .off, .ply, .stl and .om
For writing .obj files there is also support for textures. You can pass the path of a texture image and
optionally the suffix for the material file, default is ".mat", but some programs, e.g. Blender expect ".mtl" as suffix
.. code:: python
om.write_mesh(
"out.obj",
trimesh,
texture_file="moon.png",
material_file_extension=".mtl" # default is ".mat", blender needs ".mtl"
)
Loading