Sign in to follow this  

Atmospheric Scatting Help

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

I am implementing Atmospheric Scattering based on the paper by Nishita to color my sky dome. First, I am just using Rayleigh scattering and after I debug that I will add Mie scattering. The good news is that I am at least getting a blue sky, but I am not getting a sun and I am not getting an orange/redish sunset. I think one of the problems is that I always center my sky sphere around the camera (so it is like my camera is at the center of the earth instead of on the surface of the earth). Therefore, I never would get a sunset because light the distance light travels to the eye is always the same. For the purposes of calculating the sky color, is the fix to just move the eye position as if it were on the earth's surface, but still render the sky sphere centered about the eye so the camera never gets "closer" to it? Also, there is a value I_s (solar radiation) which is the light coming from the sun before hitting the atmosphere. What kind of value would this be. It seems like when doing this physically based rendering, you no longer describe light values in a normalized [0,1] range.

Share this post


Link to post
Share on other sites
If the skydome being alway centered around the eye was the reason for not getting a sunset, then that would mean a person standing in the same location(in the real world) between sunrise and sunset would not see either. Scattering along with the direction of the sun vector would dictate sunrise/sunset. As far as the sun is concern, I think its actually Mie scattering that is responsible for that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Quat
First, I am just using Rayleigh scattering and after I debug that I will add Mie scattering.
Quote:
Original post by cgrant
As far as the sun is concern, I think its actually Mie scattering that is responsible for that.
cgrant is correct - you will not see a sun image without mie scattering.
Quote:
For the purposes of calculating the sky color, is the fix to just move the eye position as if it were on the earth's surface, but still render the sky sphere centered about the eye so the camera never gets "closer" to it?
That sounds like a reasonable fix.



You might consider that these questions really don't merit entirely new threads of their own. Both of your follow-up questions could have been posted in the original thread.

Share this post


Link to post
Share on other sites
Quote:

If the skydome being alway centered around the eye was the reason for not getting a sunset, then that would mean a person standing in the same location(in the real world) between sunrise and sunset would not see either.


I'm not saying I know the cause, but what I wrote was my guess. From my understand, the farther the light travels, the more blue light is scattered away, which is why you get orange/red at sunset. Since my eye is at the center of the sphere, the distance from a point on the atmosphere to the eye is always the same. So I think I need to model more accurately the eye being on the surface of the earth. However, since the user is always on the ground, I want the skysphere to move with the camera still.

Share this post


Link to post
Share on other sites
Quote:
Original post by Quat
For the purposes of calculating the sky color, is the fix to just move the eye position as if it were on the earth's surface, but still render the sky sphere centered about the eye so the camera never gets "closer" to it?


Exactly. Although your camera is located on the center of the sphere, the position you should pass to the algorithm must be the camera position above the earth surface. For example:
if your original camera position is : (0, 10.0, 0)
your camera position above the surface should be: (0, earth_radius+ 10.0, 0)

Without this adjustement your sky will always look wrong.

Quote:
Original post by Quat
Also, there is a value I_s (solar radiation) which is the light coming from the sun before hitting the atmosphere. What kind of value would this be. It seems like when doing this physically based rendering, you no longer describe light values in a normalized [0,1] range.


Well, that's a rough question. In practice what you want is to generate a color in the RGB format for your, but for physically accurate rendering you should probably represent sun light in some kind of radiation format. Of course this is very complicated so the common approach taken by many implementations is to represent sun color as a very bright white, which goes outside the [0, 1] range.

Share this post


Link to post
Share on other sites
Quote:

Of course this is very complicated so the common approach taken by many implementations is to represent sun color as a very bright white, which goes outside the [0, 1] range.


Thanks for the reply. And is that "very bright white" just determined by experimenting as to what looks good?

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