July 15, 2013

Script, Environment Cubemap into Unity Skybox images

Continuing from my earlier post this year about rendering environment cubemaps in blender, for use in Unity, i recently had to do a volumetric cloud setup and render quite a few of these. Splitting them by hand, started to get a bit tedious, so i wrote this little script making it easier.

It will turn the image from blender,

into separated and properly named images like this:

This was put together really quick, so it is a bit rough, it will use the original filename and simply add the _position to it. However, it will not check if the file already exists (if it does, it will overwrite it without asking). I take no responsibility in any damage this might cause, use at your own risk, but maybe it is useful to someone else. Feel free to use, change and/or share this.

Here is the gist of it, it also requires the Python Imaging Library to be installed.

python split-skymap-into-images.py path/to/cubemap.png
The split images will be saved in the same directory as your cubemap.

No comments:

Post a Comment