
Using a sky box.
Moderator: Moderators
Using a sky box.
Can someone give me a little more info on how to implement a skybox, assuming I have a .dds sky I want to use.


After a quick bout in google
http://www.coolpowers.com/projects/xbmc ... _howto.txt
That has a short bti at the top describing dds and howto make them sorta.
http://msdn.microsoft.com/archive/defau ... toshop.asp
Thats soemthing on opening and savign dds format in photoshop and paintshop pro. It explains howto sue the tools and photoshop to produce dds textures and cubemaps.
I think adding it to the map is as simple as adding a tag, not sure what ti is, soemthing like skybox = sky.dds or soemthing....
http://www.coolpowers.com/projects/xbmc ... _howto.txt
That has a short bti at the top describing dds and howto make them sorta.
http://msdn.microsoft.com/archive/defau ... toshop.asp
Thats soemthing on opening and savign dds format in photoshop and paintshop pro. It explains howto sue the tools and photoshop to produce dds textures and cubemaps.
I think adding it to the map is as simple as adding a tag, not sure what ti is, soemthing like skybox = sky.dds or soemthing....
I rummaged around and found a few things that might be useful.
Uploaded to fileuniverse.
http://www.fileuniverse.com/?p=showitem&ID=1275
Direct X 9 SDK plugins for Maya 3DS Max and Adobe Photoshop/Jasc PaintshopPro.
http://www.fileuniverse.com/?p=showitem&ID=1274
A few programs from the DirectX 9 SDK for textures, I dont knwo if they work or not.
And an example dds cubemap http://www.fileuniverse.com/?p=showitem&ID=1276
Uploaded to fileuniverse.
http://www.fileuniverse.com/?p=showitem&ID=1275
Direct X 9 SDK plugins for Maya 3DS Max and Adobe Photoshop/Jasc PaintshopPro.
http://www.fileuniverse.com/?p=showitem&ID=1274
A few programs from the DirectX 9 SDK for textures, I dont knwo if they work or not.
And an example dds cubemap http://www.fileuniverse.com/?p=showitem&ID=1276
First attempt and Spring crashes when trying to load the map with that usual windows message,,
""Spring.exe has generated errors and will be closed by windows.
You will need to restart the program.
An error log is being created.""
This message appears the moment "loading units and weapons" appears.
edit,, I got it working, the .dds has to be in spring\maps not the compressed maps folder with the map files and .smd.
but there is a small problem, its all wacky
""Spring.exe has generated errors and will be closed by windows.
You will need to restart the program.
An error log is being created.""
This message appears the moment "loading units and weapons" appears.
edit,, I got it working, the .dds has to be in spring\maps not the compressed maps folder with the map files and .smd.
but there is a small problem, its all wacky
Last edited by mufdvr222 on 08 Aug 2005, 10:59, edited 1 time in total.
After a buncha messing around...mufdvr222 wrote:edit,, I got it working, the .dds has to be in spring\maps not the compressed maps folder with the map files and .smd.
Spring implements skybox's in 2d
In the ATIcubemapgen language: Z- is South, Z+ is North (I used Z+ for "Up" in a 3d sense) and it ended up being half hidden under the horizon with a big empty (Z-) face to the south, since I saw no reason to make a sky for the side of the planet under the ground
Now the question is, do we screw w/ the axis in the .dds or fix it in spring, or is this really how its supposed to work :)
PS Anyone else getting MASSIVE .dds files? Im thinking maybe we'll come up with a handfull of options heh. (non-real starscape done at 1024 ended up ~24mb!)
Ok! That anwsers that. skybox cubemaps use a (to at least 2 of us) non-intuitive axis/face system.zwzsg wrote:I just installed ATI Cube Thingy, copied all the C:\Program Files\ATI Research Inc\CubeMapGen v1.0\Textures\CubeMaps\*.dds into my Spring60b1 maps folder, and it works fine: Up is up, down is down.
Z is definitely not up/down, it is longitudinal. still trying to figure which way x&y go... Though I *think* Y is up/down like in the confusing smd sundir stuff...
Come to think of it, is this like some kinda OpenGL vs EveryOtherCoordinateStandard in the world thing? Since when is the third dimension Y?
Because this engine is based on TA units with TA scripts
The Y-axis was up (towards the camera) in TA, the z-axis was north-south (or in the sense of a unit, forward-backward), and the x-axis was east-west (left right in unit terms). Spring just uses that same axis orientation so all scripts and crap don't have to be recompiled...
Spring also follow some regular convention, since it displays the exemple shipped by ATI fine.
.dds can indeed be huge. A six 1024² faces skybox made me a 100 MB file. However they compress very well. The same took about 4MB when 7-zipped. Really too bad Spring.exe can't read zipped dds. Also, that same 6 1024² faces skybox made my Spring lags terribly.
.dds can indeed be huge. A six 1024² faces skybox made me a 100 MB file. However they compress very well. The same took about 4MB when 7-zipped. Really too bad Spring.exe can't read zipped dds. Also, that same 6 1024² faces skybox made my Spring lags terribly.
Two .dds that were found working:
- C:\Program Files\ATI Research Inc\CubeMapGen v1.0\Textures\CubeMaps\SpaceSky512.dds
- http://www.fileuniverse.com/spring/Texture1.dds
Another dds in the exemple CubeMaps was found NOT working.
Instruction to make your own dds:
- Make four images. Any common image format (.bmp, jpg, .png, etc...). I only tried 1024x1024 and 512x512, and I think you have to use 16millions colors. But maybe other images are possible, I just haven't tried.
- Install http://www.ati.com/developer/cubemapgen/
- Run it
- Select Cube: X+ Face <1>
- Load CubeMap Face <F> : choose your face1
- Select Cube: X- Face <2>
- Load CubeMap Face <F> : choose your face2
- etc.. until you get all 6 faces.
- Not that for me nothing save a white circle shows in AtiCubeMapGen, but anyway, it works.
- Save CubeMap (.dds): save it into /Spring/maps/
- Then in your map .smd add SkyBox=yourskybox.dds; in the [ATMOSPHERE] like yeha said.
- Run Spring and it should work.
The orientations are:
X+ Face1 West
X- Face2 East
Y+ Face3 Up
Y- Face4 Down
Z+ Face5 North
Z- Face6 South
All side faces are: up in the image = up ingame
Down is: up in the image = north ingame
Up is: up in the image = south ingame
All faces are mirror-inverted.
- C:\Program Files\ATI Research Inc\CubeMapGen v1.0\Textures\CubeMaps\SpaceSky512.dds
- http://www.fileuniverse.com/spring/Texture1.dds
Another dds in the exemple CubeMaps was found NOT working.
Instruction to make your own dds:
- Make four images. Any common image format (.bmp, jpg, .png, etc...). I only tried 1024x1024 and 512x512, and I think you have to use 16millions colors. But maybe other images are possible, I just haven't tried.
- Install http://www.ati.com/developer/cubemapgen/
- Run it
- Select Cube: X+ Face <1>
- Load CubeMap Face <F> : choose your face1
- Select Cube: X- Face <2>
- Load CubeMap Face <F> : choose your face2
- etc.. until you get all 6 faces.
- Not that for me nothing save a white circle shows in AtiCubeMapGen, but anyway, it works.
- Save CubeMap (.dds): save it into /Spring/maps/
- Then in your map .smd add SkyBox=yourskybox.dds; in the [ATMOSPHERE] like yeha said.
- Run Spring and it should work.
The orientations are:
X+ Face1 West
X- Face2 East
Y+ Face3 Up
Y- Face4 Down
Z+ Face5 North
Z- Face6 South
All side faces are: up in the image = up ingame
Down is: up in the image = north ingame
Up is: up in the image = south ingame
All faces are mirror-inverted.


