Constraining visibility

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
inonzuk
Private First Class
Private First Class
Posts: 5
Joined: Thu Jul 23, 2009 9:08 pm

Constraining visibility

Post by inonzuk »

Hello,

I want to get the following effect of constraint visibility:
when I look at a box from 50 distance units away, it is visible.
backing up slowly it becomes blurrier until at some distance away it disappears from the view completely (let's say 100 distance units away).

I tried playing with the FOG parameters (both linear and exp/exp2) and I did not understand how to use them to get that effect. I assume I need to use the linear fog somehow, but how ?

Let's say the world size is 4000, how can I restrict my visibility to 100 distance unit away ? (i.e., every object located more than 100 unit from the tank location will not be seen by the tank).

Any advice of that would be more than welcome.
Thanks in advance
inonzuk
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Re: Constraining visibility

Post by trepan »

http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml

BZDB variables
_fogMode { none | linear | exp | exp2 }
_fogColor { all modes }
_fogStart { linear }
_fogEnd { linear }
_fogDensity { exp & exp2 }
Post Reply