Is there any possibilities to create fog with OpenGL which isn’t regular. The fog should be thinner at some places and thicker at some places. Is this possible or is GL fog always like a box with no irregularity?
There exists an extension which allows you to set the fog coordinate after your own head. By doing your own fogging calculations you should be able to get OpenGL to assist your quest for volumetric fog.
But the vanilla fog in OpenGL is always based on eye-to-vertex distance.
[This message has been edited by macke (edited 04-24-2001).]
If you have 3D textures, you can do irregular fogging with that. Unfortunately, you may have to re-calculate the 3D texture entirely if the camera (or the fog) move.
As Macke mentioned EXT_FOG_COORD lets you pass your own fog value into GL. Check out the following link for a sample progam that uses this extension to show a height based fog:
Or you could generate alpha values based on depth, write them to dest. aplha and the blend a huge (animated) noise texture over the scene. It might be a bit obvious that the fog isn’t volumetric though.
You could try to use particle systems generating a 3D distribution with perlin noise…