Skip to main content
GameDev.net gamedev.net
🔒 Locked

How To Make A Surface Look Wet?

Started by jstroh Aug 20, 2008 at 12:12 PM 12 replies 9.6k views
Original Post
jstroh
jstroh
?
nathandelane
nathandelane
Usually some amount of glossiness and reflection and possibly light refraction are good.
Numsgil
Numsgil
Super soaker + your monitor? :P

You'll probably need to create some water drop effects. Maybe little water drop decals.
[size=2]Darwinbots - [size=2]Artificial life simulation
jstroh
jstroh
lol I figured reflection and a high specular but what else :P
Daaark
Daaark
Abuse normal and spec maps. 95% of the real time graphics techniques in the last few years just make things look wet.
MJP
MJP
Yeah animating a normal map with a super-high specular exponent should get you most of the way towards what you want. Maybe even blend between the regular normal map, and one that's animated reflecting the moving water.
jstroh
jstroh
Quote:
Original post by MJP
Yeah animating a normal map with a super-high specular exponent should get you most of the way towards what you want. Maybe even blend between the regular normal map, and one that's animated reflecting the moving water.


Sounds easy enough ;o

Now for a harder problem.

Are there any published techniques for animating liquid flow down a character's texture?
Sneftel
Sneftel
Bizarrely enough, there are. See section 5 of this. That's for flat glass surfaces, but extending to other locally flat surfaces should be simple.
Drilian
Drilian
Also note that surfaces generally darken when they're wet (pour water onto concrete, stone, or wood to see what I mean), so turning down the diffuse color a little bit will also add to the effect.

Edit: Specifically, check out this paper on NVidia's Cascades demo. It's D3D10 specific and there's a lot in there that you don't need, but they do have a bit about making things look wet in it.
jstroh
jstroh
ooo lots of great posts thanks guys!
tombofsoldier
tombofsoldier
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.
spek
spek
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
Kryzon
Kryzon
Bump + Normal & Specular. The Bump\Normal should react with the specular, giving it a nice wet appearance.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.