Extended Morton Codes for High Performance Bounding Volume Hierarchy Construction

Marek Vinkler Jiri Bittner Vlastimil Havran
Czech Technical University in Prague
Faculty of Electrical Engineering

Proceedings of High-Performance Graphics 2017, Article No. 9,
Los Angeles, California -- July 28-30, 2017,

We propose an extension to the Morton codes used for spatial sorting of scene primitives. The extended Morton codes increase the coherency of the clusters resulting from the object sorting and work better for non-uniform distribution of scene primitives. In particular, our codes are enhanced by encoding the size of the objects, applying adaptive ordering of the code bits, and using variable bit counts for diferent dimensions. We use these codes for constructing Bounding Volume Hierarchies (BVH) and show that the extended Morton code leads to higher quality BVH, particularly for the fastest available BVH build algorithms that heavily rely on spatial coherence of Morton code sorting. In turn, our method allows to achieve up to 54% improvement in the BVH quality especially for scenes with a non-uniform spatial extent and varying object sizes. Our method is easy to implement into any Morton code based build algorithm as it involves only a modifcation of the Morton code computation step.

Paper preprint
Sample source code

LICENSE: Source code is free to use only for non-commercial projects. For commercial projects please consider that idea shown in the paper and the source codes is protected by U.S. patent application No. 15/403,612 filed on January 11, 2017, owned by Samsung Electronics Co. Ltd.