Gazebo | Ignition | Community
Ask Your Question

Modify mesh rendering shader

asked 2021-01-11 15:54:06 -0600

dev4all12358 gravatar image

updated 2021-01-13 07:47:07 -0600


I have trouble with my mesh file rendering in gazebo. I generate a obj/mtl file and I want to display it in gazebo. In gazebo the rendering of my object is not properly done, there is lot of artefact. I can reproduce the same problem in Meshlab by setting the "shading " in vertice mode. When I change it into Face mode there is no strange rendering anymore.

Is there a way in gazebo to do the same as in Meshlab and for the shading in face rendering instead of Vertice rendering?

Edit: I add more precision on shading rendering on Meshlab part. Here is an explanation on what are the differences in Meshlab between Vert / face shading mode. description

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-22 11:03:03 -0600

AJahueyM gravatar image

You could try adding something like this to your visual block in your SDF file, it seems like it changes the shader used when rendering the model. Specifically the "shader" block.

          <shader type='pixel'>
          <ambient>0.3 0.3 0.3 1</ambient>
          <diffuse>0.7 0.7 0.7 1</diffuse>
          <specular>0.01 0.01 0.01 1</specular>
          <emissive>0 0 0 1</emissive>
edit flag offensive delete link more


Thank you for the answer. I still have the same rendering He is an example of rendering in gazebo: link text

It seems, the vertices are not displayed in the right way

dev4all12358 gravatar imagedev4all12358 ( 2021-01-29 09:48:03 -0600 )edit
Login/Signup to Answer

Question Tools



Asked: 2021-01-11 15:54:06 -0600

Seen: 206 times

Last updated: Jan 13 '21