Game Development Community

Animated Skybox

by Chris Labombard · in Torque Game Engine · 04/19/2005 (9:56 am) · 16 replies

I have been looking through forum posts and resources and am wondering if anyone has gotten animated sky textures to work, either through bitmap lists (ifl?) or animated gifs?

If not then I will write my own. Does anyone have suggestions for giving Torque this functionality. Ive never worked with animated gifs or IFL lists before.

About the author

I have been a professional game programmer for over 5 years now. I've worked on virtually every platform, dozens of games and released a few of my own games, including 2 iPhone titles and a title waiting release on Big Fish Games.


#1
04/19/2005 (10:00 am)
IMHO the biggest barrier might be the fact that pngs don't animate, and AFAIK .gif isn't supported for skyboxes (could be wrong on this one).

On the otherhand, might be kinda kewl to try it.
#2
04/19/2005 (10:23 am)
No big deal, look at the IFL stuff and apply it to skyboxes.. That's what I'd do.

- Brett
#3
04/19/2005 (10:24 am)
Animated skyboxes would rock! I don't remember seeing anyone do that yet. please post what you learn about it, I'd love to be able to draw to the skybox!
(Hasn't made it to the top of my to-do list yet, though.)
#4
04/19/2005 (10:26 am)
Well, from reading the sky.cc code (I think that is the right file name) the image loading code doesn't appear to care if it is a bmp or not.. Mind you I havent looked very closely or tried anything... I also don't have access to an animated gif or a IFL list...

I am going to give it a try super quick tonight and see what happens. Maybe someone on irc can give me an animated gif or an IFL list?
#5
04/19/2005 (11:17 am)
Just a thought, but if you are trying to accomplish what I think you are trying to accomplish (day and night sky transition), you may want to take a look at the animatedButtons control and see if anything from there can be salvaged to use in your project.
#6
04/19/2005 (11:20 am)
I am trying to get a sky that does something other then just sit there... Ie.. Northern lights, or colours that change to make it look like the day is going by, or a close nebula that swirls a bit...

Day / Night doesnt interest me, and I believe it uses a basic sky colour, and not a normal sky bmp / dml file...
#7
04/19/2005 (2:39 pm)
Nope... animated gifs didn't work... neither did IFl files... If you could get the thing to look for gif's (it doesnt support them) you could probably get an animated gif to run
#8
04/19/2005 (3:04 pm)
You'll need lots of frames for a smooth animation, and that'll quickly eat VRAM.

With some coding, you might be able to use multiple skyboxes, and blend between them.
#9
04/19/2005 (3:09 pm)
So explain the difference between using multiple skyboxes and using a lif or animated gif? They are basically using the same amount of mem, since you would need just as many skyboxes to make it look good...
#10
04/19/2005 (3:43 pm)
Just a quick thought, you could achieve a nice Aurora effect, by swapping out your white clouds with some Psychedlic colors.
#11
04/19/2005 (5:29 pm)
This is true... but it still leaves the skybox looking dead for most of the scenes...
#12
04/19/2005 (5:33 pm)
Chris, I was saying look at the way that IFL's are implemented. Essentially you'd have cycled animations playing in place of the textures. Or, what about having an AVI be your skybox??

- Brett
#13
04/19/2005 (5:47 pm)
I created some animated skyboxes for a game called The Suffering, using Surreal's Riot Engine (which was also used on the game Drakan). Basically, it was done using a dome object created in Maya, that had multiple layers of translucent textures on it. With the Riot Engine I could point to the dome model and say, "use that object as a sky dome." The dome would be rendered in level wherever there was empty space, behind all the terrain, with the player's POV relative to the dome being locked to the dome's origin.

Then I could animate all the layers of textures using Maya's uv animation. So it's just multiple textures sliding over polygons. Really powerful technique for doing skies, but it only really looks right if you can blend translucent layers of textures.

I would loooove to see this get into Torque. No idea if there's a chance in hell Torque can do it :)

-Spencer

[edit]: re-reading the original post, I see you specified bitmap lists, that kind of animation. So, maybe what I suggested wasn't what you were looking for... but it's still really cool :)
#14
04/19/2005 (5:55 pm)
Spencer, what you are suggeting is already possible thanks to the cloud layers. :)

As far as the issue at hand, to me it makes the most sense to first change the skybox to a skydome. Then you can use a single ifl sequence or avi, rather than a sequence for each side of the box.
#15
04/19/2005 (6:35 pm)
@Adam:

True, you can do layering with the cloud layers, but AFAIK it's only on those layers, and those layers can only be planes... That limits the kinds animations you can do. I'm talking about animating uv's on domes, cylinders... whatever shape you can come up with in Maya. And animating the UVs in whatever direction you want. Also with the blending modes I'm talking about, you can get a greater variety of effects than what we can do. Animated rays of light from a sunset, that kind of thing.

I think you're on the right track with the dome suggestion, btw. I have a digital camera with fisheye, that can take pictures of the entirety of the sky. Something like this (not my photo btw). I've always wanted to catch a moving sky with that lens, and put it in a game.

-Spencer
#16
04/20/2005 (3:33 am)
Using an avi is not something I have thought about. I have never heard of someone applying an avi to a plane in Torque. The lif's dont appear to be capable of doing what I want them to do... So it looks like I will have to look into applying a movie to the planes, or turning it into a dome.. Doesnt really matter if it is a dome or a box...

What about using GameSwf? Could it be applied to a plane? Then I could have a flash movie of my backgrounds placed onto the skybox..