Manuscript Offprint
arXiv:2610.22052Compression of Uniformly Distributed Unit Quaternions
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Carsten Faber Bastian Kuth Rinaldo Schuster Daniel Pauls Quirin Meyer
Coburg University of Applied Sciences and Arts, Germany AMD, Germany
Reference
cub 48 bit
PSNR 38.3 dB
99.2% ≤ 1 level; 89.6% exact
Reference
cub 32 bit
PSNR 42.5 dB
99.7% ≤ 1 level; 94.3% exact
PSNR 40.2 dB
99.7% ≤ 1 level; 91.4% exact

error e in 8-bit levels
PSNR 63.2 dB; max 1 level
91.8% exact
Reference
cub 30 bit

FLIP
Figure 1: Three applications for our unit quaternions compressing method cub. Skeletal Animation (top left): with uncompressed rotations (upper row) and the error of cub with 48 bits per rotation key (lower row), grey where exact, else colored by in 8-bit levels. Normal Mapping (top right): the reference and cub with 32 bits per tangent frame, split by the diagonal, and the error of cub. 3D Gaussian Splatting (bottom): the reference, cub with 30 bits per quaternion rotation, and its LIP error.
Abstract
Unit quaternions are widely used in computer graphics, making their efficient compression critical for reducing memory consumption and bandwidth requirements. In this paper, we present a novel method for encoding uniformly distributed unit quaternions. Our thorough analysis of several quaternion parameterizations compares their theoretical error properties, quantization behavior, computational cost, and memory efficiency and provides both an analytical and empirical characterization. We show that an infinity-norm parameterization with our optimized warp function consistently offers the smallest maximum error and the best storage efficiency, at a decompression cost equal to or lower than that of parameterization methods found in practice. We demonstrate the practical benefits of the proposed approach in several graphics applications, including tangent-space normal mapping, skeletal animation with blend weights, and Gaussian splatting.
CCS Concepts
• Computing methodologies → Animation; Graphics processors; Rasterization; • Mathematics of computing → Mathematical optimization; • Theory of computation → Computational geometry; Data compression;
2 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
Since memory size and bandwidth, unlike computational speed, increasingly limit performance, every byte saved per rotation reduces storage, transfer, and cache pressure. Hence, compression of unit quaternions has been widely adopted, for example, in animation libraries [Bla24, Fre20], asset formats [KSP20], tangent frame encodings [FH11, Kap26], and Gaussian splatting formats [Nia25, Pla25].
A good quaternion compression method has to meet several goals. It should be compact and use as few bits as possible for a given accuracy, have a small maximum and mean error, and decompress fast, ideally with a few arithmetic instructions and without lookup tables. Compression, which usually runs once per asset, should be fast enough for asset pipelines.
Besides using no compression at all [KKLD23], different quaternion compression methods are used, such as dropping one component [Fre20], dropping the largest component [Bla24, Kap26], projecting onto the hyper-cube [ISO05], projecting onto the hyperoctahedron [KOF25, Kap26], or mapping them into the unit ball [Rey17, RPWM26]. While compression methods for 3D unit vectors have been compared extensively [MSS10, Mey12], only empirical results exist for unit quaternions [Rey17, Kap26]. In this paper, we fill this gap and make the following contributions.
-
In Sec. 3, we study commonly used unit vector parameterizations and their maximum quantization errors.
-
We present a mixed-radix packing for unit quaternions that stores the chart index and all quantized parameters as a single integer code. Unlike separate bit fields, it uses almost all states of a code word of any size while giving every parameter the same precision.
-
In Sec. 4, we introduce the cub-parameterization, which uses a cubic warp function whose single parameter we optimize to minimize the maximum error. It achieves the lowest maximum error of all compared parameterizations.
-
In Sec. 5, we evaluate cub in skeletal animation, normal mapping, and Gaussian splatting, and show that it is more accurate than the codec in use in each of these domains at the same storage cost, at an equal or lower decoding cost.
Our cub is a drop-in replacement for existing quaternion codecs such as shown in our teaser Figure 1, yielding a smaller maximum error at the same bit budget and without additional decoding cost.
Common to parallel decompression codecs [KOK*25], we limit the scope of the paper to fixed-rate codes that decode each quaternion independently and thus allow random access. Further, we assume that the unit quaternions are uniformly distributed.
2. Previous Work
Shoemake [Sho85] introduced unit quaternions to computer graphics to represent and interpolate rotations. The smallest-three method [Fie15], called in this paper, is used, for example, by the animation library ozz-animation [Bla24], the Khronos-ratified glTF extension EXT_meshopt_compression [KSP20], and the Gaussian splatting formats SPZ [Nia25] and SOG [Pla25]. The Animation Compression Library [Fre17b, Fre20] and the classic codecs of Unreal Engine 4 [Fre17a] always drop the same component ( ). The Gaussian splatting renderer of Rijsdijk et al. [RPWM26] quantizes quaternions with a method due to Reynolds [Rey17]: There, a unit quaternion is first mapped to the unit ball and then compressed. Alexa [Ale22] maps indices to orientations that are distributed almost uniformly. While decompression is , Alexa provides no inverse mapping, so compression requires a closest-point search over all orientations. This is feasible with a precomputed table for small bit budgets, but not for large ones: for 32-bit indices, a table of quaternions with four 32-bit floats each requires 64 GiB.
Quaternions can be seen as a 4D generalization of 3D unit vectors. For those, many compression schemes exist [Dee95, GKP07, KISS15, RB20]. Octahedral normal vectors [MSS10] have been used in games [GGW20, KSW21] and movies [ENSB13, CFK25]. As with unit quaternions, range quantization improves the error of unit vectors [MSS10, Kap10, Mey12]. There exist generic methods for attribute quantization [Cal02, PBCK05], as well as special variants for positions [LCL10, MSGS11, LJBA13, KXW18] and blend attributes [KM21, PKM22].
CryEngine stores tangent frames as quaternions with four 16-bit components, called QTangents [FH11]. They encode the handedness in the sign of the fourth component and bias that component away from zero, so that its sign survives quantization. DOOM Eternal fits a tangent frame into only three bytes, two for an octahedral normal vector and one for the angle of the tangent around the normal, without handedness [GGW20].
MPEG-4 [ISO05, Sec. 8.3.3] quantizes unit quaternions with the tangent-warped -parameterization, called in this paper. Lambers [Lam20] surveys warps that map the faces of a cube more uniformly onto the sphere. Zucker and Higashi [ZH18] optimize odd polynomials, a family that includes our cubic warp (Sec. 4), to minimize the area distortion on the 2-sphere. In contrast, we minimize the maximum angular error of quantized unit quaternions on the 3-sphere.
Mixed-radix vector compression of Sec. 3.4 has been proposed for vertex-blend attribute quantization [KM21]. It resembles asymmetric numeral systems with a uniform distribution [Dud14].
3. Parameterization Methods for Unit Vectors
Before we discuss quaternion compression methods in Secs. 3.2 and 3.5, Sec. 3.1 introduces the notation. We present our quantization scheme (Sec. 3.3), propose mixed-radix packing (Sec. 3.4), and contribute a thorough error analysis (Sec. 3.6).
3 of 19
3.1. Notation
We mark vectors with boldface, e.g., , and additionally mark unit vectors, where holds, with a hat, e.g., . normalizes a vector by its -norm. A scalar component of a unit vector, e.g., , keeps the hat but not the boldface. denotes the first three components of a vector. Quantized scalars or vectors are underlined, e.g., , .
We treat unit quaternions as 4D unit vectors [Sho85] and write them as with . All unit quaternions form the boundary surface of a 4D hyper-sphere called .
We use differential-geometry terminology [Cra25]. is a 3D manifold embedded in 4D space. Therefore, a few mappings – called charts – that map are sufficient to represent a unit vector. We call a set of charts that cover entirely a parameterization – an atlas in differential-geometry terminology – where is the (domain) parameter and is the chart index. The combination is called atlas coordinates. The parameterizations used in this work require one chart index or two chart indices . The number of charts for is . This way, we can compress the four values of a unit quaternion to three values and a memory-efficient chart index . Here, we do not require more than eight charts, so uses three bits at most.
3.2. A Simple Parameterization
There are several methods to compress unit vectors to atlas coordinates. They compress a direction vector , with , and decompress to a unit vector . Because we focus on real-time graphics, we pick parameterizations that are quickly evaluated and avoid expensive functions such as trigonometric functions.
As an introductory example, we use 2D unit vectors . We can compute one component from the other using two charts. Chart 0 covers the half circle for which :
and chart 1 the half circle for which :
For unit quaternion compression, the -parameterization drops one component [Fre20] and decompresses to
A subscript of f indicates the parameterization. We use for compression. It maps a unit vector to the parameters u and the chart index c. For the -parameterization, that is
where if and otherwise. To avoid negative square-root arguments, the decoder projects onto the unit ball, .
3.3. Quantization
While the chart indices are discrete, the parameters are continuous and must be quantized. We choose to uniformly quantize with a fixed-point representation. We refrain from using floats, because neither their logarithmic distribution nor their vast range offers any benefit. Additionally, floats have fixed bit sizes of 16, 32, or 64 bits, which is impractical for fine-tuning compression ratios against quality. In contrast, with fixed-point, we can configure the number of bits or even the number of discrete states for .
All parameterizations below use parameters . To quantize with discrete values, we use
and dequantize it with
where is the sample spacing. The indicates that dequantization is a lossy inverse of . Note that quantizing and dequantizing together round to the nearest sample.
For domain quantization, we map an input unit vector to atlas coordinates and quantize them to . When reversing the process, we obtain a reconstructed vector . Since quantization introduces errors, and usually differ. To assess the quantization error, we must quantify how much the two vectors differ in the directions they point to. Therefore, we use the geodesic distance, i.e., the angle between and :
Domain quantization does not produce the smallest possible quantization error, because it quantizes in the domain rather than in the range of . We obtain a lower error using range quantization: There, we map the unit vector to the domain . Then lies in a cell whose corners are samples. Those corners are the quantization candidates. Range quantization chooses the candidate minimizing the geodesic distance. This is similar to how 3D unit vectors are compressed best .
3.4. Mixed-Radix Packing
We pack the quantized atlas coordinates into a system word, typically of 16, 32, or 64 bits, but any other bit size is possible.
uint pack(uint u[], uint c1, uint c2) { uint code = c1 * C2 + c2; for (int i = 2; i >= 0; --i) code = code * U + u[i]; return code; }
void unpack(uint code, uint u[], uint& c1, uint& c2) { for (int i = 0; i < 3; ++i, code /= U) u[i] = code % U; c2 = code % C2; c1 = code / C2; }
4 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
In our case, the radices are constant integers and the compiler replaces divide and modulo operations with faster ones.
Mixed-radix packing is especially useful for quaternion compression: A method with eight charts requires three bits for the chart index. When packing a quaternion into a 32-bit word, that leaves bits for each of the three components. Unless we favor some components over others, only 9 bits per component are usable with bitfields, leaving 2 bits of the word unused. With mixed-radix packing, 29/3 bits amount to states instead of 512. This increases the accuracy of the compressed quaternions.
3.5. Parameterizations
-Parameterization: Instead of the -norm, we can use the -norm [KOF*25, Kap26]. First, we take an input vector and project it onto the hyper-octahedron by dividing the components by its -norm. Thus, we can compute from the other components, except for its sign. Therefore, during compression, we store only its sign as the chart index and the non-redundant components in :
During decompression, we reverse the process by normalizing an unnormalized vector v:
-Parameterization: The -parameterization becomes unstable for due to the square root becoming infinitely steep there. This can be avoided [Fie15, KSP20, Kap26] by finding the component of the largest magnitude of a unit vector
and permuting the components of with the permutation function , which swizzles the components of such that the component of the largest magnitude becomes the last component:
We encode its first three components in , as the chart index , and whether is negative as the chart index :
For decompression, reverts the permutation:
Here, is already of unit length, so normalizing it is unnecessary. Since the last component of has the largest magnitude, , i.e., . We scale by to before quantization and undo the scaling after dequantization.
-Parameterization is similar to the -parameterization, except that we project onto the hyper-cube by dividing the components by the maximum norm after permutation. Then, the last component is , and we store only its sign:
For decompression, we undo the permutation and normalize:
-Warped-Parameterization: When warping u during the -parameterization, we can decrease the quantization error:
where w applies the same function w to all components, so that . A known good choice for w that reduces the quantization errors is [ISO05]. In fact, is perfect for 2D. We call the resulting parameterization . However, the tangent is computationally expensive and not optimal for 3D and 4D, so we discuss various warp functions in Sec. 4. During compression, we undo the warping after the projection:
requiring w to be an invertible function.
Exp-Parameterization first converts a quaternion into a rotation axis and angle [Rey17]. Scaling the unit-length axis by half the angle gives a point inside a 3D ball with radius . Further, scaling by fits the ball into . Encoding the sign of the last component as the chart index gives the compression function:
where for . The decompression function is
3.6. Error Analysis
We find the maximum quantization error of Eq. (1) for each parameterization. For the proofs, see the appendix. We choose the maximum over the mean or median, because it is independent of any particular input distribution. Table 1 summarizes the maximum first-order errors and and their locations. We verify the results numerically in Sec. 5.1.
As with 3D unit vectors [Mey12], is ill-conditioned for quaternions. The derivative of is unbounded at the equator, which makes the maximum error . Its maximum error is not only worse than that of all other methods, but even worse
5 of 19
| Exp | |||||
|---|---|---|---|---|---|
| #Charts | 2 | 8 | 8 | 8 | 2 |
| [rad] | |||||
| [°] | 500 | 281 | 198 | 156 | 196 |
| [rad] | |||||
| [°] | 289 | 162 | 198 | 156 | 196 |
Table 1: Parameterization Method Summary. For each method (first row), we list the number of charts. Superscripts distinguish results for domain and range quantization. The rows show the first-order Taylor approximation of the maximum geodesic error. The rows show one domain point where the respective maximum geodesic error is reached. The rows show the compactness factor.
than quantizing all four components of a quaternion directly at the same bit budget. See Tab. 4 for measurements. In floating point, the cancellation in adds a further error. Therefore, we omit from the following discussion.
To compare methods at equal bit budgets, we compute a compactness factor , which accounts for the number of charts : packing a unit quaternion into bits leaves samples per parameter, hence , where is times the factor before , converted to degrees. This makes human-readable: dividing it by gives the maximum error in degrees, e.g., for at 32 bits. consistently outperforms all other methods. One reason is that the warp function dampens the worst-case error around the poles. Although this increases errors elsewhere, they remain below this new, lower maximum. Another reason is domain utilization: All of and map to unit vectors. For and , this is not the case, which wastes memory. comes close to when we use the more complex range quantization.
It is surprising that performs the worst among the analyzed methods. This contrasts with the study of 3D unit vectors [MSS*10]: There, an -parameterization variant, octahedral normal vectors, performs best. Octahedral normal vectors obtain perfect domain utilization by unwrapping the octahedron to a plane. For unit quaternions, domain utilization of is poor, and we did not find a transform from the octahedron-shaped domain to an optimal cube-shaped domain. Instead, we subdivide the domain into 16 tetrahedra. We enumerate only valid samples inside each tetrahedron with a unique integer index by adapting optimal simplex sampling [KM21]. Then a quaternion is represented as a four-bit tetrahedron index and a -bit index inside each tetrahedron, where is the number of bits for a compressed quaternion. Since a tetrahedron occupies of its enclosing cube, states per tetrahedron correspond to an equivalent cube quantized with states. This results in a sample spacing of approximately when using optimal simplex sampling [KM21]. It reduces the quantization error of by a factor of , i.e., to and (cf. Tab. 1). This is still worse than with . Furthermore, its derivation and implementation are tedious and involve numerical pitfalls and cube roots [KM21]. This contrasts with the simplicity of the other methods.

