A WorldPack is a spatiotemporal, volumetric data structure designed to summarize animations at modest memory footprints. It stores information in a manner specifically optimized for processing spacetime queries while preserving enough information for low-fidelity GPU-accelerated rendering and visualization. WorldPacks employ a shallow spatial octree to abstract away empty or constant regions of space. Each voxel stores quantized temporal data that has been run-length encoded. WorldPacks are static, bitpacked, linearized, and pointerless. Linearized WorldPacks are stored in breadth-first order.

Header

Bit-mask: 8-bit mask indicating how many children the node has. In our imagining of WorldPacks, every node that has any children must have 8 children, and must contain the following addressing:
Position of child 1 - 8: 32 bit value per child, which is the index of the child ’s data in the linearized WorldPack
Data Block Length: 31 bit value indicating the length of the data block, in bytes.
End Mark: 1 bit earmark, a “0”, indicating that the portion of the header storing offsets has ended. The punctuation is a useful checkpoint to look for when debugging.
X: 8 bit value, which is the x coordinate of the top left raster block in this node.
Y: 8 bit value, which is the y coordinate of the top left raster block in this node.
Z: 8 bit value, which is the z coordinate of the top left raster block in this node.

Data Block

Leaf nodes store the RLE-in-time encoded information. If all the voxels in the leaf node have the same RLE-in-time signal, the node stores a single signal for the entire region. Otherwise, the node stores an individual RLE-in-time signal for each voxel in the node. Either way, the RLE-in-time signals consist of a linear stream of (count, value) pairs.

If the WorldPack stores occupancy data, each RLE run is stored in a single byte:
Count: 7 bits
Value: 1 bit


If the WorldPack stores shading attributes, each RLE run stored in four bytes:
Count: 8 bits
Theta of normal: 8 bits
Phi of normal: 8 bits
Color ID: 8 bits


The following code shows how to read a WorldPack from a linear stream.