How create shadows from plants - leaves (alpha mask)

Any help is really appreciated!!!

I have a plane with a texture of leaf and have applied transparency so that only the leaf is visible.
However I am not able to see shadows on the plane below the leaf.
Is this possible to do in GSLS in game engine?
I need it for a game.

see attached file

Attachments (129 KB)

The BGE doesn’t support alpha shadows (shadows cast by transparent textures) right now, though I would suggest you use Clip Alpha instead of otherwise. In Clip Alpha mode, the plane will cast a shadow, regardless of the texture. If you have enough leaves, though, the effect might look somewhat similar to each leaf casting ‘correct’ shadows.

Ok… I have enabled the Clip alpha but still the shadow falling on the plane
is a solid square… how do I get the silhouette of the leaf?

Could you send me the modified file after you apply the changes?

thank you in advance for your valuable help!!!

Attachments (131 KB)

Like I said in my previous post, the BGE doesn’t support shadows cast by alpha textures (in other words, you won’t get a shadow in the shape of a leaf). There was an old patch for it, but it wasn’t made official.

Ok I understand!! So for now there is no workaround???

Thank you for your answer!!!

If you don’t have a lot of leaves it might be worth going ahead and making the geometry into roughly the shape of the leaf, so you’ll get somewhat correct shadows; if you have a whole lot of leaves that would probably add too many polygons to be worth it.

thank you for your answer

As a side note, you might want to try looking into tree-building programs like TreeD or Arbaro, if you haven’t already, if you need help building high-quality trees.