Fog

Id like to ask about fog. The fog that is shown in NeHe’s tutorials absolutely sucks, in my opinion. Look at the cool fog in Quake3 Arena, I beleive it is called volumetric Fog. Does anybody know of any good tutorials on better types of fog? Any fog at all that is better than the default OpenGL one would do.

There is an extension to allow you to give a fog value per a vertex giving volumetric fog.
Don’t know the exact name…

Tim

the extension name is fog.dll

The extensions for passing your own fog coordinates is called GL_EXT_fog_coord. fog.dll sounds more like a file that doesn’t belong to OpenGL at all.

Does anybody know of a good example program that uses the extention, or a tutorial or something I can learn from?

an example on my site (url profile) beware its not cool

In QuakeIIIArena, Carmack used many opaque triangles to simulate fog. With GL_FOG you cannot achieve volumetric fog. Triangles are needeed, because ordinary GL_FOG appeares only on other triangles and doesn’t fill empty space. If you are using triangles, you can fill empty space with fog ( like in Unreal and QuakeIIIArena). If you are standing in the front of this kind of fog you cannot look behind it. With GL_FOG only walls would be covered, and empty space would be not.

In QuakeIIIArena, Carmack used many opaque triangles (it looks like triangles) to simulate fog. With GL_FOG you cannot achieve volumetric fog. Triangles are needeed, because ordinary GL_FOG appeares only on other triangles and doesn’t fill empty space. If you are using triangles, you can fill empty space with fog (like in Unreal and QuakeIIIArena). If you are standing in the front of this kind of volumetric fog you cannot look behind it. With GL_FOG or even GL_EXT_fog_coord only walls would be covered, and empty space would be not.

For what it’s worth, there’s a video on Gamasutra that shows Brian Hook talking about Quake3’s features. He talks about the fog technique more than anything else. The video is in the GDC '99 collection.