Terrain Shadow Maps ?


Anyone got any pointers for generating terrain light/shadow maps ?

I was thinking of doing a shadow map but the only examples I can find don’t fit well with a light source at infinity

Is there an alternatove to ray-casting from point on terrain towards sun until below terrain (shadow) or above highest point on terrain (not shadowed) ?

I dont need realtime - my lightsource (the sun) doesn’t move much

Rob J

The shadow would need to be updated not only when the lightsource moves, but also when any object casting a shadow moves.

You can still use shadow maps with a directional lightsource. Instead of using a perspective projection when rendering from the perspective of the lightsource, you need to use an orthographic projection. Just make sure that the objects that cast shadows are within the orthographic frustum.


maybe this will give you some ideas.