Skip to content

Convert triangle mesh model to tmesh map - #6758

Merged
ssheorey merged 2 commits into
mainfrom
ss/model2tmesh
Apr 18, 2024
Merged

ssheorey merged 2 commits into
mainfrom
ss/model2tmesh

Conversation

@ssheorey

@ssheorey ssheorey commented Apr 18, 2024 •

Copy link
Copy Markdown
Member
  • 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)
@update-docs

update-docs Bot commented Apr 18, 2024

Copy link
Copy Markdown

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
Copy Markdown
Member Author

Tested works by user. Merging without review.

@ssheorey
ssheorey merged commit 5c982c7 into main Apr 18, 2024
@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