Sign in to follow this  
Ilici

Skylight color calculation

Recommended Posts

Is there any way to calculate the color of sun/skylight on clouds? Any papers on this? As my sky color model I'm using "A Practical Analytical Model of Daylight". I have a cloud system working nicely but I want to find what color I should use for the clouds depending on the time of day, the position of the sun, altitude of the clouds etc.. anything to make it look realistic. My other option would be to construct the color table myself but that requires too much artistic creation of my lacking self. I guess it would be easy to use pictures but the altitude affects the color in a rather unique way and I don't think I'd find enough photos for that.

Share this post


Link to post
Share on other sites
Hi.

I wrote an article on realtime clouds lighting in Game Programming Gems 5 (see this page for shots). Essentially, you have to do raytracing from the sun to the cloud voxel, and compute the cloud color based on the distance that the sunlight travels.

=[dEkS]=

Share this post


Link to post
Share on other sites
Quote:
Original post by deks
Hi.

I wrote an article on realtime clouds lighting in Game Programming Gems 5 (see this page for shots). Essentially, you have to do raytracing from the sun to the cloud voxel, and compute the cloud color based on the distance that the sunlight travels.

=[dEkS]=


Wow, that's so awesome!

1. Does the raytracing take care of calculating the color not just the shading?
2. For the cloud color before shading do you start out with the color in the skydome at the sun?
3. What sky coloring model do you use? (looks like "Practical analytical model of daylight" to me.

I don't have shaders but some kind of CPU raytracing should work. The technique I use (Harris) to shade the clouds does calculate the scattering integral without raytracing, but only calculates shading, the color is given by artists.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ilici
1. Does the raytracing take care of calculating the color not just the shading?
2. For the cloud color before shading do you start out with the color in the skydome at the sun?
3. What sky coloring model do you use? (looks like "Practical analytical model of daylight" to me.


1-2. Yes. The color is (lighting_integral * suncolor) + some tweaks based on elevation/angle.

3. You're right. :) The sky color is precomputed though, but usnig Spherical Harmonics scattered through the day and interpolating the SH coeficients would do the job pretty fast IMO.

Please post some shots of your work!

=[dEkS]=

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