This repository contains the code associated with the paper titled "Transform-Aware Sparse Voxel Directed Acyclic Graphs" which will be presented at the I3D Conference 2025. The goal of this project is to store sparse binary voxel grids using as little memory as possible. Our method achieves an improved compression ratio over previous work.
The code is split into the tools and renderer folder. These two code bases were developed separately, but merged into one repository for this project.
This code base utilizes various file formats to store the voxel structures. Most tools may accept multiple different file formats (see source code).
.svoDespite the name this format can also store a Sparse Voxel Directed Acyclic Graph (SVDAG). This format is easy to mutate but not very compact. This file type is used to separate voxelization from TSVDAG generation and encoding. Seelib/include/voxcom/voxel/structure.hfor details..tdagTransform-Aware SVDAG stored using a similar (bulky) file format as.svo. Seelib/include/voxcom/voxel/structure.handlib/include/voxcom/voxel/transform_dag_.hfor details..tdag16Transform-Aware SVDAG stored using our highly compact file format (see paper). Can be displayed using our provided renderer..svdagProviding compatability with the code base of Symmetry-Aware SVDAG by Villanueva et al...ssvdagProviding compatability with the code base of Symmetry-Aware SVDAG by Villanueva et al.. Can be displayed using our provided renderer.
Most of the code is contained in the tools/lib/ folder. On top of this shared library, we build various tools:
- Voxelizer: Converts a triangle mesh into a voxel representation. This tool can also be used to convert between different voxel representations (pass a
.svoor.svdagfile as the triangle mesh). Usevoxelizer.exe --helpto list the tools arguments. - SVDAG Encoding: The (Transform-Aware) SVDAGs generated by the voxelizer are stored in a format that is easy to mutate, but is not very compact. This tool is used to encode a previously generated (Transform-Awawre) SVDAG into a more compact representation (
.tdag16). - SSVDAG Fix Comparison: Symmetry-Aware SVDAG by Villanueva et al. does not find all diagonal symmetries (see our paper). This tool measures the impact of fixing this minor oversight.
- Transform Subset Comparison: A tool that takes an
.svofile and constructs two Transform-Aware SVDAGs: one using all possible child permutations, and one using our selected subset (axis permutation + symmetry). The output is the size of both SVDAGs.
The renderer is a (heavily) modified fork of the HashDAG framework developed by Careil et al.. Since it is CUDA based, you will need an Nvidia GPU to run the renderer. For more information on how to configure and run the renderer, please see the readme in the renderer folder.
tool/lib/src/voxel/transform_dag_hierarchical.cppcontains the implementation of our [subset] child order permutation transforms (seeconstructTransformDAGHierarchical()).tool/lib/src/voxel/find_translation.cppandtool/lib/src/voxel/find_translation.cufind matching subgrids under translation, symmetry, and axis permutation.tool/lib/src/voxel/transform_dag.cppcontains the code to combine both into a single Transform-Aware SVDAG.tool/svdag_encoding/src/transform_dag_encoding.cppcontains the code to compactly encode a Transform-Aware SVDAG using the method described in the paper.
You will need to install the latest CUDA release as well as the vcpkg package manager.
Install Visual Studio 2022 and the CUDA Toolkit (renderer only).
To install vcpkg, open Command Prompt and navigate to the folder where you want to install vcpkg. Then run the following commands:
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate installNow open the root folder of this repository using the "Open a local folder" option in Visual Studio:
Install CMake, a C++20 compatible compiler, and the CUDA Toolkit (renderer only).
To install vcpkg, open Terminal and navigate to the folder where you want to install vcpkg. Then run the following commands:
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate installThis last step will print a message like:
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake"You are now ready to build the project. Navigate to the root folder of this repository in terminal and run the following commands. Replace -DCMAKE_TOOLCHAIN_FILE=... by the instructions returned by ./vcpkg integrate install in the previous step.
mkdir out
cd out
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake ../
cmake --build .
