16 April, 2011

Quartz Composer Voxel Terrain Test 2

I've been trying to push my voxel composition a bit further. I noticed that switching from 64bit to 32bit QC shaves 2 seconds off the rendering time. No idea why, isn't 64bit-everything supposed to be faster?

I've also been adding color to the voxels. I've been using sprites exclusively instead of cubes to save on processing time. Color is dependent on the height of the voxel. I also used a gradient map to add terrain-like color mapping to the composition. Unfortunately this adds a lot to the rendering time, so instead of a good 5 seconds I now get 11 seconds.


This batch still uses two interpolation patches for the height values, useful if you like repeating patterns.


After using interpolators for a while, I tried switching to the Noise patch for the height values. I added multiple octaves to the noise input, in order to get different results. This is quite pleasant and more what I was aiming for, since now it looks a bit more controlled and landscape-like.

The downside of using color height maps is the performance hit. The two-color examples use a grid of max 256x256 iterations (128x128 gets very similar results though), but for the multi color ones I have to stop at 64x64.
Using 128x128 seems to crash or freeze Quartz Composer. Still good for pixel art I guess :-)