Robotics StackExchange | Archived questions

gazebo shadow with transparent texture

Hi, I imported the dae file which is made from Blender.

The dae file contains just simple plane with texture and transparency

The model itself works well, but shadow does not reflect the transparency

Please see below image

image description

How can I make shadow reflect the transparent part?

Asked by yjy765 on 2017-10-20 09:23:34 UTC

Comments

Answers

Unfortunately, I don't think there is a way of fixing it right now, feel free to ticket an issue on Gazebo:

https://bitbucket.org/osrf/gazebo/issues/

The shadows right now don't seem to be taking the texture's transparency into account, so the shadows we see are from the original mesh. You can check the original mesh by choosing View -> Collisions:

image description

Asked by chapulina on 2017-10-20 14:26:27 UTC

Comments

Thank you for your answer. But, I saw a pine tree model(https://bitbucket.org/osrf/gazebo_models/src/default/pine_tree/) gives a reasonable shadow. Do you know how did they do that?

Asked by yjy765 on 2017-10-23 00:03:46 UTC

I updated the answer with a pine tree example

Asked by chapulina on 2017-10-24 21:09:48 UTC

I see, I thought the small shadows take the transparency into account before looking at your image. Thanks. I created the issue

Asked by yjy765 on 2017-10-25 05:09:27 UTC

you should be able to take the shadow caster shaders I added in this gazebo_models PR and apply them to your model: https://bitbucket.org/osrf/gazebo_models/pull-requests/312

Asked by iche033 on 2017-11-09 15:09:52 UTC