feat: add model thumbnail rendering #860
Open
+159
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds 3D model thumbnail support for .obj, .gltf, .stl, .glb, and .fbx formats, using Open3D 0.19.0 for rendering. It supports textures and can color texture-less models. In the future, I plan to add a setting for users to choose their default model color.
This supersedes #693
This closes #351
Remaining Issues
The first issue with the pull request is that Open3D's OffscreenRenderer requires a dedicated thread, and it crashes if no thread adopts the renderer. I'm unsure how to integrate this with QThreads, so as a workaround, I set daemon=True for the rendering thread to prevent the software from hanging on exit. While this stops the hanging issue, it feels like a hacky solution.
The second issue is that sometimes on the first run the program seg faults, but on second run has no issues
Preview
Tasks Completed