On top of attempting it myself, I searched the Terrain Engine Guide, forums and the wiki Terrain Tutorial and couldn’t determine if tree’s simply do not receive shadows or if I was doing it incorrectly.
I created terrain, added a small forest (Palm), added a directional light(shadow Type: Hard Shadows) and set the terrain lighting to ‘Pixel’. I get palm tree shadows on the terrain just fine (they’re quite lovely) but I get no shadowing on the trees themselves.
When I click on the Palm tree asset, I see that both Cast and Receive shadows are checked, but greyed out. I thought perhaps this was due to the Nature/Occlusion Soft_* shader but changing it to diffuse didn’t seem to do anything…
…is it the case that vegetation won’t receive shadows?
Thanks!
EDIT: Oh and I wasn’t entirely sure which sub-forum this kind of post should go into, so excuse me if it’s in the wrong spot.
I guess that terrain vegetaion only uses light maps (if you select your terrain then you can generate a light map from the lights in your scene). This is as dynamic lighting is very processor intensive and for the most part vegetation does not move and therefore dosent need lighting/ shadows to be re-calculated every frame.
That’s fine, and in fact the vegetation does and should move with wind. Regardless of performance (which is in fact quite good so I’m not concerned), I want the ability to have unified shadowing throughout a scene. Having it just on the terrain doesn’t help make the scene feel cohesive, more so when you have grass covering up the realtime shadows on the ground!
Speaking of lightmaps, as it turns out from what I’ve gathered, they don’t affect trees either, but I understand why. Realtime shadowing in this case IS in fact the way to go so…
If you look at the shaders you can see a pass for a shadow caster, but not one for a shadow collector. I guess that could be added if you know enough about how shadows work (I don’t ;)), but there might be a reason why they didn’t already do that. Could be something to do with the billboarding…since all billboards for a given tree are identical, you’d have the shadows disappearing when the tree is billboarded which would probably look ugly.
I can’t think of a good reason, other than perhaps something specific/unique UT did to the rendering engine. It’s otherwise the same as CryEngine 2 for the most part. Not that terrain rendering and tree LODing/IMPOSTERing is exclusive to CryEngine…no they’ve been around for some time…but again I can’t think of a good reason why the option can’t at least be available.