PDA

View Full Version : Quake 3 like FOG ???



stryx
03-23-2002, 08:43 AM
Have you seen the Fog in Quake 3 ?
I looked at the fog-tutorial at NeHe but there is only "OVER-ALL" fog.

You can only set the depth of the fog.

But how to set the dimensions of the area where the fog should be ???

Can anybody help me ?

Thanks,
StryX

davepermen
03-23-2002, 08:56 AM
you have to calculate it on your own. GL_EXT_fog_coord or how ever called could help, you can set like that a per vertex value how deep you are in the fog.

zed
03-23-2002, 11:10 AM
q3a doesnt use fogcoord it uses textures to simulate fog, theres at least 6 ways 'volumteric fog' can be done
some easy + some not (which usually give the best results http://www.opengl.org/discussion_boards/ubb/frown.gif)
have a serach on the net for 'volumteric fog'

stryx
03-24-2002, 02:43 AM
Should that mean, that Q3 Fog is done like this ??:

MAP IN SIDE VIEW:
=... is a blended fog texture
/ - \... is terrain

. . . . . . . ._________. . . . . . . . . . . . . . . . . . . . . . . . . . . . ._____
=====/#########\======================/###
====/###########\====================/####
___/#############\__________________/#######


But What happens if the camera is between two fog textures and looks at a wall ?
Then there is no fog ?

How can I solve this problem ?




[This message has been edited by stryx (edited 03-24-2002).]

zed
03-24-2002, 10:29 AM
one method is to draw the fog polygon OVER the wall polygon like what i do here http://uk.geocities.com/sloppyturds/volfog3.jpg

ThinIce
03-24-2002, 10:35 AM
Says the page is unavailable

DFrey
03-24-2002, 10:55 AM
ThinIce, copy and paste the link in your browser.

[This message has been edited by DFrey (edited 03-24-2002).]

ThinIce
03-24-2002, 04:32 PM
wow, cool! Thats amazing! Where did you learn to do stuff like that, if your don't mind my asking?