Cubemap Generator

Hi,

for my personal work and opengl programming I need cubmaps for reflections. So I have decided to make cubemap generator based on the blender compositor nodes.

With this cubmap generator you can create 6 single images, horizontal and vertical cross images from a 360° panorama equirectangular resp. latitude-longitude format.

Example:

Input (only preview, not HDR)


Ouputs (with blur effect)


The Blender project is dynamically configurable:

  • Use any equirectangular resp. latitude-longitude format wich blender supports as a texture
  • create out textures in power of 2 resolutions (512512, 10241024, other can be addapted)

The naming of the outputfiles is a bit wired, because I have not found an option where I can turn of the frame number naming scheme of the output files. (maybe someone can help here)

When the blender project is opened, then there is a little howto to generate the textures.
This project is created and tested with blender 2.64 RC2.

In the zip archive there are also some gimp projects for the mask and container presets. I don’t have packed a HDRI texture into the archive, instead I have created a JPEG preview from an HDRI, to reduce the size of the archive.

All test images are from http://www.openfootage.net

Comments and critics are welcome :wink:

Download current version:
https://dl.dropbox.com/u/64133338/cube_map_generator/cube_map_generator_1.1.zip

History:

2012-10-10 (v1.1)

  • fix: X axis is mirrored now and correct
  • fix: simplifiy and correct the h-cross and v-cross node setup (its now pixel accurate)

2012-09-29 (v1.0)

  • initial release

maybe you should name the thread ‘Cube Map Generator - for environment images’ , else people might scan over this and think you are creating a mesh cube.

You’re right. I have searched several times a way to edit the thread title. Finally found it :wink:

That might not apply to this thread. But here goes. I have terragen 0.91(because I am very familiar with it.) and Terragen 2.0 ( not really versed in it yet) is there a way of generating terragen images that can be used with this script and if so how?

Sweet=)
Btw, there were a couple of methods to get cube map from mov panoramas =)

Its a long time since I used terragen. But if terragen can build a latitude longitude image then you can use this with that scene.
On the other hand AFAIK you could build the 6 single cubemap images from terragen with little afford, I have done this a few years ago.

Sure there are many solutions out there, the most of them are comercial which costs 20€ or more.
With the blender solution, there is a build in compositing pipeline (f.e. to do a blur effekt, etc.) and this was the reason for me to build up one solution base on blender compositor.

The other reason was to learn a bit from the Blender compositor :wink:

I just found this tool very useful so thanks @homer_simpson

There is also this one out there. I’ve used it in the past and it works well, and it’s also free.
http://www.geeks3d.com/20120112/cubemapgen-1-6-available/

Cheers

MABYE I’M WRTONG BUT DOSENT BLENDER ALREADY DOES THIS AUTOMATICLY FOR ENVIORMENT MAPS AND REFLECTIONS. opps sorry for the caps just noticed . :slight_smile: