Some object does not project shadows


As said in the title, I have objects that do not project shade and I do not know why it happens.
Ideas of when this can happen. Is it an export problem? opacity textures or others? All my trees have this problem. A tree does not project a shadow (no trunk, no foliage and another tree where only the trunk casts the shade, but the foliage of the plant projects the shade perfectly, but not the tree ???
I add all the sub objects to the shadow generator with addShadowCaster().

Thank you for your lights


Can you make sure that your trees are not transparent (no opacity texture)? By default transparent objects will not cast shadows.

You can force babylonjs to render them with generator.transparencyShadow = true

1 Like

Yes it works. I did not know this transparencyShadow property. she is not in the doc

Thank you Dk, it’s perfect now.