Skip to content

Conversation

@leroycorentin
Copy link
Contributor

The main reason why I did these changes is that I use Helios to create geometries that I can spawn into simulations (with Gazebo). However the obj format used by default here is not fully compatible with Gazebo, so I made some adaptations. They can be useful for other use cases as they just add more information to the obj files. Note that existing client code does not need to be altered in any way because of these changes:

  • The normals of the surfaces can now be written to the .obj file.
  • The .mtl file is referenced in the .obj file with the file stem, not the full path. I can understand why you would prefer to keep the full path, and I can remove the corresponding commit from the PR if you wish. But I figured, since the mtl file is always created in the same folder as the obj file, and since they will probably stay together, the full path is not mandatory. The drawback of writing the full path is that once you move the files, the mtl reference will be invalid, so you will have to modify the obj file to update it, and the obj file may be very large depending on the geometry built in the Context so it might be an unpractical operation.
  • A small correction on the UserGuide.

Corentin LEROY added 3 commits February 19, 2025 10:09
…n obj file because the obj and mtl files will be in the same folder

This allows to move the files without having to edit the obj file (which can be very large) to correct the mtl file path.
@bnbailey-psl
Copy link
Contributor

Merged in v1.3.28. Thanks for your contribution. In the future I would also like to add the feature to the OBJ writer to write object groups based on the primitive data 'object_label' to maintain these groups when exported, similar to how it is done on OBJ read.

@leroycorentin leroycorentin deleted the obj-files-writing-improvements branch March 10, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants