Shadow mapping a large terrain.

Started by
0 comments, last by Aqua Costa 11 years, 8 months ago
My game (in XNA) has a medium-large sized terrain for the main environment and the player will be outside for the majority of the game. I'm fairly new to shadow mapping techniques (I've only ever done basic ones on small confined scenes). Can someone please explain to me what approaches are available for large environments (single directional light for the sun)- preferably as low-cost as possible. I'd considered cascade shadow mapping but I'd rather something a bit simpler and 100% realism and quality isn't as much a concern as efficiency.

From reverse engineering a few third-person RPGs I've played, I've discerned that they basically just render shadows within a certain radius of the player and fade them out as you look into the distance- such that if you look at a tree on a far hillside, it appears unshadowed. I assume this would be a fairly simple option? What's the best way to go about it and are there any other cheap ways that look acceptable?

Hope someone can help me out, thanks.
Advertisement
If you don't want to implement cascaded shadow maps (which will give you the best results in my opinion), you can try to use a single cascade, the implementation will be like regular shadow mapping but you should create the light projection matrix to fit the view frustum (instead of a sphere around the player) so you don't waste shadow map resolution on shadows that won't be visible. Check this post for more information.

This topic is closed to new replies.

Advertisement