Figure 2: Compactness Factor and Optimum for unit quaternions. Top: of the cubic warp from the maximum range quantization error over all cells, measured on the codec with 32 bits. The dotted line marks , which does not depend on . Bottom: the optimum of each bit budget, by brute force up to 32 bits and refined from the previous budget above (hatched). The bit budgets omit the sign , so 32 bits give , whereas counts it, as in Tab. 1.
4. Warp Functions
Warping the domain interval as in yields the lowest error; however, it requires an expensive tangent evaluation. Therefore, we approximate the tangent with a cubic polynomial:
To keep neighboring charts seamless, we impose , , and , leaving a single parameter . One option to determine is to approximate the tangent with a Remez algorithm. The Remez algorithm finds the polynomial of minimal maximum deviation from a function over an interval, and we get . However, the tangent is only optimal for 2D unit vectors; thus, is not necessarily a good choice for quaternions. Hence, we must find that minimizes .
4.1. Finding the Optimum on the Grid
First, we choose a target bit size for our packed quaternion. For that bit size, we determine using a brute-force approach: We iterate over all cells of the quantization domain grid, find the maximum geodesic error of each cell (see Sec. 4.2), and finally take the maximum over all cells. By the symmetry of the chart in the signs and the order of its axes, it suffices to score the cells in with , i.e. of the chart.
We start with 1000 samples for and take the best . We take a subinterval around whose interval boundaries are neighboring samples of . Then we repeat this process with the new subinterval until the interval becomes smaller than . This gives
6 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
a numerically optimal for a given bit size. From that we compute . For 32 bits and range quantization, Figure 2 top shows how changes over .
This search takes roughly eight minutes on a GPU, so it is feasible for 8 to 32 bits. For larger bit sizes, we exploit that appears to converge to a fixed value as shown in Figure 2 bottom. To keep computation times manageable, we use a refinement approach: we sample at 11 points in the interval , rather than in . In addition, instead of checking all cells, we iteratively go from a coarse grid to a finer grid.
4.2. Find the Maximum Geodesic Error of a Cell
The maximum geodesic error inside a cell lies at the circumcenter of four cell corners forming a Delaunay tetrahedron. This circumcenter on the hypersphere is given by the null-space of the differences of the four decoded corners, i.e., by their 4D cross product, normalized to unit length. Out of the possible tetrahedra, we only consider those non-degenerate, with an empty circumsphere, and with a circumcenter inside the cell domain. The largest circumradius is the maximum geodesic error of the cell. For an arbitrary point set, the maximum could also lie on a face or an edge of the cell, but our experiments show that adding these candidates never changes the result.
Cells at chart boundaries, i.e., for , need special treatment: the cell is only half as wide and has no corners beyond the boundary. Its maximum can hence lie on the boundary face, so we pin the respective axis to 1 and let this constraint take the place of one equidistance constraint of the circumcenter.
4.3. Results
The optima converge to , which minimizes . Although each has an optimal , we use one for all bit budgets, as it increases the maximum error by at most 1.4% from 16 bits on and 0.23% from 24 bits on, and call the resulting parameterization . At 32 bits, this results in and , 10.7% below and 13.4% below (cf. Tab. 1). For domain quantization, is optimal, with .
In the appendix, we show that any code with states has a maximum error of at least with . Hence, for large bit budgets, needs only about bits more than this lower bound.
5. Results and Discussion
In Sec. 5.1, we empirically confirm our error analysis from Sec. 3.6 and analyze the computational complexity of decoding the different parameterizations. Next, in Secs. 5.2–5.4, we evaluate our cub in skeletal animation, tangent frames, and Gaussian splatting. For each, we compare against uncompressed quaternions and the original codec in use, report angular and image errors, and, for animation and Gaussian splatting, the runtime cost. Gaussian splatting results were measured on an NVIDIA GeForce RTX 4070 Ti, the rest on an AMD Radeon RX 7900 XTX GPU. A reference C implementation of cub is available at https://github.com/GeoFlowResearch/UnitQuaternionCompressionSupplemental.
5.1. Quantization Error and Decode Cost
For Tab. 2, we encode and decode random quaternions from Shoemake's algorithm [Sho92] with all analyzed parameterizations at various bit budgets, under both domain and range quantization schemes, and compare the measured angular error against the predictions of Sec. 3.6. All values align with the analytic predictions. Across all budgets and both quantization schemes, cub attains the lowest maximum error of all methods, at the price of a mean error at most 2 % above tan.
To measure GPU decode compute cost, we use our C implementation in AMD's HIP. For a fair comparison, we implement every other parameterization in the same style and apply the same kinds of optimizations to each decoder. We measure decode cost in GPU cycles by reading the hardware cycle counter before and after a single decode. We prevent the compiler from reordering or eliminating the code in between, and subtract the cost of an empty function.
For reference, a single sleep between two quaternions costs 171 cycles on the same GPU, so at 32 bits every decoder except tan is cheaper than one interpolation. Unpacking is cheaper whenever the payload splits evenly into three and radix packing needs no integer division, which is the case at 16 bits for Exp using a single chart bit, and at 24 and 48 bits for the methods with three chart bits. Exp and tan decoders evaluate trigonometric functions and tend to be the most expensive, while all purely algebraic decoders stay at or below 135 cycles. Thus, tan, whose warp is compiled to , costs 80 to 159 cycles more than the unwarped at every budget, whereas our cubic warp can be combined with the dequantization of Sec. 3.3 into three fused multiply-adds.
5.2. Skeletal Animation
We integrated cub into the open-source animation library ozz-animation [Bla24], called Ozz in the following, replacing only its quaternion compression scheme. Ozz uses a variant of with 48 bits per quaternion: 15 bits on each of the three stored components, two bits on the chart index, and one bit on the sign.
Since and represent the same rotation, the sign bit can be omitted, and there are libraries that do so [Fre17a]. However, Ozz does not exploit this: For Ozz's variant without the sign bit, 46 bits remain, which three integer fields cannot share equally. Therefore, Ozz keeps the sign bit and uses 15 bits per component. In contrast, our mixed-radix packing of Sec. 3.4 allows fractional numbers of bits per component, so we can omit storing the sign bit. Instead of states per component, we use .
We evaluate our two sign-free configurations: cub-48 as a storage-equivalent replacement, and cub-40 to demonstrate the effect of saving one byte per quaternion. Sign-storing variants of both isolate the effect of the recovered bit. We measure the geodesic
7 of 19
| Budget [bits] | Method | Cycles ↓ | Quaternion error [°] | Range quantization | ||||
|---|---|---|---|---|---|---|---|---|
| Mean ↓ | Max ↓ | Mean ↓ | Max ↓ | |||||
| 16 | 132 | 2.157171 | 7.429381 | 6.962015 | 2.118236 | 3.983630 | 4.019521 | |
| Exp | 129 | 2.346221 | 4.820204 | 4.871393 | 2.319461 | 4.818251 | 4.871393 | |
| 108 | 2.004001 | 4.864108 | 4.922888 | 1.979029 | 4.831496 | 4.922888 | ||
| 188 | 1.903187 | 3.821377 | 3.866427 | 1.875452 | 3.821377 | 3.866427 | ||
| 103 | 1.904901 | 3.772493 | — | 1.909772 | 3.391181 | — | ||
| 24 | 103 | 0.337169 | 0.996873 | 1.096449 | 0.331288 | 0.606464 | 0.633035 | |
| Exp | 157 | 0.369955 | 0.761963 | 0.767196 | 0.365739 | 0.755470 | 0.767196 | |
| 80 | 0.313168 | 0.754806 | 0.775306 | 0.309210 | 0.754806 | 0.775306 | ||
| 239 | 0.297412 | 0.598882 | 0.608924 | 0.292833 | 0.597885 | 0.608924 | ||
| 67 | 0.297671 | 0.589754 | — | 0.298241 | 0.523886 | — | ||
| 32 | 135 | 0.053095 | 0.162046 | 0.172680 | 0.052169 | 0.096290 | 0.099697 | |
| Exp | 155 | 0.058218 | 0.119754 | 0.120826 | 0.057554 | 0.119189 | 0.120826 | |
| 115 | 0.049321 | 0.119526 | 0.122103 | 0.048694 | 0.119526 | 0.122103 | ||
| 273 | 0.046844 | 0.094169 | 0.095900 | 0.046116 | 0.093982 | 0.095900 | ||
| 111 | 0.046889 | 0.092720 | — | 0.046965 | 0.081655 | — | ||
| 48 | 98 | 0.001317 | 0.003890 | 0.004283 | 0.001294 | 0.002384 | 0.002473 | |
| Exp | 242 | 0.001444 | 0.002972 | 0.002997 | 0.001427 | 0.002934 | 0.002997 | |
| 83 | 0.001223 | 0.002948 | 0.003029 | 0.001208 | 0.002948 | 0.003029 | ||
| 240 | 0.001162 | 0.002355 | 0.002379 | 0.001144 | 0.002339 | 0.002379 | ||
| 84 | 0.001163 | 0.002295 | — | 0.001165 | 0.002029 | — | ||
Table 2: Angular error and decode cost of each parameterization at common bit budgets, measured over uniformly random unit quaternions. is the asymptotic error prediction of Sec. 3.6. Bold marks the best value per column within each budget.
| Method | Bits | Sign bit | States | Max error [°] ↓ | Sampling [ms] ↓ |
|---|---|---|---|---|---|
| 48 | yes | 32768 | 0.00909 | 5.177 | |
| 48 | yes | 32768 | 0.00203 | 4.371 | |
| 40 | yes | 5160 | 0.01296 | 4.439 | |
| 48 | no | 41285 | 0.00161 | 4.538 | |
| 40 | no | 6501 | 0.01020 | 4.492 |
Table 3: Results on all 34884287 keyframes of the Mixamo corpus. We compare various codecs using different numbers of bits. States shows the number of states per component and sign bit indicates whether the sign bit is stored. The column max error reports the maximum geodesic error. The column sampling shows the time for 1024 skinned characters, per frame as the mean over 60 frames of the fastest of 4 runs. Bold marks the best result.
error between decoded and uncompressed quaternions over all keyframes of the Mixamo corpus [GXM*24].
Table 3 shows that at the same storage budget, reduces the maximum error of Ozz's codec by a factor of 5.6. With the same 15 bits per component as Ozz, our parameterization and range quantization alone reduce the maximum error by a factor of 4.5. Omitting the sign bit gives more states per component and reduces it by another factor of 1.26. Ozz also uses domain quantization and an approximate square root, both of which increase its error. Therefore, Ozz's error even exceeds our domain-quantization prediction for in Sec. 3.6.
With the gained flexibility of mixed-radix packing, we can use almost any bit size to pack quaternions. trades accuracy for storage and saves 33.3 MiB over the corpus. Its maximum error is 12 % above that of Ozz's -48, as shown in Tab. 3. However, in the rendering of Figure 3, both configurations produce comparable image errors.
Table 3 reports the sampling time for 1024 skinned characters. to faster than Ozz's -48 during playback. Omitting the sign bit costs slightly more sampling time but improves accuracy. Since sampling accounts for at most of the CPU frame time, the codec is effectively free at runtime, and the benefit of .
5.3. Tangent Frames
Normal mapping requires a tangent frame at every shaded fragment, i.e., a rotation, possibly combined with a reflection. Since and represent the same rotation, we can save one chart bit, which we reuse to store the handedness. Tangent frames are stored per vertex, read in every draw call, and decoded independently. We implemented all parameterizations in a Direct3D 12 renderer that encodes the tangent frames on the CPU and decodes them in the vertex shader.
We compare range quantization for , , and ,
8 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions

