First of all, you don't say how much you know about creating Skyboxes, so I'll start with the basics. Apologies if it's too basic!
This is all written for the DB Classic user by the way - not sure about DB Pro...
What Are Skyboxes?
Skyboxes are basically cubes textured with four different images to give a 360 degree panoramic view, along with the above and below views. In your program, you scale the cube up massively and place your matrix/camera in the centre so you have a nice 'backdrop' to your program - like the one used in my Waterfall Demo.
You can't create a skybox from a DB primitive cube as there's no way to texture the six individual sides of the cube. So, you have to create your skybox in a modelling program that exports .X files for DB.
I used Truespace 5 for this and it took only a couple of minutes. (You'll find the skybox.x file I created in the zip file).
OK, now for the images...
First of all, you can't use any old images. Getting the digital camera out and snapping 6 pics in each direction or trying to create them in a paint program won't work. Even if you managed to stitch them together seamlessly, there's one thing which will see your efforts completely ruined... perspective!
Images textured onto a cube are furthest away from the eye in the corners and will appear stretched. Instead of seeing a scene, your eye (and the camera) will just see a scene painted on the inside of a box! Not the effect we want...
To see this effect, unzip BadImages.zip into the same folder as the .x file and run Skybox.dba. See how it looks like you are just in a box?
So, the images are specially generated by software (like Bryce) to be 'anti-stretched' at the corners. This squashes the images slightly so when stretched in the corners of your skybox, the stretch effect is counteracted. The result is we don't see the box and it looks like a panoramic view.
You can find loads of web sites which give you free skyboxes to download - usually named 1.bmp to 6.bmp. All you have to do is get them into your skybox.
The skybox .X file I created uses 6 bmp files called Back.bmp, Front.bmp, Left.bmp, Right.bmp, Top.bmp and Bottom.bmp.
If you download skybox images off the net, simply rename the images and drop them into the same folder as the skybox.x file and they will automatically be used by the supplied .X file.
Now The Problem...
Both the images and the skybox can be created with different software to be used with different systems. Of the six images you download, which is left and which is right?
Well normally, on the web site you will see the six images displayed joined together - usually in a capital letter 'T' pattern rotated 90 degrees - looking similar to this:
Normally the three vertical images are the front view with the top and bottom attached above and below respectively, but some may show the back view with top and bottom. The three images attached to the centre image will be the remaining images which wrap round the three other sides of the cube TOWARDS YOU.
So, you rename the numbered images you downloaded as shown in the above diagram.
Finally, you may have to alter the images to fit the mapping done with the textures on the skybox.x file I have supplied. (Or you can use a 3D modelling program to create your own Skybox.x file).
GoodImages.zip contains six skybox images I downloaded off the net and renamed as described above.
When renamed, I had to alter the top and bottom images in Paintshop Pro to match the texturing method I used in Truespace for my Skybox.x file. This involved doing the following:
Bottom.bmp - a) Rotate image 180 degrees. b) Mirror (flip) Vertically c) Save!
Top.bmp - a) Rotate image 180 degrees. b) Save!
Depending on where you download the skybox images from, you may have to experiment to get it looking right. The method described here works fine with the excellent Vaxwars skyboxes.
DB Coding Hints:
Many people have said that although their skybox images work fine, in DB Classic, the effect is ruined by ugly lines along the edges of the six skybox sides.
There is a way around this, but it's a bit of a compromise.
All you have to do is use the Set Object command and set the Filter flag to 0 (zero). This lowers the quality a bit, but it gets rid of those horrible lines.
As you can see from the DBA code in the zip, I use:
SET OBJECT 500, 1, 1, 0, 0
The last zero turns the filter on. The other zero turns Cull on and this allow you to see the image from the inside of the cube as normally the insides of objects are not drawn (speeds things up - especially when they aren't normally seen anyway).
If you are new to DB, but not programming, you will like me, probably find this strange. I've always thought of 0 as being off and 1 as being on. However, in DB it's the reverse - you'll soon get used to it!
OK - that's it for now. Hope it was of some help to someone...
Oh yes - the download...
http://www.computechtenerife.com/skybox.zip
Note: The images in GoodImages.zip do not need to be altered as described above - they are already done.
TDK_Man