Containing fog

Started by
3 comments, last by Burzum 21 years, 6 months ago
I have a fog object in my openGL scene. Is it possible to locate the fog in a certain area of the scene so it''ll be absent from the rest of the scene ?? Death is certain, life is not...
Death is certain, life is not...
Advertisement
Fog coordinates, or you can roll your own fog routines. They often look better and are fully customizable.

[twitter]warrenm[/twitter]

I''m a bit of a neophyt in OpenGL, so can you tell me moreabout those fog routine ?

Death is certain, life is not...
Death is certain, life is not...
I''m a bit of a neophyt in OpenGL, so can you tell me more about that? Cause I didn''t see a function with location parameters for the fog

Death is certain, life is not...
Death is certain, life is not...
For fog coords:
glFogCoordfEXT is the function you want. It''s an extension, so read up on how to use those (http://www.opengl.org/developers/code/features/OGLextensions/OGLextensions.html), then grab the following sources:
http://www.mathies.com/cpw/textfiles/volfog.c.html
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg4.htm (Terrain #4)

For anything else:
*Research billboarding
*Research different blending modes, in particular additive blending and the usage of GL_MODULATE with gltexenvi
*Research Perlin Noise...might help when creating random fog patterns...
*Think about how you might be able to represent fog with a graphics API
*Ask more questions.

Peace,
ZE.

P.S. I''m being intentionally nebulous here to encourage you to get out there and learn the stuff, instead of just ripping off code. If you have specific issues, feel free to ask, though.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[twitter]warrenm[/twitter]

This topic is closed to new replies.

Advertisement