Skip to content

Quantized Quaternion

EvilCoincoin edited this page Mar 29, 2023 · 2 revisions

This is when there is a tasty quater-ion and you only have so much of it.

Overview

Quantization as used on a quaternion.

Typical uses

Reduces a typical 4 single precision floats quaternion (16 bytes) to either 4 half precision floats (8 bytes) or 4 uniform bytes. This can effectively divide quaternion's memory and bandwidth footprint by 4 with a reduction in orientation precision. Can typically be safely used on small static geometry or effects that can afford being slightly disoriented.

The boring stuff

The typical error on the axis of rotation of a naïvely quantized quaternion (rounding the component to the nearest byte value) is a fraction a degree. More elaborate algorithms that take advantage of the normalization requirement of the quaternion can further reduce the error.

An important note is that quantized quaternions are no longer normalized and as such cannot be involved in any operation, such as slerp or vector rotation, before being renormalized first.