How to disable shadows for TreeLoader3D


22-05-2013 16:23:54

Hello! I am using the awesome PagedGeometry to build massive landscapes for our current student project, which works great! Except for one thing, I seem to be unable to disable shadows for my objects using TreeLoader3D and Ogre::Terrain. I have searched and searched but found no solution yet :(
I have set my entity to setCastShadows(false) right after I create it, and the material has the following settings:

transparency_casts_shadows off
receive_shadows off

But the entity is still casting it's shadow on the terrain. It seems paged geometry is ignoring my settings. Do I have to set it through setCustomParam() ? Or how would I go about to disable shadows for it?


24-05-2013 10:51:51

After hours of analyzing pagedgeometry code I finally found a solution!

In the constructor for BatchedGeometry I added setCastShadows(false).

BathedGeometry inherits from Ogre::MoveableObject and acts as a new entity, based on the one sent to addTree. So it was only logical that it would ignore settings for the initially created entity.