Page 1 of 1

fog / farplane

Posted: Wed Jan 02, 2008 6:10 am
by ViPER
Ive seen this in single player maps before but not sure how to get rid of it. The skybox wall will lighten depending on my player viewangle when I add a little fog.

Any way to stop this?

Image

sky

Posted: Wed Jan 02, 2008 7:12 am
by tltrude
Are the sky box brushes textured the same on all sides? Don't use caulk or nodraw on any of the faces. You can also try increasing the farplane distance.

Posted: Wed Jan 02, 2008 7:56 am
by ViPER
Thanks

I only texture the inside and caulk the outside - I have rarely seen this before - but now I know what it is.

Hate to texture all that surface - I chose common black, we will see how that works. Other than textureing with sky are there any other good alternatives?

Posted: Wed Jan 02, 2008 12:39 pm
by bdbodger
Use sky caulk . I think the effect you are seeing is because the part of the brush you are looking at is beyond the farplane so does not draw but when you move your head then part of the brush that is within the farplane distance draws the brush and the sky looks normal . I wouldn't use fog with any thing other than sky caulk .

Posted: Thu Jan 03, 2008 8:08 pm
by ViPER
Yea - still a problem after trying black on all other sides and even tried sky on all sides and I tried cutting each skybox wall into quarters. I also replaced the shader with a stock sky shader.

I will try the skycaulk on the back - But I think, bdbodger your telling me to replace the skybox texture with skycaulk if I want fog. I will try both

Posted: Thu Jan 03, 2008 10:37 pm
by ViPER
Thanks All

Caulk only fixed it - but only to sacrifice the use of sky texture. I wanted both though and your suggestions helped me create a solution.

here is what finally works -

I textured the skybox with sky caulk - then I copied the skybox and scaled it down to fit just inside itself. I made the smaller box a script object and textured it with nodraw and then textured the inside with the custom sky texture.

no more weird flashing.

Image

Image

Posted: Fri Jan 04, 2008 12:11 am
by PKM
crap that looks good and very eerie .

Posted: Fri Jan 04, 2008 4:36 am
by ViPER
Thanks.

Another question -

With use of global/weather the lighting effect lights up the sky. How is this color set? I've seen white (that's what I want) - I've also seen other colors - but here i get this purple color. I tried to change the farplane color with no effect on the flash.

Image

Image

How to get white instead?

Posted: Fri Jan 04, 2008 12:50 pm
by bdbodger
Not sure what the $weatherF's are all about but in m5l1a.bsp they have
{
"model" "*26"
"origin" "0 0 0"
"classname" "script_object"
"targetname" "weatherF"
}
{
"model" "*27"
"origin" "0 0 0"
"classname" "script_object"
"targetname" "weatherF"
}
In the weather scipt they have this

Code: Select all

	if (level.weatherFs > 0)
		level.weatherF = exec global/makearray.scr $weatherF

Code: Select all

flash:
 setcvar "r_fastsky" "1"
$world farplane_color (0.9 0.9 0.9)

for (local.i=1;local.i<level.weatherFs+1;local.i++)
level.weatherF[local.i] show

end

unflash:
 setcvar "r_fastsky" "0"
$world farplane_color level.farplane_color

for (local.i=1;local.i<level.weatherFs+1;local.i++)
level.weatherF[local.i] hide

end

So it does seem to have somthing to do with the farplane color r_fastsky sets the sky color to the farplane color when the cvar is set to 1 .

Posted: Fri Jan 04, 2008 10:45 pm
by NaotoKhan
Viper wrote:Image
Very nice! I'm not sure I've ever seen a skybox used effectively with fog, looks like a great idea 8-)

lightning

Posted: Sat Jan 05, 2008 5:29 am
by tltrude
Maybe its time for a new lightning effect. Make a lightning bolt texture! It would have to be a see-through texture/shader -- like a corona texture/shader. Then apply it to a non-solid script object brush, and use a random hide/show thread in the script. It should also be easy to add a huge dynamic light and sound.

Just a thought -- probably wouldn't look right unless the clouds above also light up. If part of your sky is a script object, maybe it will light up!

Posted: Sat Jan 05, 2008 2:07 pm
by PKM
now there's an idea .

Posted: Fri May 16, 2008 4:27 pm
by Phydeaux
Is there anyway I could get the map file/script for that map :P. I need that type of look for my map.