Sign in to follow this  
Slidexx01

Crytek Fog Volume

Recommended Posts

Slidexx01    275
Has anybody successfully implemented Fog Volumes the Crysis way. In object space everything is working nicely. But when I move fog box in world space it gets clipped away, because fog calculated information is still in object space. This is shader code from shaders.pak of Crysis, fogvolume.cfx. [ Removed copyrighted material. --Sneftel ] Any ideas... [Edited by - Sneftel on April 23, 2010 4:56:23 PM]

Share this post


Link to post
Share on other sites
Krohm    5030
I only read some presentations on their fog volume approach and I currently don't quite understand their algorithm.
With two supported primitives, box and ellipsoid, I don't quite understand why do they need a raytracer. They could just solve the quadratic/box equation... they probably need a raytracer as they need gradient fog but I had some not-so-fun with quadratics in past and I cannot quite understand why they are working on normal spheres and boxes...
The main issue was in transforming quadratic's domain correctly wrt world space.
POM is likely a resource/algorithm you can somehow adapt to procedurally build the whole thing, alternatively, you can have some basic quadratic support natively in your shaders (although that probably isn't quite as scalable as you'd like to).

By the way, do you have some additional links on the topic to share?

Share this post


Link to post
Share on other sites
phresnel    953
Quote:
Original post by Krohm
I only read some presentations on their fog volume approach and I currently don't quite understand their algorithm.
With two supported primitives, box and ellipsoid, I don't quite understand why do they need a raytracer.


Only a wild guess (having looked at the power point file), but maybe they need it for scattered light (i.e. crepiscular rays and the like).

Share this post


Link to post
Share on other sites
maya18222    194
Quick question : With the integrals in those equations, obviously they cant do the equation an infinite amount of times over the integral, so do they just take a number of predefined samples?

So when they have some integral over the hemisphere, do they just take a number of sample points like below? are they clustered? or what?

Share this post


Link to post
Share on other sites
InvalidPointer    1842
Quote:
Original post by phresnel
Quote:
Original post by Krohm
I only read some presentations on their fog volume approach and I currently don't quite understand their algorithm.
With two supported primitives, box and ellipsoid, I don't quite understand why do they need a raytracer.


Only a wild guess (having looked at the power point file), but maybe they need it for scattered light (i.e. crepiscular rays and the like).

I wish! While their crepuscular ray technique looks nice, it's really a horrendous hack. Think 'radial blur of (1-scene depth)' bad :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this