🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How To Make A Surface Look Wet?

Started by
12 comments, last by Kryzon 15 years, 10 months ago
ooo lots of great posts thanks guys!
Advertisement
Edit- oops already answered. Though personally I've noticed wet things are darker than normal. Twilight Princess also added some water drip particle fx to pc character model.
Besides of the super soaker that Numsgil suggested, I make use of a cubeMap. Lots or surfaces already reflect a little bit, but when wet, just increase the reflectivity factor. GTA IV had some nice wet streets with this effect. An environment map that reflects the surrounding world is applied on all surfaces.

If its raining, you could distort that reflection map with noise. You could draw a texture with a few frames that distort the normals used for getting the reflection:
 vector.xy += tex2D( rainNoiseMap, texcoords(currentframe) ).xy * factor; reflection = texCUBE( enviMap, vector );

Vertical walls could have an extra texture that animates drips going down. Increase the reflectivity for these drops somewhat more, and distort the reflection again. Draw a texture with a few drips and let ir roll vertically over the wall.

Just like in reality, some spots get a pool while others remain relative dry. For the horizontal floors pointing upwards, you might want to use a "bumpmap" with a negative offset for the reflectivity. Like in reality, you will first see water in bumps. And when drying up, the bumps will dry-up at last:
environmentReflectivity = saturate( rainDuration - tex2D( bumpMap, texcoords ) ) * materialWetnessFactor;

Street covered with black pixels from that map will be wet first, white pixels at last. The "rainDuration" factor increases slowly and will fill the streets with water. when the raining stops, this factor decreases back to 0 again.

[edit]
Whoops poops, almost forgot. Depending on the absorption of a material, you might want to darken its color.
 // Lerp between original color and the absorbed color, based on the // wetness we calculated earlier   diffuseTextureColor =        lerp( diffuseTextureColor, diffuseTextureColor * materialMaxAbsorptionColor,              environmentReflectivity );

Plastic or metal absorbs nothing, so their color stays the same (absorptionColor = (1,1,1)). Concrete gets a little bit darker/brownish (absorptionColor = (0.9, 0.8, 0.6) ). Sand gets dark brown, etcetera.

Hope that helps,
Rick
Bump + Normal & Specular. The Bump\Normal should react with the specular, giving it a nice wet appearance.

This topic is closed to new replies.

Advertisement