Page 1 of 1
Fog

Posted:
Thu Jul 03, 2008 8:56 am
by Frits
What do I have to change in this piece of text to get a little fog back?
I don't understand where all the values stand for.
#--Fog settings--
#Graphics.Renderer.SetYon float yon
#Visibility distance
Graphics.Renderer.SetYon 100000
#Graphics.Renderer.Fog.SetDefLinear float start, float end, float density
#Fog depth
Graphics.Renderer.Fog.SetDefLinear 1 1000 1
#Graphics.Renderer.Fog.SetDefExp2 float end, float density
#Graphics.Renderer.Fog.SetDefExp2 100000 20
#Graphics.Renderer.Fog.SetDefColor float r, float g, float b
Graphics.Renderer.Fog.SetDefColor 0 0 0
#Graphics.Renderer.SetClearColor float r, float g, float b
Graphics.Renderer.SetClearColor 0 0 0
Regards,
Frits
Re: Fog

Posted:
Thu Jul 03, 2008 9:50 am
by Jojon
All those lines beginning with a # mark are comments and gives a few hints about what the following line does. "Float" tells you that the following named parameter is a number with a fractional part, i.e. it can have decimals, not just "whole numbers".
So, with the linear fog params, you have the three values:
start - At this distance from you, there is no visible fog
end - Everything that is this far from you and farther, is lost in the fog (if density is 1). This would be the value you want to decrease.
density - Maximum effect by the fog thickness, i.e. what you have at the end distance and beyond.
Somebody else wil have to explain the square parameters. :7
Re: Fog

Posted:
Thu Jul 03, 2008 10:01 am
by Kato
SetYon - Visibility distance.
SetDefLinear - Fog density if I recall
SetDefColor - Color of the fog
SetClearColor - Sets the color when there's nothing to display on the screen (which should never happen, but will if a bug occurs)
At least I'm pretty sure of it.
-Kato
Re: Fog

Posted:
Fri Jul 04, 2008 1:27 am
by Frits
Thanks guys, now it gets a little clearer to me but this leaves me with a question though;
The values for: float start, float end, float density are 1, 1000, 1 so there should be any fog.
Do I have to change the values for float r, float g, float b to make it visible?
Regards,
Frits
Re: Fog

Posted:
Fri Jul 04, 2008 9:07 am
by andylegate
No, like Kato said, that would be if there was a bug in the rendering, if I remember correctly. You can leave those set to 0.
Re: Fog

Posted:
Fri Jul 04, 2008 3:15 pm
by Jojon
Hmm, if it is your skydome that stubbornly resists the mist shroud, that is exactly you'd expect if you have the "NoMist" button (material property) selected.
Re: Fog

Posted:
Sat Jul 05, 2008 12:49 am
by Frits
Thanks guys, sorry for not being clear but with the float r, float g, float b I mean the values for SetDefColor Andy .
I'm going to try the 'NoMist' button Jojon.
Regards,
Frits