Mapdev:Howto skybox

From Spring
Revision as of 07:36, 31 May 2007 by Maelstrom (talk | contribs) (Minor syntax errors and cleanup.)
Jump to navigationJump to search

Skybox Information

This is going to contain notes about the creation of skyboxes aka cubemaps.

Skyboxes are created with a series of 6 separate images which form what we call a cube map. Below is an example of the skybox images that I created for a map.

this is what we call a cube cross
this is what we call a cube cross

Despite what you will see on many sites you do not need a cube cross for the creation of your skybox. You will be using six individual images. Each image represents a different face on an imaginary cube. Each face is applied to the cube that surrounds the map.

see how each side of the cube is it's own image
see how each side of the cube is it's own image

Here an image is being applied to the cubemap. See how each side of the cube is an image?

Skybox creation

Creating your 6 textures

You will need six images representing each side of your skybox. I will not go into any specific method of construction. There are tutorials out there for that. Just remember you will need 6 textures, front, back, left side, right side, top and bottom.

Creating your dds using the nvidia dds utilities

You will need these utilities from Nvidia's website: Texture Tools

Once you have downloaded and installed the tools you will need to created 2 files:

  • Compiledds.bat, and
  • cubemapfile.lst

Inside of compiledds.bat type in:

nvdxt -cubeMap -list cubemapfile.lst  -output cubemap.dds 
pause

This will compile your skybox to the name cubemap.dds, feel free to change the name. Also, the pause command will stop the the batch file and force it to wait before it closes, this will allow you to see any errors that may or may not occur.

Inside of cubemapfile.lst type in:

left.jpg
right.jpg
top.jpg
bottom.jpg
front.jpg
back.jpg

The .dds file created should be put in the maps/ directory with your maps .smd, .smf and .smt files.

Skybox notes

Do not do these:

Sizes that are not to the power of two. ATI cards have problems with sizes that are not a power of two. Reccomended sizes are: 256X256, 512X512 or 1024x1024.

Note: the batch will export a DXT5 or something like that and spring has an issue with the newest dds stuff. I will update the command for you gents soon. I thought I already had... my bad.

--Smoth 09:24, 25 Apr 2007 (CEST)