-
Notifications
You must be signed in to change notification settings - Fork 313
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
Allow color specification on Asset3D
#7458
base: main
Are you sure you want to change the base?
Conversation
- add attribute `albedo_factor` and method `with_albedo_factor` to archetype `Asset3D`. - update stl/obj loader : `load_stl_from_buffer` and `load_obj_from_buffer` to process `albedo_factor`.
Remove `albedo_texture_buffer`, `albedo_texture_format` from `Asset3D`
- add attribute `vertex_colors` and method `with_vertex_colors` to archetype `Asset3D`. - update stl/obj loader : `load_stl_from_buffer` and `load_obj_from_buffer` to process `vertex_colors`.
917d889
to
161224d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!! 🙂
AlbedoFactor
makes a lot of sense to me since this can be applied on all mesh/model formats, would love to get this in. But I don't see yet how we can add vertex_colors in a tractable & defined way. However, maybe we can come up with some rule for it?
Very relatedly, we have to keep in mind that more model formats may be added in the future and we need to avoid ugly surprises in that context. Therefore, I think all additional properties on Assed3D
should be "postprocesses" on the loaded mesh. This makes it more robust against future formats and makes it a lot easier to specify what they do.
e69b313
to
6b1a7b0
Compare
let me know when you think this is ready for review again! :) |
36c02cd
to
87751a4
Compare
- remove `albedo_factor` from loader
87751a4
to
f8ff765
Compare
crates/viewer/re_space_view_spatial/src/visualizers/assets3d.rs
Outdated
Show resolved
Hide resolved
- Add #derive[(Clone)] instead of impl Clone for MeshInstance
0d5945b
to
38f4044
Compare
What
The idea is to reproduce behavior of
Mesh3D
regarding color modification onAsset3D
:albedo_factor
vertex_colors
as inMesh3D
In order to overwrite white default texture of
Asset3D
loaded from stl and obj (gltf already have albedo_factor in file).See: #5253
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.