Skip to content

v0.21

Latest
Compare
Choose a tag to compare
@zeux zeux released this 25 Jun 19:13
· 179 commits to master since this release

This release contains improvements to the meshoptimizer library and many gltfpack enhancements! Notably, the introduction of sparse and absolute error simplification options in meshopt_simplify as well as per-vertex locking in meshopt_simplifyWithAttributes improves Nanite-style processing pipelines, meshlet optimization increases rasterization performance further on NVidia hardware, and gltfpack now preserves most data compression / optimization extensions which makes it easier to compose with other glTF processing tools.

Library improvements

  • Introduce experimental meshopt_optimizeMeshlet algorithm that should be used to optimize individual meshlets for rendering efficiency (mostly affects NVidia hardware but can be used for other vendors as well)
  • meshopt_simplifyWithAttributes now takes an additional optional array, vertex_lock, which allows specifying 1 for individual vertices that should not be moved during simplification (note that this is an interface change and will require source changes; the API continues to be experimental and may see further changes in future releases)
  • meshopt_simplify options now support a new flag, meshopt_SimplifySparse, which significantly increases simplification performance when simplifying small subsets of a larger mesh (note that the error in this mode is relative to the subset, as such use of meshopt_SimplifyErrorAbsolute is recommended for consistency)
  • meshopt_simplify options now support a new flag, meshopt_SimplifyErrorAbsolute, which treats target error and the result error as absolute (in mesh coordinate space) instead of relative to mesh extents
  • Simplifier now tries harder to prevent triangle flips at a minimal cost to simplification performance and efficiency
  • meshopt_optimizeVertexCache now needs ~5% less memory and is ~7% faster on Windows
  • MESHOPT_SOVERSION CMake option can be used to customize .so version for shared library builds

gltfpack improvements

  • Implement support for KHR_texture_basisu and EXT_texture_webp extensions in the input files; the extensions and images will be preserved as is regardless of compression flags
  • Implement support for EXT_mesh_gpu_instancing extension in the input files; instanced meshes will be preserved regardless of -mi flag
  • Implement support for EXT_meshopt_compression extension in the input files; files using this extension will be automatically decompressed (and recompressed if -c/-cc is specified)
  • Implement support for KHR_materials_dispersion extension
  • Implement attribute aware simplification: when -sv flag is specified, vertex colors and normals are used during simplification to improve appearance
  • Image names are now preserved when present in the input file
  • Improve texture compression when using UASTC format: textures are now a little smaller by default, and using low quality levels via -tq allows to push compressed size further down at the expense of some quality loss
  • Improve behavior of simplification with extremely low factors (eg -si 0)
  • Improve behavior of quantization when the input file is already quantized
  • Improve behavior for textures that are missing on disk when the output file is a GLB
  • Automatically fix incorrect MIME type for PNG/JPEG input textures
  • Normal attributes are removed for meshes that use unlit materials to reduce size
  • Normals can be optionally stored without quantization by using -vnf flag (only needed for rare edge cases involving morph targets, prefer -vn to increase normal quality)

Thanks to @ruby0x1, @sciecode and @oisyn for contributions to this release!