ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Rviz weird shading when using materials

asked 2012-08-13 08:50:52 -0500

dornhege gravatar image

updated 2012-08-14 03:59:09 -0500

I'm using rviz in electric on lucid and have some weird shading effects when using materials in a collada model. The blender model looks like this: image description

... and rviz gives me the following:

image description

Notice the bright shading from the top. It seems to be OK when using textures (the gold/black manipulator in the back is textured), but I'd like to avoid texturing the model.

I've already made sure that no RGB values are 1.0 or 0.0 exactly (In that case the model seems pink).

Does anyone know the reason or any more ways to fix that?

Update: Some more tips I have tried from the other threads:

  • Flipping normals - just flips the normals, the lighting seems not to be affected at all.
  • Setting the model to smooth/flat doesn't seem to have any effect.

For now, I surrendered and textured the whole model. That seems to work: image description

edit retag flag offensive close merge delete

Comments

Are you on electric or fuerte? There was a bug with ambient color some time ago (that should be fixed by now, but who knows): http://answers.ros.org/question/27734/mesh-rendering-in-rviz/ .

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-08-13 20:49:56 -0500 )edit

I'm on electric. The bug is still present. If I have a value at 0.0, the mesh appears pink and grey.

dornhege gravatar image dornhege  ( 2012-08-14 02:06:08 -0500 )edit

This is off topic, but is the Matilda model you are using in the screenshots available in any of the ROS packages or would you be willing to share it?

david.hodo gravatar image david.hodo  ( 2012-09-11 10:28:39 -0500 )edit

I only did the ROS conversion, but not the 3D model, so I cannot just publish that. The 3D model was done by TU Graz.

dornhege gravatar image dornhege  ( 2012-09-12 00:37:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-08-14 00:06:39 -0500

AHornung gravatar image

Are the materials embedded in a way in the collada file?

The problem we ran into with the Nao is that RViz is not able to find the materials for OGRE .mesh files since it only looks at its own ogre_media/textures directory. Our workaround was to copy all textures and materials to

`rospack find rviz`/ogre_media/textures/

for electric, and

`rospack find rviz`/ogre_media/

for fuerte.

A submitted patch did not get any attention so far.

edit flag offensive delete link more

Comments

Yes, they are embedded. It also seems to somewhat use them (the color scheme itself seems correct), just wrongly.

dornhege gravatar image dornhege  ( 2012-08-14 02:07:24 -0500 )edit

Question Tools

Stats

Asked: 2012-08-13 08:50:52 -0500

Seen: 764 times

Last updated: Aug 14 '12