Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert triangle mesh model to tmesh map #6758

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Convert triangle mesh model to tmesh map #6758

merged 2 commits into from
Apr 18, 2024

Conversation

ssheorey
Copy link
Member

@ssheorey ssheorey commented Apr 18, 2024

  • ToString() for Material and string represtion in Python.
  • MaterialRecord to Material conversion - allows converting triangle mesh models to a map of tmeshes, including materials. Limitation: Only one material per tmesh.
  • Support for emissive color reading in FileASSIMP (model) and writing for tmesh (tio FIleASSIMP)

Test with:

flight_helmet = o3d.data.FlightHelmetModel()
model = o3d.io.read_triangle_model(flight_helmet.path)
mesh_dict = o3d.t.geometry.TriangleMesh.from_triangle_mesh_model(model)
print(mesh_dict)
o3d.visualization.draw(list({"name": name, "geometry": tmesh} for
    (name, tmesh) in mesh_dict.items()))

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Emissive color is only partially supported. This PR adds complete support.
Currently, there is no way to store materials read from a gltf file (through read_triangle_model()) with a tmesh.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

ToString for Material
MaterialRecord to Material conversion
Support for emissive color reading in FileASSIMP
 (model) and writing for tmesh (tio FIleASSIMP)
Copy link

update-docs bot commented Apr 18, 2024

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@ssheorey ssheorey requested a review from errissa April 18, 2024 00:30
@ssheorey
Copy link
Member Author

Tested works by user. Merging without review.

@ssheorey ssheorey merged commit 5c982c7 into main Apr 18, 2024
39 of 40 checks passed
@ssheorey ssheorey deleted the ss/model2tmesh branch April 18, 2024 19:15
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.

1 participant