Robotics StackExchange | Archived questions

Blendmode add for material in collada file for gazebo

Hi,

I am trying to get a model of a tree working in gazebo. It uses a 32-bit png texture with RGB and an alpha channel which defines where the leaf should be cut off (Alpha to Coverage).

In the Collada .dae file this is defined as:

          <texture texture="Map #10-image" texcoord="CHANNEL0">
            <extra>
              <technique profile="MAYA">
                <wrapU sid="wrapU0">TRUE</wrapU>
                <wrapV sid="wrapV0">TRUE</wrapV>
                <blend_mode>ADD</blend_mode>
              </technique>
            </extra>
          </texture>

Some public mesh viewers display it correctly. In gazebo, there is no blending shown. When I select the object in gazebo, view - show transparent, then the alpha channel looks correct, but now the opaque parts of the tree and the bark are transparent as well.

What is the best way to do this correctly when loading from collada files?

PS: I read here https://bitbucket.org/osrf/gazebo/pull-requests/?state=MERGED&query=transparency that in general there is support for transparency from collada files.

Thanks!

Asked by elchtest on 2017-07-25 08:37:30 UTC

Comments

I'm sorry, but I'm going to close this one as it is really a Gazebo-specific question. With over 35000 questions here on ROS Answers, we try to keep things on topic as best as possible. You also have a higher chance of getting a good answer on Gazebo Answers.

Asked by gvdhoorn on 2017-07-25 08:41:48 UTC

btw: apparently Gazebo devs implemented their own Collada parser/loader so I wouldn't be surprised if there are some discrepancies between what other loaders/viewers show and what you get in Gazebo.

Asked by gvdhoorn on 2017-07-25 08:42:56 UTC

Answers