Make rain splash effect (pixel shader only)
Members - Reputation: 447
Posted 12 September 2012 - 02:43 AM
I've made a fake wet surface pixel shader (HLSL/SM5) which I want to animate with an effect of rain falling onto the totally wet ground.
The wet look is generated by manipulating the respective pixels' color and gloss and adding some reflected sky color. I'm distorting the effect with a slight sin wave in order to simulate a little flow / wave effect on the wet surface. That looks fine when it doesn't rain anymore but the ground is still wet.
Now I like add more distortion to generate a look of rain splashing onto/into my puddles on the ground. I already have nice little rain ripples, so that's not the issue.
The problem is rather that I'm not sure what distortion logic / mechanism / formula to apply to make the water distortion by the rain splashes look authentic. Just increasing the amplitude and/or frequency of my sin distortion doesn't look realistic. I guess the water surface distortion when rain falls into a puddle behaves different, not like wind blowing over the surface making waves (what could be achieved by sin distortion).
Any ideas how I would be able to produce a half-authentic looking effect here?
Crossbones+ - Reputation: 5656
Posted 12 September 2012 - 12:18 PM
On the other hand, if you want to have a single ripple travelling outward, you can always use a regular sine wave, but attenuate the amplitude of the sine wave as a function of the distance from the rain drop contact point.
Jason Zink :: DirectX MVP
Direct3D 11 engine on CodePlex: Hieroglyph 3
Direct3D Books: Practical Rendering and Computation with Direct3D 11, Programming Vertex, Geometry, and Pixel Shaders
Articles: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article (original):: Fast Silhouettes Article
Games: Lunar Rift