Tremulous Forum
Media => Mapping Center => Topic started by: 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?
-
Your best bet would probably be to make a rather watery-looking environment map and applying it to your texture.
-
also mite want to add a very faint reflective surface to them
-
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 (http://www.zanir.szm.sk/dx/obrazky/016_Per_Pixel_Lighting_big.jpg).
-
This is the shader I use for my map Reise
textures/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 :)
-
Thanx guys. Got some ideas and still searching better solution.
-
Did you try my shader? Im certain it will fix your problem
-
Won't he have to have the textures that are referenced in your shader?
-
No, he just needs the texture he wants the water to reflect off (any) and the water texture from karith :)
-
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.