Baking equirectangular panos to cubes (or whatever you want) with Blender
While playing with Blender I’ve found a way to apply 360 panoramics images on a mesh; what’s the goal ? From my point of view there’s at least 3 :
- You can easily unfold the mesh, then print it out to make , hmmm for example, something like that: http://www.philohome.com/rhombicuboctahedron/rhombicuboctahedron.htm. This type of tasks normally needs a lot of work , using Hugin, templates .psd files etc etc..
- Transform it to a cube , in order to use it in a game.
- Playing with map projections ( why not? Should be a great game for geomaticians ;-p )
First of all, if it has not been done: download blender on 2.7x ==> http://www.blender.org/
Note: I’m using a Debian based Linux 64 bits , I won’t be of any help with windows users for this point. And pictures should come later for this step-by-step.
Then open it and select the « Cycles render » on top of your window.
Select the cube and give it a material : click on « use nodes » then in « surface » select glossy BSDF », let it on 0 to make it a mirror.
then in the world tab enable nodes, let surface on « backgrounds », go click on the point at the right of the « color tab » and select « environment map »: then go selecting your equirectangular pano.
When you’ll select the rendered interactive view in the viewport shading tab ( just right of the « object mode » tab) you should visualize your mirror cube in your 360 pano.
Now we need to apply the pano on the cube, so we’ll bake the environment on its surface – as it reflect it.
note: for those who wants to try it with hdri maps remember that it won’t bake all EV , so you should be surprised by the poor result , this work must have been done before, so use a tonemapped picture.
Cube selected, pass on « Edit Mode » , as you’ll have to mark seams and UV unwrap your object.
Create a new image in the UV/image editor (AltN or Image > New). Give it a consequent size to preserve quality.
Add a texture node to the objects material(s) and select the new image.
- Then bake the environment on it: render tab, go at the bottom, to get the « bake tab », on bake type select environment, then bake it.
The result will be the full pano mapped on your Unwraped cube; results depends on how you have unwraped it.
Look at this little screencast for more infos:
Equirectangular to cube with Blender from fabkzo on Vimeo.
A finished example of my own there with more experiments:
Opensource Panoviewer: Panocube by FabKzo on Sketchfab