Skip to content

v0.22

Latest
Compare
Choose a tag to compare
@zeux zeux released this 25 Oct 17:26
· 109 commits to master since this release
4affad0

This release contains many improvements to the meshoptimizer library and some gltfpack enhancements!

Notably, meshopt_simplifyWithAttributes has seen significant improvements to attribute handling, meshopt_simplify* algorithms now produce results with fewer triangles and better quality on meshes with complex topology, meshopt_buildMeshlets produces slightly more optimal clusterization, and gltfpack will often produce smaller outputs due to geometry deduplication and improved quantization.

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

  • A new algorithm, meshopt_generateProvokingIndexBuffer, generates an index buffer that can be used to efficiently render visibility buffers by using nointerpolate attributes
  • meshopt_simplifyWithAttributes now uses an improved attribute metric that mixes better with positional error and results in more intuitive weighting
  • meshopt_simplifyWithAttributes now properly tracks attribute errors across attribute discontinuities
  • meshopt_simplifyWithAttributes no longer spends time or memory on attributes with weight 0, and allows up to 32 scalar attributes
  • meshopt_simplifyWithAttributes now has better support for vertex_lock if the input lock flags are inconsistent on discontinuities
  • meshopt_simplify* can now collapse some edges that were previously restricted which improves quality and reduces minimum reachable triangle count
  • meshopt_simplify* now support component pruning via a new experimental meshopt_SimplifyPrune option which disregards interior topology and removes components entirely
  • meshopt_simplify* are now ~5-10% faster on large meshes due to better memory access patterns and improved scheduling
  • meshopt_simplify* use more accurate computations to improve quality and convergence
  • meshopt_simplifyPoints uses an improved color metric that results in more intuitive weighting
  • meshopt_buildMeshlets uses improved heuristics to produce up to ~1% fewer meshlets on large meshes with fewer disconnected meshlets
  • meshopt_decodeFilter* and meshopt_encodeFilter* family of functions are now stable
  • meshopt_encodeFilterExp supports an extra experimental mode, meshopt_EncodeExpClamped, which can be used on texture coordinates for a better balance between quality and size

gltfpack improvements

  • Mesh geometry is now deduplicated based on its contents, which can significantly reduce the size of the output in some cases and improve instancing efficiency
  • When quantization is enabled, normals/tangents are quantized before reindexing which can significantly improve the output size/efficiency without affecting quality
  • Optionally keep unused vertex attributes if -kv is specified; together with -vtf this can be used to preserve UV mapping on assets without materials/textures
  • Simplification error can now be specified via a new -se command line option
  • Fix handling of files with Unicode paths on Windows (starting from Windows 10)
  • Fix incorrect mesh merging across scene boundaries for multi-scene assets
  • Fix rare cases where output JSON would be invalid due to Inf/NaN values

JS improvements

  • A new module, MeshoptClusterizer, exposes meshlet clustering and bounds computation functionality (by @JolifantoBambla)
  • simplifyWithAttributes now correctly supports vertex_lock argument and expects it to be Uint8Array (instead of JS array) when specified

Thanks to @JolifantoBambla and @Ono-Sendai for contributions to this release!