volumetric fog (FlyFire)

Started by
23 comments, last by Nick Murphy 24 years, 7 months ago
Here is a simple answer:
i post this question when old message board was active. Since new one was opened, Nick repost all messages from old to the new one.

FlyFire/CodeX
http://codexorg.webjump.com

Advertisement
True volumetric fog involves solving the line integral between the camera and the surface on which you want the fog projected. The line integral is essentially a sum of the density of the fog over a large number of tiny steps which, taken as a whole, add up to the distance from the camera to the surface.

Volumetric fog can be approximated by calculating the fog color at each vertex of the tris over which the fog will be projected and interpolating the values in between vertices. OpenGL has an extension to specify fog colors for a vertex (much like texture coordinates).

For those mathematically inclined, the line integral is much like integrating f(x)dx, except dx is now a vector and x is a point in space. Or something like that. This stuff is usually covered in an advanced calculus course in college.

Hi !!

I have an example and a very (64 KB) article about volumetric fog done a few days ago.

Go to www.voodoospotlight.com/devknowledge/index.html

There you will find the article, an executable showing my algo and full source-code. You will need Power Render to recompile, however it's understandable even if you never heard about Power Render before.

Just check it out. I got a lot of positive feedback on my article. I think all answers here are covered in my article.

Phillip Schuster

Phillip Schuster
anyone have any ideas how to implement it?
thanx
Umm... why is Nick Murphy arguing with himself?
-Andreas

This topic is closed to new replies.

Advertisement