# Rayleigh phase function

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

## 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 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 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).

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632992
• Total Posts
3009755
• ### Who's Online (See full list)

There are no registered users currently online

×