Voxel Block Grid#

A voxel block grid is a globally sparse and locally dense data structure to represent 3D scenes. It is globally sparse since 2D object surfaces are usually occupying a small portion of the 3D space; it is locally dense in order to represent contiguous surfaces.

To represent such a structure, we first coarsely divide the 3D space into block grids. Blocks containing surfaces are organized in a hash map by 3D coordinates (sparse globally), and are further divided into dense voxels that can be accessed by array indices (dense locally). The reason why we do not maintain a voxel hash map is that we can preserve the data locality instead of scattering adjacent data uniformly into the memory.

Please first check the Hash map, especially section the Multi-valued hash map to acquire a basic understanding of the underlying data structure. Please refer to [Dong2021] for more explanation.


A voxel block grid can be constructed by:

27# examples/python/t_reconstruction_system/integrate.py
28    if config.integrate_color:
29        vbg = o3d.t.geometry.VoxelBlockGrid(
30            attr_names=('tsdf', 'weight', 'color'),
31            attr_dtypes=(o3c.float32, o3c.float32, o3c.float32),
32            attr_channels=((1), (1), (3)),
33            voxel_size=3.0 / 512,
34            block_resolution=16,
35            block_count=50000,
36            device=device)
37    else:
38        vbg = o3d.t.geometry.VoxelBlockGrid(attr_names=('tsdf', 'weight'),
39                                            attr_dtypes=(o3c.float32,
40                                                         o3c.float32),
41                                            attr_channels=((1), (1)),
42                                            voxel_size=3.0 / 512,
43                                            block_resolution=16,
44                                            block_count=50000,
45                                            device=device)

In this example, the multi-value hash map has key of shape (3,) and dtype float32. The hash map values are organized as a structure of array (SoA). The hash map values include:

By default it contains:

  • Truncated Signed Distance Function (TSDF) of element shape (16, 16, 16, 1)

  • Weight of element shape (16, 16, 16, 1)

  • (Optionally) RGB color of element shape (16, 16, 16, 3)

where 16 stands for the local voxel block grid resolution.

By convention, we use 3.0 / 512 as the voxel resolution. This spatial resolution is equivalent to representing a 3m x 3m x 3m (m = meter) room with a dense 512 x 512 x 512 voxel grid.

The voxel block grid is optimized to run fast on GPU. On CPU, it runs slower. Empirically, we reserve 50000 such blocks for a living room-scale scene to avoid frequent rehashing.

You can always customize your own properties, e.g., intensity of element shape (16, 16, 16, 1) in float32, label of element shape (16, 16, 16, 1) in int32, etc. To know how to process the data, please refer to Customized Integration.