-
Notifications
You must be signed in to change notification settings - Fork 342
Populate default material for model #3139
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Maksim Derbasov <[email protected]>
I'm hesitant to back-port this. I know @azeey suggested back-porting, but it would mean some end users get a bit of a shock when they wake up to find their simulations change color. Perhaps the less jarring fix would be to make the default white in previous gz-sim versions and then keep things black on the main branch. |
I guess "their simulations changed color" is a very big generalization in this context. I guess there are no users who are using models w/o materials due to you can't see any edges and faces of a model. It's just a uniformly colored silhouette of the model (first screenshot in initial pull request). It looks strange and not convenient (in context of 3d graphics). Keeping different behaviour will just increase complexity of codebase support imo. More merge conflicts |
I think there are two concerns that this pull request addresses:
I would recommend separating these two concerns into separate pull requests:
I think it would not be controversial to merge and backport the bugfix for the first concern. The second concern is more complex, but I would rather have that discussion in a way that doesn't block the bugfix. |
Initial problem was: I can't see shape of added mesh object (I guess I spawned it from plugin). And I even can't fix it in gui. For alignment, here is how basic shapes and mesh looks if user not provided any material: ![]() world_example.zip If we specify default style in |
🦟 Bug fix
Fixes #
Summary
Adding model with Entity Tree gui plugin, or in sdf w/o material won't creating a material entity in ECM. Object will looks flat and it's not possible to change material properties in gui. Populating default material will allow to configure it in gui.
Behaviour changing: before color of model was white and after this change it will be black. According to SDF specification http://sdformat.org/spec?elem=material&ver=1.9 it's correct behaviour. So technically it's a fix
(This is a port of changes from #3009 to main branch; and screenshots are available in initial PR)
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.