-
-
Notifications
You must be signed in to change notification settings - Fork 63
USDA ZSTD compression
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.
Use default setting for zstd compression level(3)
DamagedHelmet.usda : 21.11% (1779190 => 375546 bytes, DamagedHelmet.usda.zst)
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)
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.
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
HDR texture may be compressed with zstd. We haven't yet explored zstd use for HDR textures.