Gazebo | Ignition | Community
Ask Your Question
0

Modify mesh rendering shader

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

dev4all12358 gravatar image

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

Hello,

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. https://stackoverflow.com/questions/4...image description

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

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.

<material>
          <lighting>1</lighting>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Grey</name>
          </script>
          <shader type='pixel'>
            <normal_map>__default__</normal_map>
          </shader>
          <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>
</material>
edit flag offensive delete link more

Comments

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 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

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

Seen: 30 times

Last updated: Jan 13