Fractal Sky
by Josef Jahn · in Torque Game Engine · 11/13/2002 (12:08 pm) · 46 replies
Well, there's one screenshot of my fractal sky in the Snapshot Gallery, so I thought maybe I should add another one in the forums:

The good news is that the only modification neccessary is inside sky.cc - however, once I'll have all the editor/scripting integration and the day/night transition done, you can be sure that there will be changes in other files too ;)

The good news is that the only modification neccessary is inside sky.cc - however, once I'll have all the editor/scripting integration and the day/night transition done, you can be sure that there will be changes in other files too ;)
#2
11/15/2002 (5:52 am)
So this is a mathmaticly generated sky then insted of from a texture file?
#3
11/15/2002 (5:57 am)
Yup. And it moves much more like real clouds do.
#5
11/15/2002 (6:33 am)
Sure. Don't expect perfectly clean code like Melv's wonderful stuff though ;)
#6
- Melv.
11/15/2002 (7:17 am)
Looks cool Joseph. Are the textures generated once @ start-up or are they completely dynamic?- Melv.
#7
Well I just generate the textures inside Sky::loadDML instead of loading the cloud texture from a file. No editor integration yet, and I don't really need to change anything at runtime because with 3 different layers of clouds you get the impression of a constantly changing sky. The sky dome has been "straightened" too, which looks best with visibilities of around 1800m.
The code is pretty messy, so please don't laugh once you see it. Always look at the results, and away from the code ;)
11/15/2002 (7:29 am)
Hi Melv!Well I just generate the textures inside Sky::loadDML instead of loading the cloud texture from a file. No editor integration yet, and I don't really need to change anything at runtime because with 3 different layers of clouds you get the impression of a constantly changing sky. The sky dome has been "straightened" too, which looks best with visibilities of around 1800m.
The code is pretty messy, so please don't laugh once you see it. Always look at the results, and away from the code ;)
#8
11/15/2002 (8:12 am)
I've just posted the code as a code snippet. At the time of this writing it hasn't been approved yet.
#11
-Edit-
Oh, I noticed your plan and the snapshot and comments you made, I have one question. Now that you know that your sky changes do not "have" to be shared do you still plan on releasing it to the public?
Sam
11/18/2002 (7:50 pm)
Im not a person that tends to just put any and every resource into my game unless I feel it will better it. This is and will be a very nice addition to the engine, Im looking forward to it.-Edit-
Oh, I noticed your plan and the snapshot and comments you made, I have one question. Now that you know that your sky changes do not "have" to be shared do you still plan on releasing it to the public?
Sam
#12
11/18/2002 (8:16 pm)
Sam. hes already made it a resource it just hasnt been approved so that basically answers your question :D
#14
I've added a console function for updating the sky, so far I have the fog fading in and out with different colors, so I'm hoping to be able to tweak some of the sky colors as well with this.
11/19/2002 (4:12 am)
Well I know a person can delete their resource before it gets approved thats why I asked. :PI've added a console function for updating the sky, so far I have the fog fading in and out with different colors, so I'm hoping to be able to tweak some of the sky colors as well with this.
#15
11/19/2002 (4:18 am)
The sky color is solely depending on the fog color. All my sky does is lighten or darken the sky in certain places.
#16
11/19/2002 (4:47 am)
Great, then the day/night illusion can be accomplished without worry, now just to get the lighting taken care of.
#17
http://hox.dhs.org/sky.cc
EDIT: Fixed URL....
Just drop it into your engine/terrain folder and recompile. If you could get the sun to cast light on the cloud planes, you'd get realistic atmospheric horizons basically for free!
11/19/2002 (4:53 am)
You can download my latest version of the code here:http://hox.dhs.org/sky.cc
EDIT: Fixed URL....
Just drop it into your engine/terrain folder and recompile. If you could get the sun to cast light on the cloud planes, you'd get realistic atmospheric horizons basically for free!
#18
Not meant to be a complaint by any means, but is there any way to reduce the "flatness" of the sky? It looks like someone took a picture of the clouds and glued it up there.
Other than that, it looks incredible! Submissions like this are what make torque's community really shine!
~ Sang
11/19/2002 (6:11 am)
Looks awesome!Not meant to be a complaint by any means, but is there any way to reduce the "flatness" of the sky? It looks like someone took a picture of the clouds and glued it up there.
Other than that, it looks incredible! Submissions like this are what make torque's community really shine!
~ Sang
#19
11/19/2002 (6:17 am)
I know what you mean. Well that's difficult. Volumetric clouds are one of the most difficult problems in realtime 3d for a reason. Obviously, simple polygons won't do the job. I wouldn't count on a particle system for this either. However, note that most cloud layers appear flat in real-life. IMO it's a reasonable tradeoff.
#20
11/19/2002 (6:30 am)
Hmm. Volumetric coulds certainly do look nice if you've got a game with a lot of high altitude flying, but for something ground level, you can unflatten your sky a bit by drawing it as a more tesselated, curved surface.

Torque Owner Sabrecyd