scene_synthesizer.exchange.export.export_obj
- scene_synthesizer.exchange.export.export_obj(scene, concatenate=True, **kwargs)
Export a scene as a Wavefront OBJ file.
This uses trimesh.exchange.obj.export_obj
- Parameters:
scene (scene_synthesizer.Scene) – Scene to be exported.
concatenate (bool, optional) – Whether to concatenate all meshes into a single one. Note, that currently trimesh can’t export textured scenes. Defaults to True.
**include_normals (bool) – Include vertex normals in export. If None will only be included if vertex normals are in cache.
**include_color (bool) – Include vertex color in export
**include_texture (bool) – Include vt texture in file text
**return_texture (bool) – If True, return a dict with texture files
**write_texture (bool) – If True and a writable resolver is passed write the referenced texture files with resolver
**resolver (None or trimesh.resolvers.Resolver) – Resolver which can write referenced text objects
**digits (int) – Number of digits to include for floating point
**mtl_name (None or str) – If passed, the file name of the MTL file.
**header (str or None) – Header string for top of file or None for no header.
- Returns:
OBJ format output dict: Contains texture files that need to be saved in the same directory as the exported mesh: {file name : bytes}
- Return type:
str