RealWorld sunlight script

Hello people,

I was looking for a automatic daylight system. but i could not find it.
So i made a start with a new script.
it is based on a paper “a practical anlytic model for daylight”

currently you can set:

  • Longitude/latitude
  • day of the yeah
  • Time

Then the position and rotation of the sun is calculated and a direct light is transformed.

What to do:

create a athmosphere that changes.
In text, create a dome. calculate colors. apply colors.
calculating the stuff is doable. the rest i have no idea :slight_smile:
So people who want to help are very welcome!

Wiki link : http://www.unifycommunity.com/wiki/index.php?title=SunLight

Comments and suggestion are ofcource very welcome!

This looks interesting.
I was just thinking the other day how this could be very usefull.

Not that I’m of any help here, just wanted to let you know there’s interest in this :smile:

I’ll have to try this. It would be cool to be able to use a “GRIB” ( GRIB - Wikipedia ) file to determine real time clouds and other environmental effects. Probably a -huge- undertaking to implement though. Have you seen this: http://www.unifycommunity.com/wiki/index.php?title=SkyboxBlended

He people.

I updated the script with an function that calcs sunlight color. but i’m not sure if its correct! so take a look at it and improve!!

Hey,

If you haven’t already may I recommend creating a page on the UnifyCommunity wiki that bigkahuna linked?

Need more scripts up there and it’s easier to look for scripts and tips there :slight_smile: