I thought of how to implement a really cool rain/shower effect that reacts well to dynamic geometry
1. Render the scene depth from above using an orthographic projection. This will produce a nice heightmap for part of the scene.
2. Water falling is simulated using newtonian physics in a compute or possibly geometry shader, with one buffer storing position and another storing velocity.
3. the heightmap can be used to calculate the height and tangent space at a point, so if the raindrop goes beneath the heightmap, ie it intersects scene geometry, then use the tangent space to bounce it
This could produce a very realistic effect if a character walked under a heavily dripping pipe or a shower room or something. Furthermore, if any drops fall through the heightmap because of inaccuracy or undersampling it will just look like they were absorbed
[D3D11]Raindrop effect
I seem to recall reading about this in one of the GPU Pro series, using sun shadows to determine where raindrops can/can't fall. It's a nice idea! Could also be used to apply 'wetting' to the scene in screen space.
It's been done. The STALKER games, ever since Stalker... 2? Clear Skies I think? Had a "Rain Map". Heightmap/Ovehread static shadow map like used for collision of raindrops, further used for applying a dynamic "wet" shader onto anything the rain could "see". Halo Reach actually used scene depth and normals for screen space particle collisions.
So, it's a nice idea that would work, because it already has
So, it's a nice idea that would work, because it already has
It's been done. The STALKER games, ever since Stalker... 2? Clear Skies I think? Had a "Rain Map". Heightmap/Ovehread static shadow map like used for collision of raindrops, further used for applying a dynamic "wet" shader onto anything the rain could "see". Halo Reach actually used scene depth and normals for screen space particle collisions.
So, it's a nice idea that would work, because it already has
Not sure why that was downvoted. True dat.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement