View Full Version : volumetric effects

10-02-2000, 10:22 AM
I have some questions about volumetric effects with OpenGL.

I want volumetric effects for:
- object-relative fog (imagine a character in the middle of your screen that walks in a foggy world. Objects far away from the character will be in fog. This is a view distance limitation in a 3rd person game).
- volumetric fog (fog as in Quake 3, only near to the ground, clouds, ...)
- volumetric light (fire, a room filled with glowing blue light, ...)

I had some ideas how to solve this:
-Some fog could be done with table fog or with fog textures (automatic coordinate generation from eye position), but I don't know much about these techniques.
-Another solution would be particles to simulate fire or small clouds.
-Per-vertex material color could help, but I think this is not possible in OpenGL.
-Drawing the whole scene twice: once normal, then without textures and lighting, just compute per-vertex fog color and blend. This would be quite slow I think.
-Setting the ambient color for every object to simulate volumetric light. Works only with lots of small objects.
-Include less volumetric effects

What do you think about my ideas? Has anyone got a better solution? I would appreciate any example, source or documentation, especially about table fog and these fog textures.