Jump to content
  • Advertisement
Sign in to follow this  
Ilici

Skylight color calculation

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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!