How to make underwater areas dark?
How to make underwater areas dark?
Any idea how to achieve realistic looking dark underwater surfaces? Using negative lights is quite awkward and gives bad looking results - I have quite large water area.
[url=http://twitter.com/back2cccp]twit[/url]
[url=http://slapmap.wordpress.com/]blog[/url]
[color=#BFFFBF]¯\_(ツ)_/¯ ----------------------------------------------------------------
[/color]
[url=http://slapmap.wordpress.com/]blog[/url]
[color=#BFFFBF]¯\_(ツ)_/¯ ----------------------------------------------------------------
[/color]
-
- Posts: 102
- Joined: Sat Feb 19, 2005 10:11 am
Re: How to make underwater areas dark?
1. make a texture set for underwater, one which darkens and wets the area look via the texture.
2. add a water pass to the textures used there.. a turb..
hey can i have a copy of the water shader you put on your blog?
heres a shader for a say bathtile underwater.. im tweaking it now

bubbles.tga is a red version of the main water texture, used in the main water shader to make it bit bloody, i turn the color dark blue in the second shader and the scaling is because of the wide style of the texture used..
i had the same issue as you, when i got under the water surface the area beneath it was lit and had none of the pretty refractions from the light passing through the water...
2. add a water pass to the textures used there.. a turb..
hey can i have a copy of the water shader you put on your blog?
Code: Select all
//ripplewater modification from vq3 stuff
textures/gregyptctf3/ripplewater4
{
qer_editorimage textures/gregyptctf3/ripplewater4.tga
surfaceparm nonsolid
surfaceparm trans
surfaceparm water
cull disable
qer_trans 0.3
q3map_globaltexture
{
map textures/gregyptctf3/ripplewater4.tga
blendfunc filter
tcMod turb 0.1 0.07 0.1 0.01
tcMod stretch sin 1 0 0 0.1
tcGen environment
}
{
map textures/gregyptctf3/bubbles.tga
blendfunc add
tcMod scale 0.3 0.3
}
{
map textures/gregyptctf3/ripplewater4.tga
blendfunc filter
tcMod turb 0.3 0.06 0.4 0.02
tcMod stretch sin 1 0 0 0.1
}
}
Code: Select all
//ripplewater modification from vq3 stuff
textures/gregyptctf3/bath
{
qer_editorimage textures/gregyptctf3/pooltyl.tga
{
map textures/gregyptctf3/pooltyl.tga
}
{
map textures/gregyptctf3/bubbles.tga
blendfunc add
rgbGen const ( 0 0 0.501961 )
tcMod turb 0.3 0.06 0.4 0.02 //really slow motion
tcMod stretch sin 1 0 0 0.1
tcMod scale 1 0.4
}
}
bubbles.tga is a red version of the main water texture, used in the main water shader to make it bit bloody, i turn the color dark blue in the second shader and the scaling is because of the wide style of the texture used..
i had the same issue as you, when i got under the water surface the area beneath it was lit and had none of the pretty refractions from the light passing through the water...
Last edited by skinmaster on Sat Dec 24, 2011 5:24 pm, edited 3 times in total.
-
- Posts: 102
- Joined: Sat Feb 19, 2005 10:11 am
Re: How to make underwater areas dark?
[lvlshot]http://www.rave.ca/en/image/original/441257/[/lvlshot]
ps, slick from common is also a wise underwater doubler on the tyl bushes
ps, slick from common is also a wise underwater doubler on the tyl bushes
Re: How to make underwater areas dark?
Skinmaster thnx, that's quite clever to use separate textures for underwater geometry
The watershader in my blog is from Darkplaces engine, which is not exactly Q3 (it just runs Q3 bsps)
the engine internaly supports refraction\reflection water with normalmaps. If you need it, I can upload textues and shader, mind you they are not that great :/

The watershader in my blog is from Darkplaces engine, which is not exactly Q3 (it just runs Q3 bsps)
the engine internaly supports refraction\reflection water with normalmaps. If you need it, I can upload textues and shader, mind you they are not that great :/
[url=http://twitter.com/back2cccp]twit[/url]
[url=http://slapmap.wordpress.com/]blog[/url]
[color=#BFFFBF]¯\_(ツ)_/¯ ----------------------------------------------------------------
[/color]
[url=http://slapmap.wordpress.com/]blog[/url]
[color=#BFFFBF]¯\_(ツ)_/¯ ----------------------------------------------------------------
[/color]
-
- Posts: 102
- Joined: Sat Feb 19, 2005 10:11 am
Re: How to make underwater areas dark?
just paste the shader here in text, thanks 

-
- Posts: 384
- Joined: Fri Mar 05, 2010 5:29 pm
Re: How to make underwater areas dark?
You could create a dark fog shader to make underwater areas appear quite dark and have the fog brush roughly the same volume as the water, minus a couple of units from the water surface to avoid zebraing/other issues. You can also tweak the drawing distance or density of the fog as you like. A shader like this should do the trick:
The values for fogparms are ( red green blue ) distance. I picked a suitable color and got the RGB for it in Paint Shop Pro, then divided the values by 256.
Code: Select all
textures/sfx/waterfog1
{
qer_editorimage textures/sfx/hellfog.tga
surfaceparm trans
surfaceparm nonsolid
surfaceparm fog
surfaceparm nodrop
surfaceparm nolightmap
q3map_globaltexture
q3map_surfacelight 50
fogparms ( 0.125 0.28125 0.375 ) 386
}
-
- Posts: 102
- Joined: Sat Feb 19, 2005 10:11 am
Re: How to make underwater areas dark?
chances are that will darken the "see through" part of standing above the water though
Re: How to make underwater areas dark?
You have to be careful how you define shaders in this case. Quake 3 shaders are texture shaders, vs. water surfaces for Dark Places with reflection/refraction are pixel shaders. Two VERY different things.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]