OpenVDB

Also known as: VDB

On this page 7

OpenVDB is an open-source C++ library and file format for storing and processing sparse volumetric data on a three-dimensional grid, such as smoke density, fire temperature, cloud shapes and signed distance fields. In 3D graphics & animation, files with the .vdb extension, often simply called VDB files, are the standard way to move volumes between simulation, lighting and rendering software.

OpenVDB was developed at DreamWorks Animation, released as open source in 2012, and is now hosted by the Academy Software Foundation. It is part of the VFX Reference Platform, received a Scientific and Technical Academy Award, and is supported by Houdini, Blender, Maya, Arnold, RenderMan, Redshift and most other major tools. Its strength is that it stores only the voxels that matter while still allowing fast random access.

How the VDB tree stores sparse volumes

OpenVDB organizes voxels in a shallow, hierarchical tree inspired by B+ trees. A dense grid of 2,000 cubed voxels would contain 8 billion values, most of them empty air. The VDB structure instead allocates memory only for regions that contain meaningful data, while the rest of the domain is represented by a single background value.

The default configuration uses a fixed four-level hierarchy. Each level has a fixed branching factor, which keeps tree depth constant and makes lookups predictable. The table below shows the standard layout.

LevelNode sizeRole
Root nodeSparse hash mapCovers an effectively unbounded index space
Upper internal node32 x 32 x 32 childrenCoarse spatial subdivision
Lower internal node16 x 16 x 16 childrenFiner subdivision
Leaf node8 x 8 x 8 voxelsStores actual voxel values
Default OpenVDB tree configuration

Regions with a uniform value can be stored as tiles at any internal level, so a large solid interior costs almost nothing. OpenVDB also caches the last visited nodes, so neighboring voxel access during simulation or ray marching is close to constant time. The index space is unbounded, which means a volume can grow in any direction without being resized.

Grid types and typical contents

A single VDB file can contain multiple named grids, each with its own value type, transform and metadata. Simulation tools commonly export a density grid, a temperature grid and a velocity grid together in one file per frame.

Grid typeValue per voxelTypical use
Fog volumeFloat density from 0 to 1Smoke, clouds, dust rendering
Level setNarrow-band signed distanceLiquid surfaces, collision, meshing
Vector gridThree-component vectorVelocity fields for motion blur
Scalar attribute gridFloat or integerTemperature, flame, fuel, masks
Point data gridCompressed point attributesParticle caches with millions of points
Common grid types in VDB files

Level sets deserve special attention. They store distance to a surface only in a thin band around it, typically three voxels on each side, which makes them very compact. The library includes tools to convert meshes to level sets and back, perform CSG unions and differences, smooth surfaces and fill holes.

OpenVDB compared with other volume and cache formats

Within 3D file formats & pipelines, OpenVDB occupies a specific niche: it is the exchange format for voxel data, while other formats carry meshes, animation or scene description. The table places it alongside formats that pipeline engineers often confuse with it.

FormatPrimary contentRelationship to OpenVDB
OpenVDBSparse voxel gridsStandard for volumes and level sets
AlembicBaked geometry and animationCarries meshes and points, not volumes
USDScene description and compositionReferences VDB files as volume fields
OpenEXRHigh dynamic range imagesStores rendered output of volumes
Field3DDense and sparse voxel fieldsOlder format largely replaced by VDB
How OpenVDB relates to neighboring formats

In a USD-based pipeline, a volume prim points to an external .vdb file through an OpenVDBAsset field, so lighting artists can assemble scenes without copying heavy voxel data into the scene file. Renderers then load the VDB directly at render time.

Working with VDB files in production

Most studios write one VDB file per frame, named with a frame number, because simulations change topology constantly. Good practice keeps file sizes manageable and avoids slow renders. The following guidelines reflect common pipeline practice:

  • Prune and clip grids before export, removing voxels below a density threshold and outside the camera frustum.
  • Store density and temperature as 16-bit half floats when full precision is not visible in the render.
  • Enable Blosc or Zip compression; Blosc is usually faster to decompress during rendering.
  • Keep consistent grid names such as density, temperature and vel, because renderers and shaders look them up by name.
  • Record the voxel size in pipeline metadata, since resampling between different resolutions changes the look.

For real-time and GPU use, the related NanoVDB representation flattens the tree into a single linear buffer that can be uploaded to graphics memory. It is read-only but well suited to GPU ray marching and fast previews.

Limitations and common pitfalls

OpenVDB is efficient but not free of trade-offs. The most frequent problems come from resolution choices and unmanaged file sizes, not from the format itself.

SymptomLikely causeFix
Files of several gigabytes per frameNo pruning or full-float precisionPrune, clip and use half floats
Blocky or stepped smokeVoxel size too large for camera distanceResimulate or upsample with care
Missing motion blurVelocity grid not exportedInclude the vel grid in the cache
Volume misaligned in sceneTransform lost or units mismatchedCheck grid transform and scene scale
Slow interactive viewportFull-resolution grids loadedUse proxy grids or NanoVDB previews
Typical VDB problems and their fixes

Another limitation is that OpenVDB stores values, not shading. Color, scattering and emission come from the renderer’s volume shader, so the same VDB file can look different across renderers unless the shader setup is matched carefully.

The idea in brief

Picture a huge empty warehouse with a small cloud of smoke in one corner. You could describe every cubic inch of the building. Most of that description would say nothing is there. OpenVDB is smarter. It records only the places where smoke actually exists. Empty space is summed up in one short note.

That is why artists use it for smoke, fire, clouds and splashing water. The files stay small enough to move between programs. One shared format lets simulation, lighting and rendering tools all read the same volume.

A practical scenario

A visual effects team is adding a burning building to a live-action shot that lasts 240 frames. An effects artist simulates the fire and smoke in Houdini at a voxel size of about 5 centimeters, then exports density, temperature, flame and velocity grids into one VDB file per frame.

Unpruned, each frame would be close to 3 gigabytes. After clipping voxels outside the camera view, pruning near-empty regions and saving density as half floats, each file shrinks to roughly 400 megabytes. The lighting team references the sequence through a USD volume prim and renders it in a production path tracer with motion blur from the velocity grid. The shot renders on the farm without memory failures, and the same cache is reused for two alternate camera angles.