web log

Here’s a quick screencast showing how to use the voxel data texture to load and render image slices as 3D volumes. It may be a little unclear in this small window, but you can click through to Vimeo to see the HD/fullscreen version. This is using the sim_physics branch in blender SVN, you may be able to find builds for your system on graphicall.org.

Today I committed some new additions to the blender sim_physics branch, making it easier to load up different types of voxel data sets for volume rendering within Blender. The most significant addition is a new ‘Image Sequence’ file format choice in the voxel data texture, which makes it easy to load up image slice sequences as the Z axis of a 3d voxel grid.

There are some other new features and optimisations mentioned in the commit log too. I really hope this helps people involved in medical visualisation/research, if only by providing them a free method for making animations with case data. If you are in the field, I’d love to hear from you.

Some test renders:

Made a simple little script last night for testing voxel data loading - it creates vertices of a mesh based on voxel data, if the voxel’s value is above a threshold. The file’s here if you’re interested. The datasets this works with are available here.

I’m working on adding support for these, and also image sequences ( 3D voxel resolution = image X * image Y * number of frames), in Blender’s voxeldata texture, which should be interesting for people wanting to load up medical data. A preview animation is on vimeo.


Some recent Bridgestone Gecko TVCs @ ProMotion. I did shading/lighting/comp.

A few weeks ago, I returned from about a month spent in Morocco with Kat. Apart from a minor incident - splitting my eyebrow open after having a food poisoning-induced seizure on the floor of the bathroom in the middle of the night, everything was great. It’s a beautiful, ancient country of amazing extremes, the people were kind and welcoming, the food delicious.

I’ve been slowly putting a few photos on flickr - so far there’s Casblanca, Rabat and Chefchaouen. More on their way. It was great to take the seagull out for a spin, although it seems the focus on it isn’t so accurate any more after I accidentally broke the ground glass screen and replaced it with tracing paper to keep it in action. Perhaps it’s time for retirement.



I’m going to be away for a few weeks, this time for fun. I’m leaving phones etc behind and email contact may be a bit limited. See you later!

I’m currently here with several other Blender developers at Winter Camp 09, organised by the Institute of Network Cultures in Amsterdam.

We’re here to discuss and hopefully make some decisions and consensus on the work we’re doing for Blender 2.5, particularly regarding the user interface and new tool/event system. It’s been really promising so far, and we’re agreeing on a great number of things.

A few links:

Last week I went to see a few sessions of the 2009 Sydney festival called films afloat, a free outdoor film screening on a massive screen floating out in the middle of Darling Harbour. Before the main feature (each night a different movie, with a soundtrack played by an improvising live band!) they showed the finalists of the animation competition, which our short ‘Lighthouse’ was included in. We ended up coming second in the competition, which was nice, but even better just to have it shown outdoors in front of a few thousand people in such a great atmosphere.

At work we also published a project we finished late last year, which was our first production use of the volume rendering tools I’ve been working on. It’s just a couple of shots, produced for an internal corporate video involving a hallucination sequence where a worker gets ripped out of his cubicle by a tornado. It’s a bit silly, and may not be the greatest vfx shot known to man, but it was fun to do, and good to give the rendering tools a good hammering in a practical context. There’s a bit more info about the process in this blenderartists thread.

I’d heard before about Radiohead’s House of Cards video, made entirely from 3D laser scan data. Yesterday I found out that some of the point cloud data files were made available to download from Google under a creative commons license.

So I did a little test reading it into Blender with a quickie Python script, and rendered it as a volume, using the ‘point density’ texture, in the sim_physics branch. You can
download the .blend file
including the script.


It’s getting to the end of the year and things are getting busy. There’s been plenty on at work - quite a few projects have been running concurrent for a while, including a new Bridgestone gecko spot that’s out now, and the still in-progress project I’ve been working on the volume rendering for.

We’ve been getting around a bit too, four of us headed down to Melbourne in October to attend the first ‘Melbourne Blender Society‘ meeting. We gave an informal presentation about some of our work, much of it involving character setups, and then headed out for some ‘beer r&d’, meeting some fun and interesting people (Hi Glenn, this only took a month ;).

Jez, James and I also gave a presentation at the Digital Media Festival in Sydney , on the topic of ‘an open source pipeline’, talking about our use of Blender in production. Some of the parts that interested the audience of mostly 3d/vfx/design people most were existing features like the library linking system, but also the ability for us to do custom development, such as contracting the ocean sim tools for the Lighthouse project. I also showed off some work on the volume rendering too ;)

