Advertisement

.........and you call this fog?

Started by December 01, 2002 09:31 PM
4 comments, last by alphacentric666 22 years, 3 months ago
Is there real fog in OpenGL? The ''fog'' I learn from online tutorials are more like glurry lighting. I was expecting to make a cloud hover over my scene or make some kind of animated smoke or something. Know any tutorials that teach you real fog? "A programmer being told to ''''go to'''' hell sees the ''''go to'''' part of the sentence as the bad part."
"A programmer being told to ''go to'' hell sees the ''go to'' part of the sentence as the bad part."
If you want a ''cloud'' of fog/smoke rather then the whole scene being cloudy/smokey then i beleive you may need to use a particle engine of some sort. Ive never done this before so i dont know exact details, Im sure others can help.
Advertisement
Its simple... or maybe not

but the basics of it is just blur a bundle of translucent quads together in front of the camera and move them around... probably with a cloud texture on them.

at least, thats sortof how it was done for counter-strike
the normal OpenGL fogging effect is used to give the effect of distance focusing of a camera so that objects at a certain distance become blury...

I think what you are after is volumetric fog... so some searches and i''m sure you''ll turn something up on it (once you''ve corrected my pish poor spelling of it)
gametutorials.com has a good volumetric fog tut

-eldee
;another space monkey;
[ Forced Evolution Studios ]

::evolve::

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!

-eldee;another space monkey;[ Forced Evolution Studios ]
alphacentric666,
What you are looking for is volumetric fog. There are a lot of ways to implement volumetric fog, and even then they will not work in all cases.
You will need to outline the kind of application that the fog will have,

whether the fog can ever be entered (then u have to adopt some methods to fog the users view)
if not, then you can get by using glFogCoordEXT (like in the GameTutorials tutorial)

Even after all this the going aint easy. What if there are models inside the foggy area? Some methods handle fogging of this sort automatically, but others do not.

if you can be more clear as to what kind of worlds you render, and what exactly you need from the fog (I mean visually), then I might be able to help you more.

Hope this helps

HellSpawn
(^-^)

This topic is closed to new replies.

Advertisement