News:

Come Chat with us live! Learn how HERE!

Main Menu

Wet surface shaders

Started by CATAHA, January 14, 2009, 09:19:38 PM

CATAHA

Is it possible make such shaders? Want make wet walls in sewers but still cant imagine what shader stages in what order i need. -_-
Any ideas?
Russian q3/trem mapping site: http://tremlair.krond.ru/
=[ Boxmaps suck if they have no concept ]=

Ice Trap (InstaGib)

Other maps: A.T.D*S Remake

Kaleo

Your best bet would probably be to make a rather watery-looking environment map and applying it to your texture.
Quote from: Stannum
Thou canst not kill that which doth not live,
but you can blow it into chunky kibbles!
I has a cookie, and u can has a cookie, but i no givs u mai cookie...

Zero Ame

also mite want to add a very faint reflective surface to them

Odin

#3
Quote from: CATAHA on January 14, 2009, 09:19:38 PM
Is it possible make such shaders? Want make wet walls in sewers but still cant imagine what shader stages in what order i need. -_-
Any ideas?
Something like this is extremely difficult to do on a game engine such as Quake3(which Tremulous is based off of). You could create a texture for each surface you want to be shiny, and use alphaGen lightingSpecular to cause it to brighten the surface when you move around it. You'll need to use a blendFunc that blends with the alpha channel(GL_DST_ALPHA/GL_SRC_ALPHA and their inverse operators) to see it, limiting your choices for different effects somewhat. It needs to blend on top of the base texture(off the top of my head, blendFunc GL_SRC_ALPHA GL_ONE seems to work).

Note also that alphaGen lightingSpecular is rather slow on older machines, on top of it only modifying the alpha channel of a texture and even then only at the vertices for the surface it is placed on. Because of this is will look like a gradient(for an example of vertex lighting, try turning on r_vertexLighting). It will not, by any means, look like this.

nubcake

This is the shader I use for my map Reise
Quotetextures/Reise/waterbricks
{
   q3map_nonplanar
   q3map_shadeangle 120
   qer_editorimage textures/Reise/wall_1024_tex1_05.tga
   {
      map textures/Reise/water1.tga
      tcmod scale -.25 -.25
      tcmod scroll .1 .04
      rgbgen wave sin .75 0 .5 2
   }
   {
      map textures/Reise/water1.tga
      blendFunc GL_one GL_ONE
      tcmod scale .25 .25
      tcmod scroll .1 .1
      rgbgen wave sin .75 0 0 2
   }
   {
      map textures/Reise/wall_1024_tex1_05.tga
      blendFunc GL_one GL_src_color
      rgbgen identity
   }
   {
      rgbGen identity
      map $lightmap
      blendfunc gl_dst_color gl_zero
   }
}

This will give your texture a nice looking surface with animated water texture 'shining' off of it :)

CATAHA

Thanx guys. Got some ideas and still searching better solution.
Russian q3/trem mapping site: http://tremlair.krond.ru/
=[ Boxmaps suck if they have no concept ]=

Ice Trap (InstaGib)

Other maps: A.T.D*S Remake

nubcake

Did you try my shader? Im certain it will fix your problem

Evoc

Won't he have to have the textures that are referenced in your shader?
Quote from: ...lying to people about being banned...Evoc: I JUST GOT BANNED FROM THE FORUMS
Amanieu: lolwut
Thorn: nice
your_face: rofl
Thorn: the less places you can say anything the better

nubcake

No, he just needs the texture he wants the water to reflect off (any) and the water texture from karith :)

[RUS] dRiver

Yep, i tried and that i can say... Seems i need to play with environment maps, bcaus really 'wet' surface changin when you moving around. =) when you standing you see static 'overlighted' places around texture. Still trying get some result.
[STAY PARANOID]=