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

Update behavior of FromLegacy to make more flexible with materials #6672

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

errissa
Copy link
Collaborator

@errissa errissa commented Feb 29, 2024

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

Current behavior of FromLegacy on a legacy TriangleMesh with more than one material is to warn the user that Tensor-based meshes don't support multiple materials and not convert any materials. Annoyingly, sometimes our importers (mostly ASSIMP) import or create dummy materials so converting those to Tensor-based TriangleMesh result in meshes with no materials. With this PR those cases will convert to a Tensor-based TriangleMesh with the first material converted as well. In most cases this should produce a mesh with a usable material. In any case, a message is output to the user warning that only the first material was converted.

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

Copy link

update-docs bot commented Feb 29, 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.

Copy link
Member

@ssheorey ssheorey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @errissa ! Looks good with minor nits.

cpp/open3d/t/geometry/TriangleMesh.cpp Outdated Show resolved Hide resolved
cpp/open3d/t/geometry/TriangleMesh.cpp Outdated Show resolved Hide resolved
@ssheorey ssheorey merged commit f5f672b into main Mar 1, 2024
40 of 42 checks passed
@ssheorey ssheorey deleted the errissa/from_legacy_materials branch March 1, 2024 06:00
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