Came across and interesting tool for creating space backgrounds called Spacescape. The tool works by building up a scene using a layer system which you can tweak to create a lot of variation in your stars and nebular. The output is to a 6 images for creating a cube map. With a little bit of patience one can compile those images to cube box with ATI cubemapgen and even convert to a sphere mesh format with HDRShop.
The software comes with a few example spacescapes, click open and look at some of the xml files.
By using ATI CubeMapGen Which is now open source source one can take the 6 image output from spacescape and stitch them to vertical cube cross (cube map).
Note:I found the need to convert the files to bmp format so ATI CubeMapGen will be able to successfully convert to cube cross.
Use this method to align the the faces of the cube.
Z+ load Top texture -> rotate diagonally X+ Front -> rotate diagonally X- Back -> rotate diagonally, then horizontally and vertically Z- Bottom -> rotate diagonally Y- Right -> vertically Y+ Left -> horizontally
Once finished click 'Save Cube Cross'
An example of the out put stitched to vertical cube cross format.
One can then use HDRShop v1 to convert to latlong format suitable for UV mapping onto a sphere mesh. Once again image format is important - bmp did not work in my experience but tiff and jpeg did.
Open HDRShop > Open your vertical cube cross in tiff or jpeg format. Click > OK to the camera response curve. Under > Image > Panorama > Panoramic Transform select Cubic Environment for your source file and change destination image to Latitude/Longtitude and change hight to 1024 for this example. > Ok
The output will be a 'map of the world' format.
Of course when one can always paint in other planet using say Lord PorkSwords Hubble Textures etc.
There are some command line tools available if the above procedure does not work
An example sphere mesh with latlong UV mapping. This is a stop gap mesh until I can correctly get Blender to flip normals (faces) to face internally. In the mean time just use a double sided material to get an idea for in-game results. - Appologies
I attempted to use this program a while back but could never get it onto a sphere mesh correctly so many thanx to giving us a tutorial!
I've always wanted to have a planet in the skydome material as this would be the best way to give the impression of orbiting a massive planet! I feel the use of material planes or static meshes would never achieve this properly as you need something big enough to appear to stretch outside of the starsphere.
@Blitz Cheers, I updated some of the explanations for the HDRShop, I hope I haven't missed anything. Just blow the whistle if I've left something out.
@LPS Yeah looks like UT3 does not have any sphere meshes with correct UV layout. The tricky thing seems to be converting the formats for sphere and hemisphere cube map to other mesh friendly formats. At the moment I'm having trouble creating a sphere where the the faces or normals as their called are pointing inward. The work around might be to use a double sided material but I'd rather not go down that route. If Odedge is around I'll ask him to try an make one - their very simple to make.
Yeah that does sound good. One must take care that the resolution of the sky box images will match the display resolution in game. So if the largest screen resolution is 1680 then the single face of the cube needs to be that dimension or larger (2048) to match the x^2 size format for textures. So you don't end up with stretched background.
Nice find and presentation Achernar. It would be nice if it could output to the single image though, but I am sure once you get the process down, it will be easy neough.
As for the Blender part, the easy part is to just flip the normals (Mesh (menu) > Faces > Flip Normals).
You might want to look at this video for some insight into UV mapping the texture.
Yeah it does take a little getting used to but I also thought it was worth while figuring out cube maps for their other applications.
Yeah well that's what I thought originally but at export time the normals are returned to their original position or even just the outside. For instance if you start by reversing the orientation to begin with. The method I was using is takes a single plain and just convert it to a sphere like so:
1. Shift A > add plane > subdivide a couple of times 2- unwrap it 3- from side view (numpad 1) in orthographic mode (numpad 5) put the cursor under the grid (i did 1 blender unit, so it would make a default uvsphere) 4- wrap (shift+w) 180 5- from the other side view (numpad 1) wrap (shift+w) 360.
6- flip normals 7- export to ase
This will give a uv layout with a 'map of the world ' (latlong format). I found the using quads versus tris avoids texture mapping problems.
The only other thing I can think atm is to just use an older version of blender.
Wow, hemisphere mapping looks so much simpler.
Edit: older version of Blender has not proved successful.
-- Edited by Achernar on Saturday 14th of January 2012 05:32:00 AM