This release contains many improvements to the meshoptimizer library and some gltfpack enhancements! Some highlights:
Vertex codec v1 (enabled via meshopt_encodeVertexVersion(1)
) provides increased compression ratio, faster decompression speed, and customizable compression levels. Depending on input data, compressed data can be up to 5-10% smaller and decode up to 10% faster. Additionally, decoding has been further optimized for modern AArch64 CPUs, achieving 20% higher decoding speed on Apple Silicon for both versions (up to 30% overall improvements for v1).
Meshlet builder (meshopt_buildMeshlets
) now generates fewer disconnected clusters, improving rasterization performance by up to 5% on certain meshes. Additionally, this algorithm now exposes extra options (via meshopt_buildMeshletsFlex
) to create more axis-aligned clusters and further reduce disconnected clusters. This benefits use cases like clustered ray tracing (for Nvidia RTX) and hierarchical clusterization. For hierarchical clusterization, a new experimental algorithm, meshopt_partitionClusters
, can be used to build the cluster hierarchy, and meshopt_computeSphereBounds
can be used to compute the necessary bounds.
The majority of the work on the core library in this release has been sponsored by Valve; thank you!
Note: gltfpack development is done in spare time; potential corporate sponsors should feel free to reach out via e-mail.
Library improvements
meshopt_encodeVertexVersion
now supports version 1, which results in better compression ratio and faster decoding- Default vertex codec version does not change in this version; applications that produce compressed data for glTF storage should call
meshopt_encodeVertexVersion(0)
to ensure that future library upgrades do not alter the encoding - An experimental function,
meshopt_encodeVertexBufferLevel
, allows adjusting the compression level to balance between compression ratio and encoding speed (only available for version 1) meshopt_decodeVertexBuffer
has been further optimized for some AArch64 systems, with up to 20% speedup on Apple Siliconmeshopt_decodeVertexVersion
/meshopt_decodeIndexVersion
allow inspecting the encoded version of the compressed buffermeshopt_simplifyWithAttributes
uses a more careful evaluation of attribute error on attribute seams, improving attribute qualitymeshopt_buildMeshlets
now produces significantly fewer disconnected clusters, resulting in ~5% rasterization performance improvement in some casesmeshopt_buildMeshlets
is significantly faster and uses less memory for sparse mesh subsets (e.g. groups of clusters)meshopt_buildMeshlets*
functions now supportmax_vertices=256
(up from 255)- An experimental algorithm,
meshopt_buildMeshletsFlex
, allows more flexible cluster sizing and using axis-aligned bounds, which can improve clusterization quality for hierarchical clusterization and/or raytracing clusters - An experimental algorithm,
meshopt_computeSphereBounds
, allows computing sphere bounds for groups of spheres or large meshes (as a complement tomeshopt_computeMeshletBounds
which is only useful for meshlets) - An experimental algorithm,
meshopt_partitionClusters
, allows partitioning a set of clusters into larger groups, which is useful for hierarchical simplification meshopt_quantizeHalf
/meshopt_quantizeFloat
are nowextern "C"
to allow proper use from non-C++ codemeshopt_simplifyWithAttributes
,meshopt_simplifyPoints
,meshopt_optimizeMeshlet
, andmeshopt_EncodeExpClamped
are now stable- CMake option
MESHOPT_INSTALL
allows disabling installation targets when building the library
gltfpack improvements
- Improve UV seam preservation for meshes with UV mirroring
- Implement support for
KHR_materials_diffuse_transmission
extension - Allow disabling animation resampling by specifying frequency 0 (
-af 0
) - Allow per-texture-class control for texture scaling (
-ts
) and limit (-tl
) - Preserve primitive
extras
when-ke
is specified - Warn when position quantization error is significant and
-vpf
is not specified
JavaScript changes
simplifyWithAttributes
andsimplifyPoints
no longer requireMeshoptSimplifier.useExperimentalFeatures
- npm version of
gltfpack
now requires Node 18+ due to a WASI update
Thanks to @hankarun and @JulienIcon, as well as Nvidia engineers, for contributions to this release!