Fog

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Fog

Postby Frits » Thu Jul 03, 2008 8:56 am

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
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Fog

Postby Jojon » Thu Jul 03, 2008 9:50 am

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
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Fog

Postby Kato » Thu Jul 03, 2008 10:01 am

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
Image
(explorer card designed and created by me)
User avatar
Kato
 
Posts: 315
Joined: Fri Sep 28, 2007 8:02 pm
Location: South USA

Re: Fog

Postby Frits » Fri Jul 04, 2008 1:27 am

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
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Fog

Postby andylegate » Fri Jul 04, 2008 9:07 am

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.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Fog

Postby Jojon » Fri Jul 04, 2008 3:15 pm

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.
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Fog

Postby Frits » Sat Jul 05, 2008 12:49 am

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
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am


Return to Building

Who is online

Users browsing this forum: No registered users and 8 guests