OpenVDB - Sparse volume data structure and tools



License CII Best Practices Slack

OpenVDB AX Nano Houdini
core ax nano hou

Website | Discussion Forum | Documentation

OpenVDB is an open source C++ library comprising a novel hierarchical data structure and a large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It was developed by DreamWorks Animation for use in volumetric applications typically encountered in feature film production.

Development Repository

This GitHub repository hosts the trunk of the OpenVDB development. This implies that it is the newest public version with the latest features and bug fixes. However, it also means that it has not undergone a lot of testing and is generally less stable than the production releases.


OpenVDB is released under the Mozilla Public License Version 2.0, which is a free, open source software license developed and maintained by the Mozilla Foundation.

The trademarks of any contributor to this project may not be used in association with the project without the contributor's express permission.


OpenVDB welcomes contributions to the OpenVDB project. Please refer to the contribution guidelines for details on how to make a contribution.

Developer Quick Start

The following provides basic installation examples for the core OpenVDB library. Other components, such as the python module, OpenVDB AX, NanoVDB and various executables, may require additional dependencies. See the build documentation for help with installations.


Installing Dependencies (Boost, TBB, Blosc)
apt-get install -y libboost-iostreams-dev
apt-get install -y libboost-system-dev
apt-get install -y libtbb-dev
apt-get install -y libblosc-dev
Building OpenVDB
git clone [email protected]:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake ..
make -j4 && make install


Installing Dependencies (Boost, TBB, Blosc)
brew install boost
brew install tbb
brew install c-blosc
Building OpenVDB
git clone [email protected]:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake ..
make -j4 && make install


Installing Dependencies (Boost, TBB, Blosc)

Note that the following commands have only been tested for 64bit systems/libraries. It is recommended to set the VCPKG_DEFAULT_TRIPLET environment variable to x64-windows to use 64-bit libraries by default. You will also require Git, vcpkg and CMake to be installed.

vcpkg install zlib:x64-windows
vcpkg install blosc:x64-windows
vcpkg install tbb:x64-windows
vcpkg install boost-iostreams:x64-windows
vcpkg install boost-system:x64-windows
vcpkg install boost-any:x64-windows
vcpkg install boost-algorithm:x64-windows
vcpkg install boost-uuid:x64-windows
vcpkg install boost-interprocess:x64-windows
Building OpenVDB
git clone [email protected]:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_VCPKG>\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -A x64 ..
cmake --build . --parallel 4 --config Release --target install

Building OpenVDB AX

OpenVDB AX depends on the core OpenVDB library. See the build documentation for all available AX component options:

git clone [email protected]:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
make -j4 && make install

Building NanoVDB

NanoVDB can be built with and without OpenVDB support. To see full build instructions see the NanoVDB build documentation

Building Without OpenVDB Support

git clone [email protected]:AcademySoftwareFoundation/openvdb.git
cd openvdb/nanovdb/nanovdb  # Build from the subdirectory
mkdir build
cd build
cmake ..
make -j4 && make install

Building With OpenVDB Support