The volume rendering tools are at the point now where it’s going to give acceptable results given the timeframe. Although it’s still lacking a bit in some areas right now that aren’t a priority for this job, for my purpose it’s going pretty well. Raul has now picked up this code to work with too, and I’m looking forward to seeing his implementation of voxel data sets. A couple of the improvements I’ve made since last time posting include:

  • Particle rendering
    There’s now a new 3d texture called ‘point density’ that retrieves density and colour information from point clouds (either particle systems or object vertices). It uses a BVH tree to store the points, and looks up what points are within a given radius of the shaded point, with various falloffs. It also has a few methods for simple turbulence, adding directed noise to give the impression of more detail. It’s also possible to use this texture on solid surfaces too.
  • Light Cache
    In order to speed up rendering of self-shaded volumes, there’s a new option to precalculate the shading at the start of the render into a voxel grid, which gets interpolated later to generate lighting information, rather than shading the lamps directly. You could make the analogy to raytraced occlusion vs approximate occlusion in Blender - it often gives around a 3x speed up with similar quality.
  • A few other small things such as internal and external shadows, anisotropic scattering with various phase functions, integration with the sun/sky system, and various fixes.


Kajimba’s also rolling along nicely. We’ve released several more animation tests with audio (and plenty more sill in the pipe), the voices for the first episode have been recorded, and the animator dudes have started working on lipsync tests to begin some animation on ep 1 soon.

And on it goes…

We’ve put the first animation test from Kajimba online (with audio), check it out! :)

There’s a few of these clips coming down the pipe, so stay tuned.



As much as I’d love to be at the 2008 Blender Conference in Amsterdam, as I have in some years past, it’s quite prohibitive and difficult, especially with work. Luckily, there is a live feed to watch the presentations online. One presentation that I’ve watched in its entirety so far is by William Reynish: The evolution of Blenders User Interface. I’ve met William a few times, and we’ve chatted about these issues a long time ago, and his presentation brilliantly elucidates so many things that I’ve been thinking about, ranting about and very patiently waiting to start working on, for several years. Do yourself a favour and watch it now!

These issues are not theoretical niceties, they’re serious problems that I (and the other people I work with) run up against day by day in our production work. They’re hurdles in Blender’s workflow that not only make Blender slower and clumsier to work in than it could potentially be, but also harder for professional users of other software to come up to speed in Blender quickly, which is important for us too. I’m sure William has come to the same conclusions after his experience working on Big Buck Bunny. Anyway, I want to offer my full support behind William’s presentation, and during the work on Blender 2.5 I’d like to do whatever I can to help make that happen. I hope you all can give these ideas the same support too.


Luckily, I’ve been able to work full time for a while on the volume rendering code, as part of budgeted R&D time at work. Since Monday I’ve made a lot of progress, and have been committing code to the ‘sim_physics‘ SVN branch, maintained by Daniel Genrich.

I’m actually quite surprised at how quickly I’ve managed to come this far, I guess I can attribute it partially to the clear design of pbrt, which I’ve used as reference for the fundamental structure. So far, I’m getting close to having it at a reasonably well integrated state with the rest of the renderer. Perhaps tomorrow it’ll be at a state where particles could be rendered by just instancing spheres at each point.


Some of the changes so far include:

  • Fixed the shading bug I mentioned earlier, due to a limitation in the raytrace engine (before, after). Now shading works quite nicely.
  • Added colour emission - as well as the overall ‘Emit:’ slider to control
    overall emission strength, there’s also a colour swatch for the volume to emit
    that colour. This can also be textured, using ‘Emit Col’ in the map to panel.
  • Cleaned up and clarified volume texture mapping, fixing the offsets and scaling, and adding ‘Local’ (similar to Orco) mapping, alongside Object and Global coordinates
  • Added colour absorption - rather than a single absorption value to control how much light is absorbed as it travels through a volume, there’s now an additional absorption colour. This is used to absorb different R/G/B components of light at different amounts. For example, if a white light shines on a volume which absorbs green and blue
    components, the volume will appear red. This colour can also be textured.
  • Refactored the previous volume texturing code to be more efficient
  • Worked on integrating volume materials into the rest of the renderer. Now other objects (and sky) correctly render if they’re partially inside or behind a volume. Previously all other objects were ignored, and volumes just rendered on black. The colour of surfaces inside or behind the volume gets correctly attenuated by the density of the volume in between - i.e. thicker volumes will block the light coming from behind.
  • Enabled rendering with the camera inside the volume.

Correct shading and absorption

Shading with two lamps

Shading within clouds density texture

Textured (with colour ramp) emission colour

Example of various absorption colours

Textured absorption colour

Objects and sky inside and behind volume

Shaded concave volume

Camera passing through a volume