Google+ knowuh on twitter knowuh on github Instagram

Noah Paessel

★ Converting texture data to voxels in Blender ★

Knowuh's twitch: Aug 24 2014

It all started when I wanted to grab some colors from Vincent Van Gogh for use in one of my renders.

I figured it should be possible to convert pixels into voxels, and using Blender's Python API, it was pretty easy. This technique might have general appeal, so I created a video tutorial for it.

The python script reads pixels RGB values from an texture image you specify by name. It then creates a new diffuse shader material of the same color for each pixel (wasteful!), and final it creates a rectangular prism at x,y coordinates, whose hight is determined by the pixels intesity.

You can read the script on github (or fork it, or comment on it).

Here are a some renders I made using this script:

Sample 1: Simple blender logo converted to voxels
Blender Blocks image
Sample 2: Van Gogh voxels
Blender Blocks image

Here is the tutorial.

It covers some basic info about getting started scripting python, as well as the details of how to read pixel data from a texture, and how to then create voxels from that data.


All Comments, revisions, suggestions welcome. Post in the comments section, or poke me on twitter or G+.

I might do a follow up video about framing, focus, and camera rigging if people are interested.