Smooth Shading for environments in gazebo
Is it possible to activate smooth shading for parts of the world in gazebo? For natural environments like rolling hills, smooth shading (e.g. gouraud) looks a lot better than the default flat shading. I'd like to have something like this (example using meshlab):
instead of this:
The image in gazebo is done using this material:
material Hector/Gouraud
{
receive_shadows on
shading gouraud
technique
{
pass Ambient
{
ambient 1.000000 1.000000 1.000000 1.000000
diffuse 1.0 1.0 1.0 1.0
specular 0.8 0.8 0.8 1 20
shading gouraud
}
pass PointLight
{
ambient 1.000000 1.000000 1.000000 1.000000
diffuse 1.0 1.0 1.0 1.0
specular 0.8 0.8 0.8 1 20
shading gouraud
}
}
}
used like this in the world file:
<model:physical name="landscape">
<xyz>0 0 0</xyz>
<rpy>0 0 0</rpy>
<static>true</static>
<body:trimesh name="landscape_body">
<geom:trimesh name="landscape_geom">
<scale>1.0 1.0 1.0</scale>
<mesh>rolling_landscape_blender_export_meshlab_resave.dae</mesh>
<genTexCoord>true</genTexCoord>
<visual>
<scale>1.0 1.0 1.0</scale>
<mesh>rolling_landscape_blender_export_meshlab_resave.dae</mesh>
<!--<material>Hector/BlueBrushedAluminum</material>-->
<material>Hector/Gouraud</material>
</visual>
</geom:trimesh>
</body:trimesh>
</model:physical>
Unfortunately, the material system has no detailed documentation that I'm aware of, so I don't know exactly what I have to do differently. The example is available in the hector_gazebo_worlds package and can be started using
roslaunch hector_gazebo_worlds rolling_landscape_120m.launch