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
Started by hupsilardee, Oct 23 2012 08:19 AM
3 replies to this topic
Sponsor:
#3 Members - Reputation: 526
Posted 23 October 2012 - 04:50 PM
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
#4 Members - Reputation: 922
Posted 25 October 2012 - 04:08 PM
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.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.






