I was searching for something like this, didn't find anything, so I wrote a little app in C# but the conversion of a cube map with 512px tiles takes 25 mins with. So I threw that off. What I did is using Blender (a free 3D suite software), map the faces to a cube, put a camera in panoramic mode in the middle of it, and render the cube shaderless with the camera into a file. It takes 2 seconds to render, I made a "conversion-ready" blender file, so it takes 30 seconds to me to setup the scene. I just have to rotate the camera to rotate the equirectangular panorama the way I want.
I will be as simple as I can (because you might not be familiar with Blender) :
- Download Blender (free) : http://www.blender.org/
- Install it, don't really care about the options.
- Open the attached blend file.
If all the faces are into one picture Example of what works
- Select the biggest cube of the two by right-clicking on it (it should be named "CubeAll6")
- Go to the "Materials" tab on the right, this button:
- Next to the "Image Texture" blue drop down, there's a + expander. Click on it to reveal a button to select the cube map.
- Go to the tree node in the top right and uncheck the eye, the mouse and the camera at the line "Cube":
- Select the camera (by right-clicking on it) and press 0. You should normally see the equirectangular map:
Now you should see the cylindrical map appear on screen. Rotate the camera with R and RR (double-press) to change the way the map is displayed. Once you're satisfied, press Z to return into Wireframe mode.
- Go into the render properties:
- Under the dimensions panel, change the resolution of the image to what you need (X value should be 2 times the Y value, to have a 2:1 ratio), and make sure it is set at 100% (to have full resolution)
- Press F12. Wait a little for the render to compute, and the generated image should appear just in front of you.
- Press F3 to save the image where you want, and on the bottom-left you have the image save properties. Boom! You have your equirectangular map !
Added (15.03.2014, 17:20)
(continuing the post)
If you have separated faces of the cube map
- Select the smallest cube, and go to Materials tab. You will see 6 pink circles all names "POS_Z", "NEG_Z", etc...
- For each one corresponds a face. POS_Z is the Positive Z face, NEG_Z the Negative Z face, and so on ...
NOTE: For space engine cube maps, Positive Y and Negative Y images must be swapped in order to work. Plus the Negative X face must be rotated 90° Counter-Clockwise in order to work perfectly.
- For each material (pink ball), select it, go to the Surface panel, and click Open under the blue "Image Texture" drop down.
- Go select your image. After a bit, the pink ball should change into a ball with the image mapped in it.
After you're done with that:
- Right-click on the camera on the 3D viewport, and press 0.
- Press SHIFT+Z to go into rendered mode.
- You should see your equirectangular map. Pres R and RR (double-press) to rotate the camera and turn the map the way you want it.
- Once you're done, press Z to return to Wireframe mode, go to the Render tab, and under the Dimensions panel, set the resolution to what you want. Ideally the X value should be 2 times the Y value. And make sure it's at 100% (to have full resolution). Press F12 to render the map, then, when it's done, press F3 to save it. On the bottom-left hand you have the properties on how to save the image.
Maybe that's a bit too complicated, especially if you are not familiar with Blender, so if you have 2-3 cube maps to convert, I'll be glad to convert them for you (just specify me the resolution you want of the image) !