Page 1 of 1
No farplane fog...
Posted: Fri Jul 04, 2003 3:22 pm
by Bjarne BZR
I'm doing a winter map with low visibility. I've used farpalne before without problems, but now it does not work.
Farplane looks as if its working because the LOD terrain is clipped, its just that there is no fog effect at all
This is the fog scripting:
Code: Select all
$world farplane_color "0.5 0.5 0.6"
level.fogplane = 2000
$world farplane level.fogplane
The map currently only contains a big chunk of LOD-terrain and a skybox with the sky/m5l2 texture. Any ideas?
Posted: Fri Jul 04, 2003 3:31 pm
by Bjarne BZR
Its something with the sky texture... because it works when I use
common/skycaulk on the skybox.
But i dont WANT to use common/skycaulk!

Posted: Fri Jul 04, 2003 3:35 pm
by Slyk
I found that several of the mission/level sky textures don't work well, if at all. Strange why. I actually would guess that they are some sort of placeholder that isn't really 'in-game' as I don't remember that many varied skys and many are hard to tell apart from others in the same mission group/name sequence.
Have you ever had luck matching any stock sky colors to your farplane? I've tried in hopes that you wouldn't have to use the sky caulk all the time to boost FPS, but all my attempts fail. The colors seem to match in the editor and PSP, but when you load up the map they're not even close. Just curious, as I'm pretty much ONLY using caulk/sky now.
m4l0
Posted: Fri Jul 04, 2003 3:37 pm
by tltrude
Yours would probably work if you used "$world farplane (level.fogplane)". This is from the m4l0 map:
Code: Select all
level waittill prespawn
local.tempstring = "0.25 0.15 0.1"
level.farplane = 25000
level.farplanecolor = local.tempstring
You don't need the temp string stuff, unless you are going to change the farplanecolor during the game. Scripting farplane will overwrite what is set for worldspawn in the map.
Here is a thread I did that makes the farplane move in and back out when you throw a switch:
Code: Select all
farplane_on:
$farplane_trigger waittill trigger
$farplane_switch anim move
$farplane_switch playsound lighthouse_lever
$farplane_switch anim waittill animdone
$bulb1_off hide
$bulb1_on show
$farplane_corona show
$world farplane_color (.42 .42 .42)
wait .1
$world farplane 3900
wait .1
$world farplane 3800
wait .1
$world farplane 3700
wait .1
$world farplane 3600
wait .1
$world farplane 3500
wait .1
$world farplane 3400
wait .1
$world farplane 3300
wait .1
$world farplane 3200
wait .1
$world farplane 3100
wait .1
$world farplane 3000
wait .1
$world farplane 2900
wait .1
$world farplane 2800
wait .1
$world farplane 2700
wait .1
$world farplane 2600
wait .1
$world farplane 2500
wait .1
$world farplane 2400
wait .1
$world farplane 2300
wait .1
$world farplane 2200
wait .1
$world farplane 2100
wait .1
$world farplane 2000
thread farplane_off
end
farplane_off:
$farplane_trigger waittill trigger
$farplane_switch anim idle
$farplane_switch playsound lighthouse_lever
$farplane_switch anim waittill animdone
$bulb1_on hide
$bulb1_off show
$farplane_corona hide
wait .1
$world farplane 2100
wait .1
$world farplane 2200
wait .1
$world farplane 2300
wait .1
$world farplane 2400
wait .1
$world farplane 2500
wait .1
$world farplane 2600
wait .1
$world farplane 2700
wait .1
$world farplane 2800
wait .1
$world farplane 2900
wait .1
$world farplane 3000
wait .1
$world farplane 3100
wait .1
$world farplane 3200
wait .1
$world farplane 3300
wait .1
$world farplane 3400
wait .1
$world farplane 3500
wait .1
$world farplane 3600
wait .1
$world farplane 3700
wait .1
$world farplane 3800
wait .1
$world farplane 3900
wait .1
$world farplane 10000
thread farplane_on
end
Hope that helps!
Posted: Fri Jul 04, 2003 6:20 pm
by Bjarne BZR
level.fogplane is used by the weather.scr i think... or something... whaterver. I'll jast have to shop around for working skytextures then
Anybody know any good skytexture resources?
Here are one I know of:
http://www.teamhuh.net/raven/
Posted: Fri Jul 04, 2003 8:14 pm
by Bjarne BZR
Anybody know why the fog wont come out? Is it something in the shader? Of the sky texture?
Posted: Fri Jul 04, 2003 9:04 pm
by Alcoholic
so your saying the fog will clip things at the clip plane, but there is no 'fog'? can you show a pic?
hey tltrude, couldnt u make those threads a little shorter like this?
Code: Select all
local.farplane = $world.farplane
while (local.farplane > 2000)
{
wait 0.1
$world.farplane = (local.farplane - 100)
local.farplane = $world.farplane
}
Posted: Fri Jul 04, 2003 10:11 pm
by Bjarne BZR
Alcoholic wrote:so your saying the fog will clip things at the clip plane, but there is no 'fog'? can you show a pic?
Yes: that is exactly what I'm saying. Well put.
And yes, here are some pictures:
The bad results with farplane set to 2000 ( or was it 3000? ):
Same view with farplane set to 10000 ( Just to see what the LOD looks like "Over the hills and far away" ):
The good results with the sky textured with common/skycaulk ( exept I want fog without using that boring texture ):
Same view with farplane set to 10000:
THE MAIN PROBLEM IS NOT THE FOG, ITS THAT I AM A MORON...
After making and seeing these pictures I realize that it actually works just fine... its just that the terribly short farplane clips the LOD in plain view of the player and the player can see straight down at the skybox... and as it is not really a fog, but a discoloring of far away faces: it looks absolutely crap ( but I'm afraid it is correct crap ).
By comparing the first and third picture, you'll se that the terrain is "fog-blended" correctly... its just that it looks crap when the sky is "clear".

and

Sorry for wasting your valuable time by beeing stupid
And yes:
Alcoholic wrote:hey tltrude, couldnt u make those threads a little shorter like this?
Code: Select all
local.farplane = $world.farplane
while (local.farplane > 2000)
{
wait 0.1
$world.farplane = (local.farplane - 100)
local.farplane = $world.farplane
}
I would use the looped version ( even if the result is exactly the same ).
farplane script
Posted: Sat Jul 05, 2003 1:39 am
by tltrude
It would be cool to have a seperate farplane testing script that mappers could use to find the right settings for their map. It would need keys set to adjust the color and distance. And, it should print the current values to the screen. It might end up being used by cheaters, though, to reduce the farplane fog.
Posted: Sat Jul 05, 2003 6:10 am
by jv_map
Yeah matching fogs & skyboxes is always tricky. In my sp map I use a clear blue sky with some white clouds, but I still can't find a really suitable fog color. I use white fog but it looks silly near the blue sky

Posted: Sat Jul 05, 2003 12:12 pm
by bdbodger
What about useing skychaulk on the walls of the sky box and a sky texture on the top . I wonder what that will look like ?
Posted: Sat Jul 05, 2003 12:23 pm
by Bjarne BZR
It will look like this:
If you calibrate the fog color better and have a really high skybox... then maby you can get away with it... Ive got sunset colors on both fog and sunlight at the moment.
Re: farplane script
Posted: Sat Jul 05, 2003 8:43 pm
by Alcoholic
tltrude wrote:It would be cool to have a seperate farplane testing script that mappers could use to find the right settings for their map. It would need keys set to adjust the color and distance. And, it should print the current values to the screen. It might end up being used by cheaters, though, to reduce the farplane fog.
type 'pushmenu leveldesign' in your console during a map. theres a bar near the bottom left, and the farther it is to the right, the farther the fogplane is, the farther to the left, the closer, and if it's at the very left, it goes to your map defaults. to the right of that bar are some numbers u can type in to see what color the fogplane is.
just make a map with the sky you want, and try that tactic, and mess around with the colors until u find a good one.
Posted: Sun Jul 06, 2003 11:09 am
by bdbodger
I see that dosen't work I remembered that after I posted that it will look square . In the sample map for spearhead t2l1.map they use a simple patch mesh with a texture called t2fogplane it is a semitransparent texture a little like clouds . I looked for a shader for it but didn't find it in any of the shaders or I missed it , it may use tcscroll , or not . The mesh covers the whole map and they used skychaulk on the skybox . I know mohaa uses a tex called zorclouds maybe that will work or make a custom texture