Sign in to follow this  

Rain Maps/Shadow Maps

Recommended Posts

Hello!

 

I have been trying to implement a technique to mask areas of rain from occluders. The obvious choice for this is bog standard orthographic shadow mapping.

 

However, I hit a snag when it comes to the sides of buildings. Due to precision error and whatnot, some completely vertical sides of buildings get marked as in shadow! This isn't ideal. (see shadow_issues.jpg)

 

I had then thought, maybe I could offset the normals in the shader, but then duh, it doesn't work for flat planes as the normals point upwards.

 

In the STALKER GDC 2009 presentation they say:

 

Use shadowmap to mask pixels invisible to the rain
- Draw only static geometry (so that means they are not using a seperate pre done mesh)
- Snap shadowmap texels to world space <- what does this mean? I think this is important...
- Use jittering to hide shadowmap aliasing and simulate wet/dry area border.
 
Any thoughts on how to solve this would be much appreciated!
 
Thanks smile.png

Share this post


Link to post
Share on other sites

Use shadowmap to mask pixels invisible to the rain
  lol thats so straightforward! It never occurred to me.

 

- Snap shadowmap texels to world space <- what does this mean? I think this is important...
I have no idea how to do it but IIRC thats there to avoid flickering of the shadows when moving the camera or light. Very noticeable in say, Skyrim when the sun's directional light position gets updated for day/night cycling (they shift the shadow position each X amount of real time instead of updating constantly).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this