Sign in to follow this  

atmospheric scattering implementation issue

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ignoring emission, the book Physically Based Rendering gives the following formula for the amount of light added to a point due to in-scattering as: S(p,w) = o_s(p,w) * SphericalIntegral( phaseFunc(p,-w'-->w)*L_i(p,w')dw' ) where o_s is the scattering coefficient (probability density of light scattering per unit length), L_i is the incoming radiance at p from direction w'. For implementing this in real-time for atmospheric perspective, where does one obtain L_i(p,w')?? If I just have the sun as the only light source, how am I supposed to come with a function describing the incoming light at any point from any direction?

Share this post


Link to post
Share on other sites
Quote:
Original post by Quat
Ignoring emission, the book Physically Based Rendering gives the following formula for the amount of light added to a point due to in-scattering as:

S(p,w) = o_s(p,w) * SphericalIntegral( phaseFunc(p,-w'-->w)*L_i(p,w')dw' )

where o_s is the scattering coefficient (probability density of light scattering per unit length), L_i is the incoming radiance at p from direction w'.

For implementing this in real-time for atmospheric perspective, where does one obtain L_i(p,w')?? If I just have the sun as the only light source, how am I supposed to come with a function describing the incoming light at any point from any direction?


Well, for simplicity you can assume that light comes only from the sun and that should be enough to provide you with visually reallistic results.

But for more physically accurate and reallistic results you could take into account the light that comes from all directions. While most of the light comes from the sun direction, a small part of it comes indirectly from the scattering of the sun light on other particles in the atmosphere. This is REALLY expensive to process and thus can't be generated in real-time. If you're targeting real-time atmospheric scattering, it's enough to take into account only the light that comes directly from the sun.

Share this post


Link to post
Share on other sites
Quote:
Original post by jcabeleira
This is REALLY expensive to process and thus can't be generated in real-time.
You can however do this in real-time if you perform a little pre-calculation. Eric Bruneton has a paper and demo on the subject.

Share this post


Link to post
Share on other sites

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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