level; exact PSNR 34.1 dB

level; exact PSNR 29.3 dB
level; exact PSNR 32.9 dB

level; exact PSNR 31.8 dB
(a)

level; exact PSNR 35.5 dB

level; exact PSNR 33.9 dB
level; exact PSNR 29.5 dB

level; exact PSNR 33.1 dB
(b)

Figure 3: Skinning error on four keyframes of the flying animation of the demon dragon rendered at . The reference uses 32-bit floats for each of the four quaternion components. (a) Ozz's -48 baseline with 48 bits per quaternion. (b) Our cub-40 with 40 bits per quaternion. Colors show the per-pixel error to the reference image in 8-bit display levels, on the scale at the right; grey indicates . Annotations report the percentage of covered pixels within one level, the percentage of exactly matching pixels, and PSNR. Demon Dragon by EndlessVoidMC, CC BY 4.0.
and 16 bits per tangent frame. Qu naively quantizes all four components with domain quantization. With our quantization, we can never decompress for an even number of states , so we can encode the reflection in the sign of [FH11]. We evaluate on 14 glTF assets with 397328 tangent frames from the Khronos glTF Sample Assets, Poly Haven, and Smithsonian Open Access. 13 of the 14 assets lack tangents, so we derive them from the texture coordinates. Besides the geodesic error, we compare renders with compressed and uncompressed tangent frames by PSNR and LDR-FLIP [ANAM*20] over 64 views per asset, distributed on a Fibonacci sphere. All renders use a constant grey albedo, so that textures cannot mask errors. Normals are sampled from the asset's tangent-space normal map.
Table 4 shows that at every budget, cub is the most accurate parameterization in all four metrics. Compared with , it reduces the maximum error by a factor of 1.18 to 1.23, which translates into 1.1 dB to 1.3 dB higher PSNR at the same storage. Qu spends about a quarter of its bits on a redundant fourth component, so its errors are 2 to 5 times those of cub throughout. has a moderate mean but a large maximum error. Even Qu has a lower maximum error than .
At 32 bits, the rendered error of cub stays within one or two display levels over most of the model (Figure 4), whereas at 16 bits, only about a fifth of the pixels match the uncompressed render exactly, although stay within two levels. We use nine 32-bit floats to represent uncompressed tangent frames. On our GPU, tangent-frame decompression did not affect the frame time in a measurable way.
| Budget [bits] | Method | Bits used | Quaternion [°] | Image | ||
|---|---|---|---|---|---|---|
| Max ↓ | Mean ↓ | PSNR ↑ | FLIP ↓ | |||
| 32 | Qu | 32.00 | 0.4418 | 0.2210 | 58.47 | 0.00594 |
| 32.00 | 1.5535 | 0.0830 | 63.91 | 0.00304 | ||
| 32.00 | 0.0996 | 0.0537 | 70.64 | 0.00216 | ||
| cub | 32.00 | 0.0826 | 0.0475 | 71.71 | 0.00199 | |
| 24 | Qu | 24.00 | 1.7489 | 0.8943 | 46.36 | 0.01695 |
| 24.00 | 4.0199 | 0.4524 | 50.27 | 0.01057 | ||
| 24.00 | 0.6180 | 0.3425 | 54.70 | 0.00831 | ||
| cub | 24.00 | 0.5232 | 0.3019 | 55.76 | 0.00761 | |
| 16 | Qu | 16.00 | 7.4563 | 3.7285 | 34.13 | 0.04986 |
| 16.00 | 10.5876 | 2.6412 | 36.23 | 0.03952 | ||
| 15.97 | 4.1652 | 2.2977 | 38.38 | 0.03447 | ||
| cub | 15.97 | 3.3839 | 1.9354 | 39.71 | 0.03080 | |
Table 4: Compressing 397328 tangent frames from 14 glTF assets. For various methods, we use different bit budgets. Bits used is the base-2 logarithm of the number of codes, which falls short of the budget where that number is not a power of two. The quaternion columns show the max and mean geodesic error over all frames against the uncompressed frames. PSNR and FLIP are pooled over 64 views per asset at . FLIP is evaluated at 67 pixels per degree. Bold marks the best method per budget.
9 of 19
Qu
32 bits