git clone [email protected]:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
make -j4 && make install
  • CMake Refactor

    CMake Refactor

    Aims of this PR:

    • Validate CMake build system for Linux/MacOs
    • Homogenize FindXxx.cmake modules and all CMakeLists
    • Improve and document dependency requirements for all OpenVDB components
    • Add missing build options for the core, python, binaries and houdini components
    • Doxygen documentation for dependencies and cmake installation.

    Incorporates the following PRs:

    • - OpenEXR fixes
    • - ILMBase fixes

    Does not address:

    • - I've added NumPy support, but it requires CMake 3.14. This PR adds NumPy support for any version using another custom Find module. We should discuss minimum CMake version.
    • - GNU vars. Not incorporated, but should be done
    • - Some additional Windows and Maya updates which need investigating

    Some important things that have not been done in this PR:

    • glfw, blosc, log4cplus. numpy auto options (use if available)

    Known issues:

    • I am getting cmake warnings on some paltforms when building against houdini and providing my own boost version or my own ilmbase/openexr version (for Houdini 17.5). To be honest I think these warnings are valid as libHalf, for example, is called the same thing in dsolib/ as it is in any old install of ilmbase. But I'd like to try and resolve these as loads are output.
    • NumPy support does not work with Boost 1.65 as it needs Boost::numpy. Better NumPy support will be added in a separate PR.

    I realise there are a lot of changes here. I can refactor the branch history if it's desired.

    Test environments include CentOS, travis and MacOS. Note this PR does not include the travis update. This can be found here:

    • CentOS 7 - g++, runtime tested with and without a Houdini 17 installation. In both cases, uses the same library versions as Houdini.
    • MacOS 10.14.3 - clang++, runtime tested with and without a Houdini 17 installation. Of note, tested with Blosc 1.16 where there are issues, Boost 1.68, TBB 2019, ZLIB 1.2.11.
    • Travis - Latest build -

    General Changes

    • Copyright dates
    • Consistent formatting and white space changes
    • Fixed a number of CMake warnings with newer versions
    • Bumped the minimum CMake requirement to 3.3 to be able to use IN_LIST functionality for CMake LISTs
    • Explicitly set CMake policy CMP0048 everywhere which represents to monitoring of _ROOT variables (which our FindXx.cmake modules use)
    • Added support for Log4cplus
    • Remove GLFW <= 2 support
    • Set minimum versions for GLFW, Blosc and Boost
    • Fixed all incorrect dependencies and compile flags for each target
    • Full rpath updates for houdini, bianries, core and python installations

    FindXxx/OpenVDBXxxSetup.cmake Modules

    • Fully updated to be consistent in terms of variable names, controls, functionality and results
    • Fixed a number of bugs and improved library searches
    • Find modules now attempt to use pkg-config as part of the search, setting dependent cflags where possible
    • Added component support to ILMBase OpenEXR, TBB, OpenVDB
    • Added imported target support for all dependencies (and updated all vdb cmakes to use this)
    • Converted FindGLFW, FindMaya and FindHDK to setup scripts, some of which wrap FIND_PACKAGE calls (as these packages use the dependent packages cmake). For Maya and Houdini, these ensure the correct include and lib paths are set for dependencies.


    • I've added these to wrap FindPackage calls to packages which are installed with their own CMake scripts. These wrappers allow for additional handling of _ROOT and pkg-config calls to try as many things as possible to attempt to locate the installation, reporting the locations consisently using PackageHandleStandardArgs.


    • Find Houdini/Maya installations. For Houdini, uses the Houdini cmake to setup libs
    • For Houdini, adds missing libHoudiniRAY target for VRAY procedural
    • Explicitly sets dependency variables to point to the Houdini/Maya installation, ensuring all configured packages use the correct libraries and removing the need for the user to provide these
    • Sets OPENVDB_HOUDINI_ABI, read by the root CMake to configure the OpenVDB ABI

    Root CMake

    • Full documentation of dependencies for core library components
    • Specifically disable in source builds
    • Revamped options to ensure advanced/deprecated options are hidden
    • Added specific handling for CMAKE_BUILD_TYPE
    • Migrated the Houdini detection stage to the root CMake to enabled subsequent dependency configuration for all packages (see OpenVDBHoudiniSetup.cmake)
    • Removed the limitation of building the python plugin with Houdini if >= H16.5
    • More controls for default behaviour for OPENVDB_ABI_VERSION_NUMBER, including automatic detection from Houdini installations
    • Consolidated OpenVDB Version detection into FindOpenVDB.cmake
    • Moved doxygen generation to root as it doesn't rely on anything else

    Core CMake

    • Now only represents the core library
    • Added a Blosc version warning
    • Removed directory install command in favour of specific header file installations (resolving recursive directory issues)
    • Added an option to specify the target library name

    Binaries/Unit Tests CMake

    • New CMake to represent binaries
    • Added granular binary controls
    • Fixed RPathing issues
    • New CMake to represent unit tests

    Python CMake

    • Fixed a compile issue on MacOS
    • Improved python component requirement handling with FindPython
    • Added a PYTHON_VERSION cached variable
    • Added missing
    • Fixed header installation
    • Added NumPy support (but requires CMake 3.14)

    Houdini CMake

    • Updated to use Houdini CMake for library handling
    • Added optional and cache variables to control SESI dso tagging
    • Added variables to explicitly control install locations
    • Improve blosc defines applied to SOPs
    • Added missing houdini/ to openvdb_houdini lib
    • Improved SOP list formatting
    • Added a dummy target representing all DSOs (not the shared library)
    • Added VRAY_OpenVDB_Points target
    • Added install rules for icons
    • Changed the behaviour of OPENVDB_HOUDINI_INSTALL_LIBRARY to install to CMAKE_INSTALL_PREFIX

    Maya CMake

    • Deprecated OPENVDB_MAYA_SUBDIR
    • Added OPENVDB_MAYA_INSTALL_PREFIX for custom install path configuration
    • Added OpenGL as a required dependency
    • Fixed issues on MacOS/Clang with TBB due to link order of .cc files

    To Test:

    Note that you can provide the ROOT variables as CMake defines instead of exporting the environment. These minimal option sets may not work first time, but will provide a good starting point.

    If building standalone:

    rm -rf .build
    mkdir .build
    cd .build
    # No pkg-config for tbb
    export TBB_ROOT=
    cmake \
     -D CMAKE_INSTALL_PREFIX=<install location> \

    If building against Houdini:

    rm -rf .build
    mkdir .build
    cd .build
    export HOUDINI_ROOT= # Or source houdini env
    cmake \
     -D CMAKE_INSTALL_PREFIX=<install location> \

    opened by Idclip 56
  • Inline Half

    Inline Half

    Copy the half implementation from openexr2.4.

    Inline the lookup tables rather than using separate files. Converts OpenVDB-style export tags. Namespace into math library.

    opened by jmlait 31
  • blosc error with points vdb

    blosc error with points vdb

    Getting error about buffer exceeds BLOSC_MAX_BUFFERSIZE see:

    I am behind a firewall or I would upload the vdb in question.

    It is a points vdb, which we are rendering with our own neat little Arnold Points VDB Procedural in HtoA in Arnold.

    Houdini gives the same error:

    Blosc decompress failed due to exceeding maximum buffer size.

    Is this a known issue, what is the work around?

    Renders are failing, people are wailing.

    opened by samhodge 29
  • OpenVDB 6.2 crashes on startup on Focal

    OpenVDB 6.2 crashes on startup on Focal


    Per and, there's an issue with loading OpenVDB 6.2 in Ubuntu Focal due to the dependency on jemalloc. It has been reproduced by multiple users and traced back to OpenVDB.

    There's a note that it needs to be compiled with --disable-initial-exec-tls to make things work properly

    opened by SteveMacenski 21
  • Using x86 instructions instead of software emulation

    Using x86 instructions instead of software emulation

    I’ve noticed you use lookup tables and bit tricks in performance-critical parts of the code, for functionality that’s implemented in hardware.

    Intel introduces BSR and BSF instructions in 80386, i.e. they support them since 1985.

    POPCNT is slightly newer, but it’s reasonable to assume it’s present, introduced in SSE4a by AMD in 2007, supported by Intel since 2008. Most people don't use 12 years old computers.

    This pull request implements them for vc++, gcc and clang compilers. For unknown ones it falls back to your original software implementation.

    Please let me know if you’re willing to accept the PR, is yes I should probably implement a couple of tests, so far I've only built with vc++ but haven't tested yet. Also you wrote you want me to sigh something.

    If you’re not interested, I’ll just keep these changes in my private branch.

    opened by Const-me 20
  • Introduce OpenVDB AX core library

    Introduce OpenVDB AX core library

    This PR introduces the core OpenVDB AX Library, binaries, documentation and required CMake changes. The Houdini AX SOP can come after this has been reviewed. A few "high level" thoughts:

    • Language docs. Still need work, but the core specification w.r.t types and operators is available I think this may require its own meeting to fully review.
    • vdb_ax thoughts on the command line binaries interface and commands would be good.
    • Directory structure. With the new nested infrastructure, it's entirely possible to instead of openvdb_ax have openvdb/ax as an include path.
    • Boost::random. As far as the dependency goes, I'm planning to remove it and switch to std::mt19937/mt19937_64. I can update this PR once this is available - however I'd like to find some time in a TSC meeting to discuss the actual implementation of methods such as rand().
    • AX CI - Currently AX is tested for vfx platforms 19 and 20, and llvm versions 6.0 through to 10.0. It builds AX separately and depends on an existing installation of VDB. I like this as it splits out the CI somewhat, but means that building VDB and AX together isn't tested.
    • Lib version. It currently has it's own version.h and .so version. Does anyone feel strongly on this being kept separate?

    There is one final change that I'm hopeful will make it in to AX before 7.2 is released in regards to how exceptions are handled throughout the lib - however this doesn't stall reviewing/merging this work and actually may function as a good first test PR once this is all in!

    opened by Idclip 18
  • CMake/Windows improvements to the Python module

    CMake/Windows improvements to the Python module

    • Added options to enable/disable the python test and excluded the interpreter requirement if disabled
    • Improved the report/error logic if python/numpy is not found
    • Fixed Windows C4146/C4996 warnings
    opened by Idclip 17
  • CMake NumPy/Python3 Improvements

    CMake NumPy/Python3 Improvements

    Main changes in this PR fix issues using python3, different versions of boost python (which can end up being called boost_python, boost_pythonX or boost_pythonXx) and adds support for boost numpy post boost 1.65.

    opened by Idclip 17
  • Compiling fails with boost >= 1.65

    Compiling fails with boost >= 1.65

    /var/tmp/portage/media-gfx/openvdb-4.0.2/work/openvdb-4.0.2/openvdb/python/ In function ‘void exportFloatGrid()’: /var/tmp/portage/media-gfx/openvdb-4.0.2/work/openvdb-4.0.2/openvdb/python/ error: ‘py::numeric’ has not been declared py::numeric::array::set_module_and_type("numpy", "ndarray"); ^~~~~~~

    python/numeric.hpp removed from boost

    opened by thankjura 16
  • [BUILD] OpenVDB in Python on Win10

    [BUILD] OpenVDB in Python on Win10

    Operating System: (e.g. Windows 2019, macOS-10.15, Linux CentOS 7.4) Version / Commit SHA: (e.g VDB 7.2, SHA: 1a2b3c4d5e...) CMake Version: (e.g. 3.18) Compiler: (e.g. gcc 10, msvc 2019)

    Hi, is there possibility to use OpenVDB in Python on Win10? Because when I install openvdb package and import library

    >>> import pyopenvdb or >>> import openvdb

    I obtain following error: ImportError: LD_LIBRARY_PATH environment variable not set. The pyopenvdb package currently only work on Linux x86_64 systems.

    Is there a way how can I use openvdb library on Win 10 (exclude c++) or how can I create openvdb volume model in Python by using your library?

    Thank you very much for your advice. Have a nice day.

    opened by petulka8s 15
  • VDB AX Houdini SOP UI (Sync AX 7ac2f67)

    VDB AX Houdini SOP UI (Sync AX 7ac2f67)

    Following the discussion on the mailing list here, this PR updates the VDB AX Houdini SOP node with the latest changes in the dneg/openvdb_ax repo (7ac2f67).

    The main thing holding back the integration of the SOP is the finalising of the UI. The current UI (after some initial changes following discussion on the mailing list) is: axpointsui_v1 axvolumesui_v1 axoptionsui_v1

    Are we happy with this UI? Or do we need to make further changes such as the 'Create New Attributes/Grids' options becoming a list parameter like in the Attribute Wrangle SOPs?

    From my previous message on the mailing list

    Things to note: Changing the 'Create Attributes' toggle to a 'Attributes to Create' list will require changes to the executables as they handle the attribute/volume creation, so I have omitted it in favour of simply renaming the parameter in these first pass of changes. But it might be best to just make this change proper if we aren't in a rush to get the SOP out. [update: this could be kept in the SOP level to avoid changes in the Executable for now] Similarly any extension of the Voxel Activity/Prune options to Points will require changes to the executable and for the Prune options, moved points use movePoints() which will replaces the tree and deleted points uses deleteFromGroup() which internally calls pruneInactive so don't think Prune is useful for points right now.

    On the Voxel Activity parm, I personally like it as it seems somewhat analogous to the VDB Points Group parm (i.e. running on a subset of the data contained in the grid) so haven't removed it, its also nice extra functionality compared to say the Volume Wrangle on VDBs, although I will admit that there aren't huge numbers of immediately obvious use cases. Things I have done with it in the past are to say use the active topology of a grid to represent one thing, whilst the values represent another, but it is definitely an advanced option. To clarify, these options match the ValueIterators directly for On/Off/All, so voxels that exist in the leafs (leaves?) of the VDB with these states will be iterated over. Tiles do not get iterated over at the moment but the executable does have functionality that would allow this in the future.

    opened by richhones 15
  • {doc} Fix NanoVDB README links

    {doc} Fix NanoVDB README links

    Files moved in fb95b366343603d8824fe477541d07342dba9901.

    Also removes link to non-existent file (Grid cells vs grid nodes PDF).

    Signed-off-by: Andy Maloney [email protected]

    opened by asmaloney 1
  • Fix issues in merge tool when using sum mode

    Fix issues in merge tool when using sum mode

    There are two issues being addressed here - one produces incorrect results when deep-copying nodes from the source tree as the mask tree that stores the updated topology of the const input tree is being pruned at the wrong level, the other produces incorrect results for grids which have non-zero background values.

    There's also some minor refactoring and a couple of additions to the merge API in preparation for adding maximum mode.

    opened by danrbailey 0
  • Fix clamp bug in VDB Visualize SOP

    Fix clamp bug in VDB Visualize SOP

    When displaying voxels or points as colors, the input value is not being clamped to the range, so it wraps around. This fixes that by applying the clamp before evaluating the UT_Ramp.

    opened by danrbailey 0
  • Re-enable CI static-debug windows builds

    Re-enable CI static-debug windows builds

    The static-debug Windows CI builds have been disabled due to github actions memory limits. We should re-enable them when we can

    opened by Idclip 0
  • Code to do convex-hull based activation.

    Code to do convex-hull based activation.

    Unfortunately this requires GU_ConvexHull3D changes from future houdini, so has version guards to restrict use.

    Code for faster sdf-activation using dynamic node manager.

    opened by jmlait 1
