Useless comment but yeah... i was doing this sort of thing at one point a couple years ago too and after i worked out the math i realized that it doesnt get darker linearly near sunset, it's "exponential" (well, really, the shape is just a quadrant of a circle hehe). I didn't believe it 100% so i paid attention the next time it was sunset and realized it was in fact true. Just thought it was interesting :P On Fri, Jul 15, 2011 at 8:29 AM, Charlie Lobo <charlie.lobo@xxxxxxxxx>wrote: > Hmm, well if you want the position of the sun in the sky (in radians) you'd > do something like: > time(in miliseconds) * 2*PI / 86400000 > Of course this doesn't matter when the sun is hidden > If you want more elaborate sun movement, you have to consider that the > sun's path "wobbles" from north to south as the year goes by due to the > inclination of the planet's rotatoinal axis. It's also shifted north or > southwards depending on the latitude. > > > On Fri, Jul 15, 2011 at 10:22 AM, Roger Durañona Vargas > <luo_hei@xxxxxxxx>wrote: > >> Im trying to implement a day/night cycle in my game with some sort of sun >> movement affecting shadows, but I have faced a few problems. First I tried >> to use Caelum, which is a plugin for Ogre which manages sky, sun, >> precipitation, fog, etc, but the lack of help made me desist two times from >> using it. >> so, Im trying the basic approach, doing it myself. The problem is that I >> dont know how to determine the position for the light source according to >> the time to simulate the sun trajectory on the sky. Also, I havent found any >> reference about the right parameters to simulate the light intensity and >> color for different day times: morning, midday, dusk... Can somebody give me >> a help? >> >> -- >> Roger D. Vargas >> Using Gentoo Linux 2010 >> La unica forma de encontrar los limites de lo posible es yendo mas >> alla de ellos, hacia lo imposible >> >> >> --------------------- >> To unsubscribe go to >> http://gameprogrammer.com/**mailinglist.html<http://gameprogrammer.com/mailinglist.html> >> >> >> >