PSNR 59.4 dB; max 5 levels 69.0% exact

PSNR 60.1 dB; max 15 levels 80.8% exact

PSNR 72.0 dB; max 2 levels 90.3% exact
cub

PSNR 73.4 dB; max 1 level 91.8% exact
24 bits

PSNR 47.2 dB; max 17 levels 84.8% ≤ 1; 32.3% exact

PSNR 47.7 dB; max 30 levels 90.7% ≤ 1; 46.1% exact

PSNR 55.7 dB; max 7 levels 97.9% ≤ 1; 58.7% exact

PSNR 57.4 dB; max 7 levels 98.7% ≤ 1; 61.6% exact
16 bits

PSNR 34.5 dB; max 48 levels 54.6% ≤ 2; 12.1% exact

PSNR 35.0 dB; max 58 levels 63.1% ≤ 2; 13.3% exact

PSNR 39.3 dB; max 33 levels 74.8% ≤ 2; 16.9% exact

PSNR 41.0 dB; max 31 levels 80.3% ≤ 2; 19.2% exact
error e in 8-bit levels
Figure 4: Tangent frame compression error on the lion head model of Poly Haven (2048 × 2048 renders). Rows correspond to the bit budget and columns to the parameterization; Qu quantizes all four components. Colors show the per-pixel error to the reference render with uncompressed tangent frames, shown at the top right of Figure 1, in 8-bit display levels on the scale at the right; grey indicates , and errors above 6 Annotations report the percentage of covered pixels with at 24 bits and at 16 bits, the percentage of exactly matching pixels, the maximum error, and PSNR. Since the error of a single view varies by almost three orders of magnitude with the view direction, Tab. 4 reports metrics over 64 views per asset.
10 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
| Budget [bits] | Method | Quaternion [°] | Image | ||
|---|---|---|---|---|---|
| Max ↓ | Mean ↓ | PSNR [dB] ↑ | FLIP ↓ | ||
| 30 | Exp | 0.3034 | 0.1533 | 45.90 | 0.02871 |
| cub (ours) | 0.1059 | 0.0584 | 46.01 | 0.02851 | |
| 24 | Exp | 1.2016 | 0.6117 | 44.62 | 0.03141 |
| cub (ours) | 0.4086 | 0.2334 | 45.83 | 0.02897 | |
| 16 | Exp | 7.7409 | 3.9188 | 35.01 | 0.06527 |
| cub (ours) | 2.6355 | 1.4818 | 41.68 | 0.03822 | |
Table 5: Gaussian rotation compression on the bicycle, garden, and room scenes. We compare two methods at different bit budgets. The column quaternion shows the geodesic errors against the uncompressed quaternion, with the maximum and mean over all Gaussians. PSNR and FLIP are averaged over five views per scene. Bold marks the better method per budget.
5.4. Gaussian Splatting
3D Gaussian splatting [KKLD23] represents a scene by millions of anisotropic Gaussians, each oriented by a unit quaternion. Compression methods for such scenes [BKL25] either cluster the rotations together with other attributes into code books [NSW24, LRS24] or quantize each rotation individually [XZT*24, Nia25, Pla25, RPWM26]. Our method belongs to the second group, which keeps every Gaussian independently decodable.
We integrate our method into the CUDA renderer of Gaussian point splatting [RPWM26], which packs the geometry of each Gaussian into 128 bits with 30 bits for the quaternion. They use exponential mapping [Rey17] for quaternion compression (Exp). Note that their Exp implementation uses incorrect rounding when quantizing, unlike our reference implementation, producing slightly worse results. We replace Exp with our cub method at 30, 24, and 16 bits. Analogously to animation keys, we can drop the sign, since and yield the same Gaussian. We evaluate on the bicycle, garden, and room scenes of Mip-NeRF 360 [BMV*22], each rendered from five close and distant viewpoints at pixels with 1024 samples per pixel.
Table 5 shows that at the same budget cub reduces the angular errors and improves image quality compared to Exp. The reference implementation with Exp achieves at 30 bits, while cub nearly achieves this quality at 24 bits. This lead increases at 16 bits with an advantage of . This also holds for FLIP, as shown in Figure 5. At equal budgets, we did not observe any measurable difference in render time; decoding the rotations takes about per frame for all of them, compared with for rendering.
6. Limitations
Our analysis bounds the error over all unit quaternions and thus spends the same precision everywhere on . For cases where the rotations are concentrated, such as the keys of an animation track that covers only a small range of rotations, methods that adapt the quantization range per track or segment [Fre20] can be more compact. We derive closed-form first-order errors for every parame- terization in Tab. 1, including tan with the tangent warp, but not for cub with the cubic warp. Range quantization makes encoding more complex than rounding, since it inverts the warp and evaluates the eight corners of a cell, but its cost remains per rotation. Identity rotations, which are frequent in animations, are reconstructed exactly only when using an odd number of states ; this is trivial to enforce but not part of our uniform analysis.
7. Conclusion and Future Work
We analyzed the maximum error of common parameterizations for unit quaternions and advanced the state of the art by proposing a new method cub: a combination of the -norm, radix packing and range quantization, providing a lower maximum error. Our evaluation confirmed this analysis empirically and showed that our decoding is computationally inexpensive. Further, we showed that cub can be used as a drop-in replacement in common graphics applications utilizing quaternions.
While this work focuses on unit quaternions (), the parameterization is not specific to them. For 3D unit vectors (), the projection onto the cube, a cubic warp optimized for , and mixed-radix packing yield a parameterization with six charts and two parameters. In future work, we will compare it with octahedral encodings and use it for the normal of tangent frames stored as a normal and an angle (Sec. 2), packing the normal, angle, and handedness into a single mixed-radix code.
Acknowledgments
We thank Dominik Baumeister. The animation clips of the ozz-animation evaluation are from Mixamo, as collected by Guo et al. [GXM24], and the Demon Dragon Full Texture model is by EndlessVoidMC (CC BY 4.0). Of the tangent frame assets, DamagedHelmet is by ctxwing after theblueturtle_ (CC BY 4.0), the rigging and animation of Fox are by tomkranis and its glTF conversion by @AsoboStudio and @scurest (CC BY 4.0), and BrainStem is by Keith Hunter (Smith Micro Software), redistributed in the Khronos glTF Sample Assets under the Poser EULA. The bicycle, garden, and room scenes of Mip-NeRF 360 [BMV22] used in the Gaussian splatting evaluation were reconstructed by Seeget3D (CC BY 4.0).
References
[Ale22] ALEXA M.: Super-Fibonacci spirals: Fast, low-discrepancy sampling of SO(3). In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (June 2022), pp. 3240–3249. 2, 13
[ANAM*20] ANDERSSON P., NILSSON J., AKENINE-MÖLLER T., OSKARSSON M., ÅSTRÖM K., FAIRCHILD M. D.: FLIP: A difference evaluator for alternating images. In High-Performance Graphics (2020), vol. 3, pp. 15:1–15:23. 8
[BKL*25] BAGDASARIAN M. T., KNOLL P., LI Y.-H., BARTHEL F., HILSMANN A., EISERT P., MORGENSTERN W.: 3DGS.zip: A survey on 3D Gaussian splatting compression methods. Computer Graphics Forum 44, 2 (2025), e70078. 10
[Bla24] BLANC G.: ozz-animation: Open-source C++ skeletal animation library and toolset, 2024. URL: https://github.com/guillaumeblanc/ozz-animation. 2, 6
11 of 19
30 bits
24 bits
16 bits
Exp