Academy Software Foundation
Academy Software Foundation
Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimensional grid

Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimens

Davide Faconti 284 Aug 8, 2022
Super Volume Render of Monte Carlo Path tracing for Linux

exposure-render-for-Linux Super Volume Render of Monte Carlo Path tracing for Linux Introduction The code is a Linux distribution of exposure render.

engineer 3 Aug 6, 2021
PlenOctree Volume Rendering (supports CUDA & fragment shader backends)

PlenOctree Volume Rendering This is a real-time PlenOctree volume renderer written in C++ using OpenGL, constituting part of the code release for: Ple

Alex Yu 463 Aug 2, 2022
(R) Efficient methods and operators for the sparse matrix classes in 'Matrix' (esp. CSR format or "RsparseMatrix")

MatrixExtra MatrixExtra is an R package which extends the sparse matrix and sparse vector types in the Matrix package, particularly the CSR or Rsparse

null 14 Jul 23, 2022
The QPEP-Enhanced Direct Sparse Odometry (DSO) with Loop Closure

QPEP-DSO: Quadratic Pose Estimation Problems (QPEP) Enhanced Direct Sparse Odometry with Loop Closure Code Arch The codes are motivated by DSO (https:

Jin Wu 8 Jun 23, 2022
Fast, hierarchical, sparse Voxel Grid

Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimens

Davide Faconti 271 Aug 6, 2022
Implementation of Monocular Direct Sparse Localization in a Prior 3D Surfel Map (DSL)

Implementation of Monocular Direct Sparse Localization in a Prior 3D Surfel Map (DSL)

Haoyang Ye 76 Jul 20, 2022
Fast, hierarchical, sparse Voxel Grid

Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimens

Davide Faconti 274 Aug 7, 2022
An FPGA accelerator for general-purpose Sparse-Matrix Dense-Matrix Multiplication (SpMM).

Sextans Sextans is an accelerator for general-purpose Sparse-Matrix Dense-Matrix Multiplication (SpMM). One exciting feature is that we only need to p 23 Jul 22, 2022
The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University

SuiteSparse: A Suite of Sparse matrix packages at May 17, 2021. SuiteSparse VERSION 5.10.1 Now includes GraphBLAS, SLIP_LU, and

Tim Davis 626 Aug 6, 2022
CPU Sparse Voxel Octree Implementation

Sparse Voxel Octrees This project provides a multithreaded, CPU Sparse Voxel Octree implementation in C++, capable of raytracing large datasets in rea

Benedikt Bitterli 609 Aug 6, 2022
Suckless-tools - My fork of suckless tools.

suckless-tools Here is my fork of suckless tools. I didn't include tabbed, i was using but not actively. I am using xfce4-terminal instead of st. Beca

null 2 Jan 7, 2022
The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for Vulkan application developers to leverage Vulkan Profiles while developing a Vulkan application

Copyright © 2021-2022 LunarG, Inc. Vulkan Profiles Tools (BETA) The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for

The Khronos Group 56 Jul 31, 2022
Just getting started with Data Structure and Algorithms? Make your first contribution here and start the journey of learning DSA.

Getting Started ! ✨ If you are just beginning with open source then let's make your first contribution in this repository ! Contributing Tutorial ?? P

amega 3 Apr 18, 2022
Add anything about data structure and algorithm in any language.

Hacktoberfest 2021 Follow the README below to get started! Note : This repo is excluded from the Hacktoberfest but you can still contribute and the re

null 30 Jul 24, 2022
Implementation and tutorial for a dynamic vector data-structure in C.

Vec: A Dynamic Vector in C The file contains exercises for this implementation if you want to do it yourself. In that case, don't peek at t

Julius Koskela 28 Jun 25, 2022
Grand Programs for every Data Structure including all their operations

Grand-Programs-UE20CS203 Grand Programs for every Data Structure including all their operations Some idioms that I use, so you won't get confused I pr

Aditya Rao 0 Jul 28, 2022
CSE2122: Data Structure Lab

CSE2122: Data Structure Lab Array Traversing Inserting (int) Inserting (string) Deleting Sorting (Bubble sort: int type data) Sorting (Bubble sort: st

Fahim Ahammed Firoz 12 Feb 28, 2022
Contribute a Data Structure you coded or solve the problems given in the file in any language! Happy coding!

Pro Lang Contribute a Data Structure you coded or solve the problems given in the file (can be found in the both the folders) in any la

IEEE-IAS VIT 1 Jan 16, 2022