Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Day/Night Cycle?

Author
Message
FireIndy
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: US of A
Posted: 21st Dec 2008 04:13
I dont know where to start looking for this. I know what Im doing in C++ and know the DB engine ok, but where should I start looking to achieve a day/night cycle. I mean, I know a cycle isnt going to be perfect. But does anyone have any type of links to some information on anything? lol. I know this may sound vague, but Ive been looking over google for days to help point me in the right direction. So any help is appreciated.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Dec 2008 06:33
I've tried various techniques.. and I can see how its frustrating but I heard a rather surprising technique in another forum that seems almost nuts... but it might do the job. Evidently there is a program that can create skysphere textures based on various information - and I guess you can make the thing render a whole day (and/or night) of transitions... that is make a ton of textures and literally change the textures on a timer - but this sounded nuts to me but evidently the fella doing it let's a machine run for weeks rendering and gerating these "still" skysphere textures... and says the results are incredible..

I personally would work on a "sun and sun flare" sorta thing where the sun moved and was tied into whatever shadows system I had working and go from there.

I know this post doesn't have solid links etc - but maybe it'll serve as food for thought
--Jason

FireIndy
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: US of A
Posted: 21st Dec 2008 16:37 Edited at: 21st Dec 2008 16:39
Wow, still images for everything? That would take forever lol. That would also mean, if you changed your "skysphere", you would have to generate another set of these images that serve as the cycle. And that seems really tedious if you ask me. I think moving objects would be more functional. But thanks for that Jason. Yah, I was planning on doing something with moving objects for a sun and moon. I just need a starting point, so I think when I get the chance, Ill start by creating the sun object first, and position that first, then add a moon later. Ill keep looking for any information on a cycle like this.

If anyone else has any input, that would be great too.
-Dave

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 22nd Dec 2008 03:32 Edited at: 22nd Dec 2008 03:37
Hmmmm.

I would say, you can have 3 different layers of spheres. One on the outside, that you gradually change the color of from light to dark blue, ie from day to night. The second sphere will have the sun and moon textured onto it, sun on one side and moon on another. This sphere will rotate as the other changes color, and as the outside sphere gets darker, the moon will appear and the sun will lower out of sight. The third, innermost sphere will have extra features such as clouds and stars on it, and when it's day the clouds will be visible and as the day advances it'll rotate, until it's night and then the stars will be visible. That might've been a bit unclear but if you have any questions about it feel free to ask.

EDIT: I'm gonna make a little animation in Blender to see how it looks.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Dec 2008 08:23
Well - yeah - It wasn't my idea LOL - still images - but I figure if the guy needed to let his machine cook like he said to render such awesome "stills" - might be interesting.. LOL - but hardly slow I'd think in game - but perhaps some serious harddrive gulping eh?

I like the day night cycle approach using skypsheres. with a little extra work you could get true moon phases,sun,date time for specific geography if you wanted. If some ancients could make a "watch like" device capable of tracking planets, the moon, sun, and even take into account leap year.. then we should be able to do it on a PC

--Jason

FireIndy
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: US of A
Posted: 22nd Dec 2008 14:43
Hmm. I may of misunderstood what you guys are saying, but are you saying that have spheres around my terrain, and each one has certaim images on half of it?

I think I misunderstood that actually lol. Care to explain a little more? Thanks.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 22nd Dec 2008 17:24
Quote: "I think I misunderstood that actually lol. Care to explain a little more? Thanks."


You have three different sky spheres. One has no texture, just color. The color changes according to the time, as night approaches the sphere gets darker, and as day approaches it gets lighter.

The second sphere in is textures with a sun on one side and a moon on the other. This sphere rotates along with the first, and as the first gets darker and night approaches, the moon rises, and when the sky gets lighter and day comes the sun appears.

The third sphere rotates the same way the sun-moon one does, except it's textured with clouds, for daytime, and stars, for nighttime.

I'm working on a little demo of this, if can get it done by tonight I'll post it here.

Login to post a reply

Server time is: 2024-11-25 09:18:35
Your offset time is: 2024-11-25 09:18:35