This release contains many improvements to the meshoptimizer library and some gltfpack fixes! Some highlights:
New meshlet builder (meshopt_buildMeshletsSpatial
) designed for raytracing workloads optimizes meshlets using SAH cost and can be used with NVidia cluster acceleration structure extensions. The generated meshlets follow the same format and data layout as other meshlet builders, thus the functions can be used interchangeably based on the expected usage of a given mesh.
An assortment of new experimental functions in various areas of the library help reindex meshes with tolerance (meshopt_generateVertexRemapCustom
), remove isolated components after isosurface meshing (meshopt_simplifyPrune
), rasterize point clouds via compute using spatially optimized clusters (meshopt_spatialClusterPoints
), and implement adaptive view dependent distance based culling for small objects (meshopt_analyzeCoverage
).
Cluster partitioning (meshopt_partitionClusters
) now accepts vertex positions as an optional input, improving spatial locality of returned partitions.
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
- New experimental function,
meshopt_buildMeshletsSpatial
, generates meshlets that are optimized for ray tracing workloads and can be used with NVidia cluster acceleration structure extensions - New experimental function,
meshopt_generateVertexRemapCustom
, generates vertex remap for reindexing using a custom comparison function for vertex attributes, which can be used to weld vertices with per-attribute tolerance - New experimental function,
meshopt_simplifyPrune
, removes connected components under the specified threshold, which is useful for simplification and isosurface cleanup - New experimental function,
meshopt_spatialClusterPoints
, subdivides the input point cloud into uniformly sized chunks, which is useful for compute driven rendering - New experimental function,
meshopt_analyzeCoverage
, returns rasterized coverage from three cardinal axes, which is useful for distance based culling meshopt_encodeVertexBufferLevel
now accepts encoding version as an optional parameter for multi-threaded multi-versioned encodingmeshopt_partitionClusters
now accepts vertex positions as an optional input, which helps reduce spatial bounds for partitionsmeshopt_partitionClusters
is now ~2x faster on typical inputsmeshopt_spatialSort*
functions now use more precise Morton codes, yielding more accurate order for large meshesmeshopt_decodeIndexBuffer
has been optimized to decode ~10% faster when using MSVCmeshopt_computeMeshletBounds
and other bounds functions now compute 1-2% tighter bounding spheresmeshopt_analyzeOverdraw
now correctly computes depth information which results in more accurate statisticsmeshopt_simplify
now correctly handles negative zero components in input positionsmeshopt_generateProvokingIndexBuffer
andmeshopt_spatialSortTriangles
are now stable- CMake option MESHOPT_STABLE_EXPORTS allows building shared library without experimental functions
- Improve code compatibility with VS2013
gltfpack improvements
- Improve performance for inputs with abnormally large vertex accessors
- Lines are now supported in input .OBJ files
Thanks to @axmand and @pm4rtx for contributions to this release!