View Full Version : Random fog ?
04-24-2001, 07:17 AM
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?
04-24-2001, 07:22 AM
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).]
04-24-2001, 08:39 AM
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.
04-24-2001, 09:01 AM
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:
04-25-2001, 02:31 AM
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.
04-25-2001, 03:42 AM
You could try to use particle systems generating a 3D distribution with perlin noise...
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.