Blender + OpenVDB Integration Results

Hey everyone,

I just wanted to give the community an overview of the work I’ve done towards integrating OpenVDB volumes into Blender for the purposes of rendering level sets and heterogeneous volumetric fields. Before I get into the details, here is a shot from one of the movies that was rendered for our upcoming Siggraph Asia 2016 paper on scalable fluid simulation for heterogeneous platforms.


( For more results, please see the paper, the accompanying videos, and this page )

Basically we were faced with the challenge of not only simulating fluids on domains with over 1 billion degrees of freedom, but then producing high quality renders for the submission. In the past, I had used Blender quite successfully for rendering solids for other projects, so I was interested in how I could leverage my Blender experience for this challenge. After looking around, I eventually contacted Kevin Dietrich, who had previously started some OpenVDB integration with Blender. Using his initial code as a guide, I finished the integration task by adding support for level set rendering, in addition to the initial volume rendering that Kevin had experimented with.

I have made my changes available on Github if people want to experiment with them:
Blender+OpenVDB on Github

Instructions for building this version are here:


#!/bin/bash

# Setup

export LD_LIBRARY_PATH=/usr/local/lib
echo "dash dash/sh boolean false" | debconf-set-selections
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
mkdir /blender_experimental

# Build OpenEXR

cd /blender_experimental
git clone https://github.com/openexr/openexr.git
cd openexr/IlmBase
/bin/bash ./bootstrap
/bin/bash ./configure
make
make install
cd ../OpenEXR
/bin/bash ./bootstrap
/bin/bash ./configure
make
make install

# Build OpenVDB

cd /blender_experimental
git clone https://github.com/thecsapprentice/openvdb.git
cd openvdb/openvdb
git checkout cycles_fixes
make lib PYTHON_VERSION= HT=/usr/local HDSO=/usr/local/lib/ BLOSC_INCL_DIR= DESTDIR=/usr/local
make install PYTHON_VERSION= HT=/usr/local HDSO=/usr/local/lib/ BLOSC_INCL_DIR= DESTDIR=/usr/local

# Build Blender

cd /blender_experimental
git clone https://github.com/thecsapprentice/blender-cycles_openvdb.git
cd blender-cycles_openvdb
git checkout openvdb
git submodule init
git submodule update
python scons/scons.py BF_QUIET=1 -j 40


It should build fine on Ubuntu 14.04 ( the test platform we had at the time ), or any similar system. I have noticed that Blender is moving to a pure CMake build system, so this scons build is a bit behind the times. I will probably get around to merging in the latest Blender master at some point, but for now this is based off of v2.76.

Building on Ubuntu 14.04 will require the following packages:


apt-get install git scons g++ make python3 python3-dev libjpeg-dev libz-dev libgl1-mesa-dev libglu1-mesa-dev libavformat-dev libswscale-dev libfftw3-dev libfreetype6-dev libboost1.55-dev libavdevice-dev libtiff5-dev libsdl1.2-dev libilmbase-dev libopenexr-dev autoconf libtool 
libopenal-dev libxi-dev libspnav-dev libtbb-dev liblog4cplus-dev libboost-system1.55-dev libpython3.4-dev libjemalloc-dev 
libboost-iostreams1.55-dev doxygen libboost-filesystem1.55 libboost-thread1.55 libboost-locale1.55 libopenimageio-dev 
libopencolorio-dev libyaml-cpp0.3-dev libtinyxml-dev

I would love to see these changes eventually integrated into the upstream code base of Blender, but at the moment I’m a little busy with my dissertation, so that will have to wait for now.

wow! can`t believe my eyes. Would turn my computer in a fireball but awesome! Wish you alle the best for your dissertation! :slight_smile:

Amazing work, this should give further integration of OpenVDB in Blender a major shot in the arm.

Hoping this work can at least become a part of the 2.8 project :slight_smile:

Wow, awesome work. :smiley:

Fantastic work!

As ace dragon said, it would be brilliant if this made it into 2.8 :slight_smile:

Thank you for sharing your work. VDB in cycles would be really nice. I have been following KWD awesome work with VDB both inside and outside of blender development and its nice that other are interested in developing in that area too:)

Hey, thanks everyone for your kind words. The project really has been very experimental over on my end. Basically we had a workflow that we liked ( w/ Blender ) and then we had a new simulation project come along with no good solution for rendering the results. We considered using other renderers ( and for future projects we might still ), but I figured why not try to make Blender work since I was already familiar with the tool. After several months of poking at Cycles code to figure out how it worked, we came away with what you see here.

For our purposes, Blender did a great job with the level set surface renders, but the time to produce frames on the smoke ( w/ Scattering+Absorption shaders ) is still incredibly high for decent quality. For large scenes, I think we still need better rendering algorithms to handle these cases. Simply throwing more cores at the problem doesn’t scale well enough with the current Cycles implementation.

1 Like