Skip to content

USDA ZSTD compression

Syoyo Fujita edited this page Jun 17, 2025 · 4 revisions

Many people like ASCII format. USDC binary(Crate format) is compact, but not human friendly.

As of 2025, zstd is commonly used compression algorithm for generic data compression in terms of compression level and enc/dec speed. It can also compress USD scene well, so we'd like to propose USDA + zstd compression.

Example(DamagedHelmet)

Use default setting for zstd compression level(3)

USDA: 1.7 MB

DamagedHelmet.usda : 21.11% (1779190 => 375546 bytes, DamagedHelmet.usda.zst)

USDC: 484 KB

DamagedHelmet.usdc : 50.55% (494728 => 250106 bytes, DamagedHelmet.usdc.zst)

USDA + zstd compression achieves competitive file size against USDC(although USDC can be compressed further with USDC + zstd)

Why USDC can be compressed further with zstd?

USDC only compress integer arrays(with LZ4 compression). floating point arrays stay uncompressed(precisely say, it compress floating point array with all 0 or 1, or ~255(can be quantized to 8bit), but its uncommon for practical scenes). So we'll get a further compression using zstd compression.

Faster ASCII parser + writer

We need faster ASCII parser and writer to make USDA + zstd practical. TinyUSDZ project is trying to write faster ASCII parser and writer, inspired by simdjson https://github.com/simdjson/simdjson At the moment, we are getting 600~800 MB/s for parsing floating point array on DDR4 Ryzen 3900X single core.

https://github.com/lighttransport/tinyusdz/tree/fast-string/sandbox/parse_fp

TODO: Compressing HDR textures

HDR texture may be compressed with zstd. We haven't yet explored zstd use for HDR textures.

Clone this wiki locally