-
Notifications
You must be signed in to change notification settings - Fork 26
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
Investigate color support in mesh files #31
Comments
The graphic engine is OGRE or OGRE2 ? |
I tried both, same result. Upstream they changed the scene plugin during the past 10 days (new one is |
Which sources of light do you have in your scene? If you just have ambient light and no point or direction source of light, a uniform color for the meshes is actually the expected outcome of the rendering process. See for example for the Phong model https://en.wikipedia.org/wiki/Phong_shading#Phong_reflection_model : |
I had the same suspect as well. The new worlds upstream added new light elements and I tried to do the same on our worlds. The only difference is that I can see the iCub shadow: But note that this is using the old SDF element <light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
|
Have you tried rotating the model/changing the direction of light? If the model is in shadow w.r.t. to the only source of light, the only remaining light is indeed the diffuse one. |
Just tried, no change. Good tentative, though. |
Things I would try to investigate more the problem:
|
During my tests with the new sdformat release (no more use parent model frame, fixed material/script element, etc) I wanted to give a quick shot to this problem. I tried to add the following to each visual elements of the links: <material>
<diffuse>1 1 1 1</diffuse>
</material> And this is the result: I'm not an expert on this, but as far as I know STL files do not support defining material properties. Probably the default behavior of the gazebo renderer changed, because on Gazebo Classic the same model is properly rendered (all white with shadows, similar to the result of the gif above). |
So, it a nutshell in ignition-gazebo it seems that the default material for primitive shapes is different from the default material used for STL meshes. This sounds like a bug in ign-gazebo or some dependent library. |
Yes, something similar. I couldn't find the source of the problem, but I'm not yet familiar with all the rendering-related codebase of the simulator. |
We adopted the We experienced a mesh problem also with the Panda model. The model was correctly inserted in the simulation but the visual elements were transparent. Citing @paolo-viceconte:
Closing. |
As reported in #4, the colors are not properly displayed in our iCub models.
Despite this rendering problem, the models are loaded correctly and both links and joints are detected.
Here below an example with
iCubGazeboV2_5
:The text was updated successfully, but these errors were encountered: