Using a sky box.

Using a sky box.

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Using a sky box.

Post by mufdvr222 »

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


Image
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I'm not sure, perhaps just creating a square image in nvidia dds format, the way to put it in is through a tag in the map config file.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I'd like to know too. Not just vague allusions, not "Go read the source", but a detailed tutorial and and exemple map.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

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....
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

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
Yeha
Posts: 96
Joined: 13 Aug 2004, 19:12

Post by Yeha »

If you have a cubemap in dds format, put it in your maps directory and in the SMD file add the following line under [ATMOSPHERE] "SkyBox=yourskybox.dds;".
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

Thanks yeha :lol: and everyone.
Here is a link to that ATI app.
http://www.ati.com/developer/cubemapgen/
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

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 :shock:
Last edited by mufdvr222 on 08 Aug 2005, 10:59, edited 1 time in total.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Heck, I can't get it to stop exporting the base colors let alone image data.

:(
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I managed to plug Texture1.dds as a skybox for my map. Alantai, is that a younger you on the picture on the wall next to the christmas tree?
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Post by mother »

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.
After a buncha messing around...

Spring implements skybox's in 2d :P, it thinks 'South' is 'Down' so to speak.

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!)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

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.
User avatar
mother
Posts: 379
Joined: 04 May 2005, 05:43

Post by mother »

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.
Ok! That anwsers that. skybox cubemaps use a (to at least 2 of us) non-intuitive axis/face system.

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? :P
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Because this engine is based on TA units with TA scripts :P 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...
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

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.
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

[/quote]

After a buncha messing around...

Spring implements skybox's in 2d :P, it thinks 'South' is 'Down' so to speak.

In the ATIcubemapgen language: Z- is South, Z+ is North (I used Z+ for "Up" in a 3d sense) [/quote]

Can you tell me how to fix this in CubeMapGen.
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

zwzsg wrote:Spring also follow some regular convention, since it displays the exemple shipped by ATI fine.
zwzsg can you tell me where you got the example.dds that worked? I don`t seem to have it with my copy of CubeMapGen.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

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.
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

Thanks zwzsg, thats a nice tutorial :-).
This leavs the native spring sky for dead, although am disappointed to see a lot of pixellation in some of the clouds.
Image
Image
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I uploaded plugins to make dds textures cubemaps etc with maya photoshop etc....

I aint sure but I dont see any pics of me there, that aint even my christmas tree
Post Reply

Return to “Help & Bugs”