FLIP 0.0269; p95 0.055
PSNR 45.4 dB
FLIP 0.0324; p95 0.070
PSNR 42.8 dB
FLIP 0.0785; p95 0.228
PSNR 30.3 dB
0.25
0.20
0.15
0.10
0.05
0.00
cub

FLIP 0.0262; p95 0.054
PSNR 45.7 dB
FLIP 0.0270; p95 0.056
PSNR 45.3 dB
FLIP 0.0421; p95 0.105
PSNR 38.1 dB
LDR-FLIP error (67 pixels per degree)
Figure 5: Gaussian splatting compression error on the bicycle scene of Mip-NeRF 360 [BMV*22] (2048 × 2048 renders, 1024 samples per pixel). Columns correspond to the bit budget and rows to the method. Colors show the per-pixel LDR-FLIP error to the reference render with uncompressed rotations, shown at the bottom of Figure 1, on the scale at the right; white indicates zero error. Annotations report the mean and 95th percentile (p95) of LDR-FLIP, and PSNR. Table 5 reports metrics over all three scenes. Reconstruction by Seeget3D, CC BY 4.0.
[BMV*22] BARRON J. T., MILDENHALL B., VERBIN D., SRINIVASAN P. P., HEDMAN P.: Mip-NeRF 360: Unbounded anti-aliased neural radiance fields. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2022). 10, 11
[Cal02] CALVER D.: Vertex and Pixel Shader Tips and Tricks. Wordware Publishing, 2002, ch. Vertex Decompression in a Shader, pp. 172 – 187. 2
[CFK*25] CHRISTENSEN P., FONG J., KILPATRICK C., GONZALEZ F., RAVICHANDRAN S., SHAH A., JASZEWSKI E., FRIEDMAN S., BURGESS J., ROY T. M., NETTLESHIP T., SESHADRI M., SALITURO S.: RenderMan XPU: A hybrid CPU+GPU renderer for interactive and final-frame rendering. In High-Performance Graphics (HPG) / Eurographics (2025), Eurographics - The European Association for Computer Graphics. 2
[Cra25] CRANE K.: Discrete differential geometry: An applied introduction. Lecture Notes, Carnegie Mellon University, 2025. URL: https://www.cs.cmu.edu/~kmcrane/Projects/DDG/paper.pdf. 3
[Dee95] DEERING M.: Geometry compression. In SIGGRAPH '95 (1995). 2
[Dud14] DUDA J.: Asymmetric numeral systems: entropy coding combining speed of Huffman coding with compression rate of arithmetic coding, 2014. arXiv:1311.2540.2
[ENSB13] EISENACHER C., NICHOLS G., SELLE A., BURLEY B.: Sorted deferred shading for production path tracing. Computer Graphics Forum 32, 4 (2013), 125–132. 2
[FH11] FREY I. Z., HERZEG I.: Spherical skinning with dual quaternions and QTangents. In ACM SIGGRAPH 2011 Talks (2011), SIGGRAPH '11, Association for Computing Machinery. 2, 8
[Fie15] FIEDLER G.: Snapshot compression. Gaffer On Games, 2015. URL: https://gafferongames.com/post/snapshot_compression/. 2, 4
[Fre17a] FRECHETTE N.: Animation compression: Unreal 4, 2017. URL: http://nfrechette.github.io/2017/01/11/anim_compression_unreal4/. 2, 6
[Fre17b] FRECHETTE N.: Simple and powerful animation compression. Game Developers Conference (GDC), 2017. 2
[Fre20] FRECHETTE N.: Animation compression library. https://github.com/nfrechette/acl, 2020. 2, 3, 10
[GGW20] GEFFROY J., GNEITING A., WANG Y.: Rendering the
12 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
hellscape of DOOM eternal. Advances in Real-Time Rendering in Games, SIGGRAPH Courses, 2020. 2
[GKP07] GRIFFITH E. J., KOUTEK M., POST F. H.: Fast Normal Vector Compression with Bounded Error. In Proceedings of the Fifth Eurographics Symposium on Geometry Processing (2007), pp. 263–272. 2
[GXM*24] GUO Z., XIANG J., MA K., ZHOU W., LI H., ZHANG R.: Mixamo animation dataset, 2024. Released with Make-It-Animatable (CVPR 2025). URL: https://huggingface.co/datasets/jasongzy/Mixamo. 7, 10
[HPS08] HORMANN K., POLTHIER K., SHEFFER A.: Mesh parameterization: Theory and practice. In SIGGRAPH Asia 2008 Course Notes (Singapore, Dec. 2008), no. 11, ACM Press, pp. v+81. 13
[ISO05] ISO/IEC: 14496-11:2005 – Information technology – Coding of Audio-Visual Objects – Part 11: Scene Description and Application Engine, 2005. 2, 4
[Kap10] KAPLANYAN A.: CryEngine 3: Reaching the speed of light. SIGGRAPH Course, 2010. 2
[Kap26] KAPOULKINE A.: Quantizing tangent frames, 2026. URL: https://zeux.io/2026/04/30/quantizing-tangent-frames/. 2, 4
[KISS15] KEINERT B., INNMANN M., SÄNGER M., STAMMINGER M.: Spherical Fibonacci mapping. ACM Trans. Graph. 34, 6 (Oct. 2015). 2
[KKLD23] KERBL B., KOPANAS G., LEIMKUEHLER T., DRETTAKIS G.: 3D Gaussian Splatting for Real-Time Radiance Field Rendering. ACM Transactions on Graphics 42, 4 (Aug. 2023), 1–14. doi:10.1145/3592433.2, 10
[KM21] KUTH B., MEYER Q.: Vertex-blend attribute compression. In High-Performance Graphics - Symposium Papers (2021), Binder N., Ritschel T., (Eds.), The Eurographics Association. 2, 5
[KOF*25] KUTH B., OBERBERGER M., FABER C., PFEIFER P., TABAEI S., BAUMEISTER D., MEYER Q.: Real-time GPU tree generation. In High-Performance Graphics (2025), The Eurographics Association. 2, 4
[KOK*25] KUTH B., OBERBERGER M., KAWALA F., REITTER S., MICHEL S., CHAJDAS M. G., MEYER Q.: Real-time meshlet decompression. Computers & Graphics 131 (2025), 104292. 2
[KSP20] KAPOULKINE A., ST. PIERRE J.: EXT_meshopt_compression: glTF 2.0 extension. Khronos Group, 2020. URL: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md. 2, 4
[KSW21] KARIS B., STUBBE R., WIHLIDAL G.: A deep dive into Nanite virtualized geometry. In ACM SIGGRAPH (2021). 2
[KXW*18] KWAN K. C., XU X., WAN L., WONG T., PANG W.: Packing vertex data into hardware-decompressible textures. IEEE Transactions on Visualization and Computer Graphics 24, 5 (2018). 2
[Lam20] LAMBERS M.: Survey of cube mapping methods in interactive computer graphics. The Visual Computer 36, 5 (2020), 1043–1051. 2
[LCL10] LEE J., CHOE S., LEE S.: Compression of 3D Mesh Geometry and Vertex Attributes for Mobile Graphics. JCSE 4 (09 2010). 2
[LJBA13] LIMPER M., JUNG Y., BEHR J., ALEXA M.: The pop buffer: Rapid progressive clustering by geometry quantization. In Computer Graphics Forum (2013), vol. 32, Wiley Online Library, pp. 197–206. 2
[LRS*24] LEE J. C., RHO D., SUN X., KO J. H., PARK E.: Compact 3D Gaussian representation for radiance field. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2024). 10
[Map26] MAPLESOFT, A DIVISION OF WATERLOO MAPLE INC.: Maple. Waterloo, Ontario, 2026. Version 2026. 12
[Mey12] MEYER Q.: Real-Time Geometry Decompression on Graphics Hardware. PhD thesis, 08 2012. 2, 4, 12
[MSGS11] MEYER Q., SUSSNER G., GREINER G., STAMMINGER M.: Adaptive level-of-precision for GPU-rendering. In Vision, Modeling, and Visualization (2011), The Eurographics Association. 2
[MSS*10] MEYER Q., SÜSSMUTH J., SUSSNER G., STAMMINGER M., GREINER G.: On floating-point normal vectors. In Proceedings of the 21st Eurographics Conference on Rendering (2010), EGSR'10, Eurographics Association. 2, 3, 5
[Nia25] NIANTIC SPATIAL: SPZ: A file format for 3D Gaussian splats, 2025. URL: https://github.com/nianticlabs/spz. 2, 10
[NSW24] NIEDERMAYR S., STUMPFEGGER J., WESTERMANN R.: Compressed 3D Gaussian splatting for accelerated novel view synthesis. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2024), pp. 10349–10358. 10
[PBCK05] PURNOMO B., BILODEAU J., COHEN J. D., KUMAR S.: Hardware-compatible vertex compression using quantization and simplification. In Graphics Hardware 2005 (2005), pp. 53–62. 2
[PKM22] PETERS C., KUTH B., MEYER Q.: Permutation coding for vertex-blend attribute compression. Proc. ACM Comput. Graph. Interact. Tech. 5, 1 (may 2022). 2
[Pla25] PLAYCANVAS: The SOG format, 2025. URL: https://developer.playcanvas.com/user-manual/gaussian-splatting/formats/sog/. 2, 10
[RB20] ROUSSEAU S., BOUBEKEUR T.: Unorganized unit vectors sets quantization. Journal of Computer Graphics Techniques (JCGT) 9, 3 (2020). 2
[Rey17] REYNOLDS M. B.: Quaternion quantization: Part 1, 2017. URL: https://marc-b-reynolds.github.io/quaternions/2017/05/02/QuatQuantPart1.html. 2, 4, 10
[RPWM26] RIJSDIJK J., PETERS C., WEINMANN M., MARROQUIM R.: Gaussian point splatting. ACM Transactions on Graphics (TOG) 45, 4 (2026), 1–11. 2, 10
[Sho85] SHOEMAKE K.: Animating rotation with quaternion curves. In Proceedings of the 12th Annual Conference on Computer Graphics and Interactive Techniques (1985), SIGGRAPH '85, pp. 245–254. 2, 3
[Sho92] SHOEMAKE K.: Uniform random rotations. In Graphics Gems III, Kirk D., (Ed.). Academic Press, 1992, pp. 124–132. doi:10.1016/B978-0-08-050755-2.50036-1.6
[XZT*24] XIE S., ZHANG W., TANG C., BAI Y., LU R., GE S., WANG Z.: MesonGS: Post-training compression of 3D Gaussians via efficient attribute transformation. In Computer Vision – ECCV 2024 (2024), Springer. 10
[ZH18] ZUCKER M., HIGASHI Y.: Cube-to-sphere projections for procedural texturing and beyond. Journal of Computer Graphics Techniques (JCGT) 7, 2 (2018), 1–22. 2
Appendix A: AI Statement
The following proofs were made with the help of the Computer Algebra Systems Maple 2026 [Map26] and the AI assistant Claude (model Opus 5.5). Prior work on 3D unit vectors [Mey12] served as a starting point. The authors developed the proof strategies, verified every step by hand, reworked arguments into short proofs, verified the results numerically, wrote the text, and are responsible for the content.
Appendix B: Errors for Quantized Quaternions
When quantizing the components of an input quaternion , each component is quantized on its own. Using rounding, this changes each component by at most . Therefore, the error vector has length at most . Since has unit length, the angle between and is at most . Therefore, to first order
13 of 19
The bound is approach for if the grid lies such that the two components round up and two round down.
Appendix C: A Lower Bound
An optimal unit vector representation distributes 4D unit vectors across such that their maximum geodesic error is as small as possible. We bound from below following Alexa [Ale22, Eq. (17)]. Every point of lies within of one of the unit vectors. Hence, the Voronoi cell of each unit vector lies inside the spherical cap of radius around it, and the caps cover . Each cap has a volume of at most and has a volume of , so and
where for a k-bit code, so is directly comparable to the compactness factors in Tab. 1. No parameterization with codes can have a smaller maximum error.
Appendix D: Error Analysis for Parameterization Methods
For each parameterization , we determine the locations and where the domain error and the range error are the largest. Due to symmetry, we consider only non-negative on a single chart. Thus, we omit the chart index. Since is typically computed from an unnormalized function , with and , we write
From here on, we suppress arguments, such as , whenever they are clear from the context. Further, is the Jacobian of . Its th column is . We use an analogous notation for the Jacobian of . We write for an identity matrix, for the th canonical unit vector, and is a vector whose components are 1. The dimensions become apparent from the context.
D.1. Error Metrics
Let be a grid point and , the parameters of an input unit vector in the grid cell whose lowest corner is . We do not tie the grid to a particular quantizer, so our bounds hold for any placement of the samples. The encoder replaces them by a corner of that cell, chosen from the candidates . The maximum error of Eq. (1) over all inputs is
Range quantization considers all cell corners, thus . Domain quantization rounds each parameter, so . For small angles, the geodesic and Euclidean distances converge:
Similar to how the metric distortion is computed for mesh parameterization [HPS08], we use the first-order Taylor approximation:
We call the rounding error. Since we seek only first-order approximations and our parameterizations are , Taylor's theorem guarantees that the remainder is , and we drop it. Squaring does not change the location of the maximum, and with . The constant factor does not change the location of the maximum, either. Thus, to first order in , our optimization function becomes
We call the first-order maximum error . It satisfies and can be computed by
Next, we bring Eq. (5) into a form from which we can read off the maximum more easily. To do so, we first compute from by applying the product rule to Eq. (2):
Since depends on , we need . Applying the chain rule and inserting this back yields
With some further simplifications and , we get:
Note that and, since , .
With Eq. (7) we get
which we then insert into Eq. (5):
Here, is the rounding error carried over to , i.e., the first-order change of , in units of . Simplifying the terms of and observing that yields
14 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
We bound further
D.2. Domain Quantization
We have , thus . Further, is convex in , because is positive semidefinite. Therefore, it is sufficient to consider only in Eq. (4).
D.2.1. -Parameterization
Since we assume , for . To bound the denominator of Eq. (9), we use that sum to and the Cauchy–Schwarz inequality
Thus, . To find the location of the maxima, equality must hold. That is the case, if is a multiple of , i.e., all components of must be equal. Since they sum to , .
The Jacobian of and the offset are
Note that the components of sum to and for . This makes the bound tight for Eq. (9).
Next, we bound the numerator of Eq. (9) with
Equality holds for .
Putting the two bounds together into Eq. (9), we get
With Eq. (10), we obtain the maximum error and its location:
D.2.2. -Parameterization
For , (cf. Eq. (2)), because at least one component of has magnitude one. This provides a lower bound for the denominator of Eq. (9). For its numerator, we compute
This lets us further bound Eq. (9):
The bound becomes tight if . This can only hold if . Then the subtracted term of Eq. (8) vanishes, because . With Eq. (10), we obtain the maximum error and its location:
D.2.3. tan-Parameterization
Here, we get for and . So where . Since the derivative of is ,
Since ,
Because , and hence :
This lets us bound Eq. (9)
At , all and . Thus, every inequality above becomes an equality and the subtracted term of Eq. (8) vanishes. Inserting into Eq. (10) gives us:
D.2.4. -Parameterization
Here, with . Note that permutes the component such that . We compute
This parameterization already produces normalized vectors, thus and the denominators in Eq. (8) become 1. Further,
15 of 19
the subtracted term vanishes too, since
Hence, for every offset y,
For domain quantization, , so . To bound the second term we use and :
and thus:
For the bound on , Eq. (13) must be attained. This is the case if and . That means and therefore . Since scales its parameters by before quantization, the grid spacing in is instead of . Inserting into Eq. (10) with this spacing gives :
D.2.5. Exp-Parameterization
For the chart , with . Here because this parameterization already produces a unit vector. Therefore, . With , , and , differentiating yields
Multiplying with y gives
The subtracted term of Eq. (8) vanishes, since and give
Hence, . We expand block by block. The upper block is a sum of and a multiple of . Its squared norm consists of the squared norms of both summands and twice their dot product. With , these are
The last two terms share the factor , and their coefficients add up to
The lower block contributes . Adding both blocks and using yields
Since , , and since ,
At , and equality holds for every . Inserting into Eq. (10) gives:
D.3. Range Quantization
Range quantization picks the cell corner that minimizes the angle to the input unit vector. Since , it can always pick the same corner as domain quantization, so .
The worst input point for domain quantization is the cell center. At the cell center, the offset to every corner is . If is diagonal, takes the same value for every choice of . For this input, range quantization cannot improve on domain quantization. Together with , both maximum errors coincide. This is the case for , , and Exp, because at their domain maximizer , is diagonal.
D.3.1. -Parameterization
The identity in Eq. (11) holds for every corner:
Range quantization picks the best of all corners, so its error is at most that of any particular corner. For domain quantization, the second term reaches . We now construct a corner whose second term is at most , while its first term stays at most .
We find this corner as follows: Recall from Eqs. (3) and (6) that is the position of the input in its cell, is a
16 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
corner, and . Let and . We obtain from by setting its largest components to 1 and the others to 0. Since the components of sum to , , so
Further, still holds: For , , therefore . Because , . Therefore,
For , i.e., , let be the largest component. Further, and the other are zero.
Because for , we have :
Further, .
Because and , as the largest component, is at least the average, , we can replace by . Since means , we get
The cases and follow from and by substituting with , which negates .
Hence, , and with from the domain case, .
Equality holds for , where every corner has , at , where and . Inserting into Eq. (10) yields:
D.3.2. -Parameterization
The offset and Eq. (12) from Sec. D.2.4 hold for every offset . With , which follows from , they read
Range quantization picks the best corner. Therefore, it suffices to show that the average of Q over a random corner is at most 1.
Domain quantization rounds each component on its own, . In the worst case, all rounding errors have the same sign and add up in , so the second term of reaches .
To obtain a random corner, we replace the fixed threshold by a random , drawn uniformly from , i.e., we dither:
It rounds up with probability , so it is correct on average. However, the rounding errors of the components can still add up in . We avoid this by rounding running sums instead of components. First, we renumber the axes such that , which renumbers the components of , , and alike and leaves unchanged. The running sums are
Rounding instead of the components keeps the sum of the first rounding errors small. With decreasing weights, can be expressed as a convex combination of the errors of the running sums, with coefficients from , as we show below. We dither all running sums with the same and obtain the components of as differences:
Since , inverting the differences gives
analogous to the running sums of . Subtracting these from the running sums of yields the running sums of the rounding errors from Eq. (4):
Since is rounded to a neighboring integer, all three stay below 1 in magnitude: , , and . Since , we have , so is a corner.
Each rounded running sum is exactly for , i.e., with probability equal to the fractional part , and otherwise. Hence,
Equation (15a) gives Eq. (15b), which we need for the first term of : Since has the expected value , it is 1 with probability , so is with probability and otherwise. Because the expected value of a sum is the sum of the expected values, and ,
17 of 19
For the second term of , we compute . Therefore, we need the squared errors of the rounded running sums, where is when rounding up and when rounding down:
Further, let and for with . Since the weights decrease, all , and they sum to 1. By Eq. (14), , , and . With ,
is a convex combination. Since squaring is convex, Jensen's inequality gives
Taking the expected value and bounding each with Eq. (16) gives
since the are nonnegative and sum to 1. Thus, . If every corner had , the average would exceed 1. Hence, the best corner has .
At the domain boundary, a coordinate has only one candidate, e.g., . There, forces , so and with each coordinate rounded to its nearest candidate.
With the grid spacing of , the error is at most . Equality holds for , i.e., , and , where every corner has :
Appendix E: Error Analysis of the -Parameterization
Next, we analyze the -parameterization, which reconstructs . To avoid negative arguments of the square root, is projected onto the unit ball, . In expressions such as , we assume that this projection has implicitly happened. We consider only one chart and, on that chart, only non-negative parameters, ; the other cases follow from symmetry.
Since the Jacobian of -parameterization is unbounded where , the Jacobian-based approach of Sec. D fails for . For ,
holds because
Quantization yields the parameters and the reconstructed component . We get from Eq. (17):
Equality holds if , i.e., if or lies on the equator, where or .
E.1. Domain Quantization
We further bound :
Next, we bound the two factors separately. A grid cell has a diagonal of length . Since rounding picks the nearest grid point, and are at most half a cell diagonal apart, so . Note that this also holds if is projected, since projecting onto the unit ball never moves a point away from , which lies inside it. Further, and , hence . Therefore,
We claim that the bound is attained for on the equator: Suppose rounds inward to . Then , and , which matches the bound in Eq. (19) up to .
Since and , the change of dominates, and . The chord between and is at least , since is one of its components. Further, the arc is at least as long as the chord. Hence, . As in Sec. D.1, denotes the leading term. Here, the remainder is . We conclude
E.2. Range Quantization
Let be the parameters we wish to quantize and . By Eq. (18), a candidate with has if . We show that such a candidate always exists.
18 of 19
Faber et al. / Compression of Uniformly Distributed Unit Quaternions
Say lies in a full cell and let be its corner closest to the origin. We walk to the opposite corner via , , and . From one corner to the next, the squared norm increases by at most , e.g., , since . Since lies between and , one corner is within of it, i.e., .
The walk needs a full cell, which exists everywhere except for , where the unit ball domain touches the boundary of at . There, every candidate has , so , and again . This bound is attained at , where and every candidate has , so . With the chord argument of the domain case, we conclude
Appendix F: Symbols
The tables list the symbols of the paper and of this appendix. Symbols used by a single proof come last, with the section of that proof.
| Notation | |
|---|---|
| vector and its th component | |
| unit vector, , and its th component | |
| first three components of | |
| quantized scalar and vector | |
| reconstructed scalar and vector | |
| vectors whose components are and | |
| th canonical unit vector | |
| identity matrix | |
| normalization | |
| nearest integer, per component | |
| angle between and | |
| expected value | |
| unit sphere and unit hyper-sphere | |
| number of components of a unit vector | |
Parameterizations
| parameterization, decompresses and to a unit vector; a subscript names the method | |
|---|---|
| compression, maps a unit vector to and | |
| (domain) parameters | |
| chart indices | |
| number of charts, in total and for | |
| unnormalized vector, | |
| squared norm | |
| index of the component of largest magnitude | |
| permutation, moves component to the end | |
| warp function, applies to each component | |
| warped parameters of | |
| cubic warp | |
| tangent warp | |
| cubic warp parameter, minimizer of | |
| of the Remez fit of | |
| scale factor of | |
| scaled norm of |
Parameterization methods
| drops a fixed component | |
|---|---|
| drops the component of largest magnitude | |
| projects onto the hyper-octahedron | |
| projects onto the hyper-cube | |
| with a warp function | |
| with | |
| with | |
| Exp | rotation axis scaled by half the angle |
| Qu | quantizes all four components |
Error metrics
| input position in its cell, in units of | |
|---|---|
| chosen corner of the cell | |
| candidate corners, or | |
| rounding error , in units of | |
| angle between the input and the chosen corner | |
| Jacobian matrices of and | |
| Gram matrix | |
| projection onto the tangent space at | |
| first-order squared error , in units of | |
| rounding error carried over to |
19 of 19
| Quantization and errors | |
|---|---|
| number of states per parameter | |
| sample spacing | |
| quantization and dequantization | |
| number of bits of a compressed quaternion | |
| number of codes, | |
| maximum quantization error | |
| of domain quantization | |
| of range quantization | |
| lower bound on for codes | |
| location of | |
| location of | |
| compactness factor in degrees, | |
| of | |
| of | |
| of | |
| color error max () of a pixel | |
| Symbols of single proofs | Section | |
|---|---|---|
| D.2.3 | ||
| D.2.5 | ||
| direction | D.2.5 | |
| and round | D.3.1 | |
| weights | D.3.2 | |
| random threshold, uniform in | D.3.2 | |
| running sums of and | D.3.2 | |
| fractional part of | D.3.2 | |
| error of a running sum | D.3.2 | |
| convex weights from | D.3.2 | |
| fourth component of and its reconstruction | E | |
| E | ||
| E | ||
| corners on a walk through the cell | E.2 | |