Skip to content

v0.20

Latest
Compare
Choose a tag to compare
@zeux zeux released this 02 Nov 19:53
· 74 commits to master since this release

This release contains new algorithms and improvements to the meshoptimizer library, many gltfpack enhancements and JS library updates! Importantly, an experimental meshopt_simplifyWithAttributes algorithm can take attribute information into account for better appearance, and gltfpack now copies texture files to the output folder when the output format is .gltf (which can be disabled via -tr option).

Note that attribute-aware simplification is still in development, and there are some known issues with attribute weighting, discontinuities and geometry preservation, so the interface and behavior is subject to change in future releases. Issue #158 can be tracked for development progress.

Library improvements

  • The default index encoding version for meshopt_encodeIndexBuffer and meshopt_encodeIndexSequence has been updated to 1. Version 1 has been supported since meshoptimizer 0.14 and is the version that is part of glTF EXT_meshopt_compression extension; if legacy version 0 is needed, this can be overridden via meshopt_encodeIndexVersion.
  • Introduce experimental meshopt_simplifyWithAttributes algorithm that takes attribute error into account when running simplification at some cost to geometric error and simplification memory and performance
  • Implement meshopt_dequantizeHalf which can reverse the quantization done by meshopt_quantizeHalf for cases when the data is needed on the CPU
  • meshopt_simplify now requires ~25% less memory for large meshes
  • meshopt_optimizeVertexCache is now ~15% faster for large meshes
  • meshopt_simplifyPoints now consumes less memory and supports per-point colors during simplification; the algorithm is still experimental but will likely be stabilized in a future release. The interface has changed to accommodate optional color attribute input.
  • meshopt_simplify now prevents triangle flipping better in planar regions (although some issues remain, tracked in #346)
  • meshopt_remapVertexBuffer is now up to 4x faster for deinterleaved streams with small stride
  • meshopt_spatialSortRemap is no longer experimental (which means it has a stable API like most other functions)
  • Fixed vertexfilter.cpp compilation with Emscripten when using Wasm SIMD and SIMD emulation flags

gltfpack improvements

  • By default, when targeting .gltf files, gltfpack now copies texture files to the output folder. This can be changed by using the new -tr option (which also allows to keep texture file references when targeting .glb files).
  • Implement support for KHR_materials_anisotropy extension
  • Improve processing performance for large geometry-heavy glTF files
  • Preserve custom integer ID attributes (_ID, _BATCHID and _FEATURE_ID_n)
  • Fix mesh instancing (-mi) transform handling for scenes with non-uniform scale & rotation
  • Improve mesh instancing (-mi) efficiency on some CAD exports by relaxing mesh merging rules
  • Improve animation error analysis for translation tracks when nodes have a large scale
  • Identical texture glTF objects are now merged together, which results in significant size/performance improvements on some exports
  • Improve point cloud optimization and simplification using the library enhancements
  • Implement optional support for floating-point texture coordinate quantization via -vtf; this is occasionally useful on scenes with very large texture tiling factors
  • Improve support for .obj file parsing: vertex colors are now preserved and more data from .mtl materials is preserved

JavaScript improvements

  • Introduce reorderPoints function to MeshoptEncoder; this function is recommended for use with point clouds to reduce data size and improve render locality
  • Improve support for JavaScript minifiers when using MeshoptDecoder and WebWorkers
  • Improve MeshoptDecoder useWorkers behavior: calling the function twice no longer leaks workers, and useWorkers(0) can be used to reclaim WebAssembly instance memory
  • Introduce experimental simplifyPoints and simplifyWithAttributes functions to MeshoptSimplifier; these functions may change interface/implementation significantly in future releases and require setting useExperimentalFeatures to true.

Thanks to @LorenRoosendaal, @1d10t and @Light7734 for contributions to this release!