Sign in to follow this  

Rayleigh phase function

This topic is 2849 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

I am a bit confused because I am seeing two different definitions of the Rayleigh phase function. Nishita's paper (Display of the Earth Taking into Account Atmospheric Scattering) gives it as 3(1+cos^2(theta))/4. However, the paper by Hoffman (Rendering Outdoor Light Scattering in Real-Time) gives it as 3(1+cos^2(theta))/(16*pi). So they differ by a factor of 4pi. Also, the Physically Based Rendering book implements it like Hoffman: COREDLL float PhaseRayleigh(const Vector &w, const Vector &wp) { float costheta = Dot(w, wp); return 3.f/(16.f*M_PI) * (1 + costheta * costheta); } The only reason I can think that Nishita's is different is because Nishita doesn't take into account multiscattering by integrating over the sphere. It just does single scattering from the sun. So it compensates by scaling by 4pi. Anyone know the explanation?

Share this post


Link to post
Share on other sites
The Rayleigh phase function may differ between implementations because it is just an approximation to the real behaviour of light scattering.
I would have to plot the functions you talked about to understand the behaviour of each one, but it's likely that they're different because they're developers wanted to simulate rayleigh scattering with more or less physical accuracy.

This may be necessary because the physically accurate Rayleigh phase function tends to darken some parts of the sky too much, specially when only single scattering is considered. In fact, the GPU Gems article about atmospheric scattering even sugests that no rayleigh phase function is used because it generates a more uniform sky.

To sum up, the phase function you use should depend on the physical accuracy that you're targeting, an you should only use an accurate phase function if you take into account multiple scattering.

Share this post


Link to post
Share on other sites
The factor of 4 pi depends on how you define integration over the sphere. Sometimes it makes sense to define your phase function so that when you integrate over the whole sphere you get 4 pi (the area of the unit sphere). For other purposes it makes sense to normalize the whole thing so that when you integrate over the sphere you get 1. It really doesn't matter as long as you're consistent and the scattering conserves energy (i.e. you shouldn't have more reflected light than incoming light).

Share this post


Link to post
Share on other sites

This topic is 2849 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