Conversation
optimizeMeshlet uses a basic scoring metric for number of vertices in the cache window; it works reasonably well, but when using meshlet compression, the compression ratio could be improved further by producing longer strips. That requires prioritizing matches by cache recency and triangles with low minimum valence so that we visit dead-ends earlier. This also reduces the efficiency of match>=2 early out: we need to examine a few edge matches to pick the best one. To address this tradeoff, we now allow specifying the level of optimization. At level 0, we use the old heuristic which is a little cheaper to compute. At level 1+, we use the new heuristic and early out after encountering level matches; in practice, level 3 or 4 results in maximum compression ratio, but level 1 or 2 are still useful to reduce the optimization cost at a more marginal benefit.
This improves the compression ratio by ~1 bit/triangle depending on the mesh.
Note that optimizeMeshletLevel can be used for further compression gains; also add it to the experimental function list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
optimizeMeshletuses a basic scoring metric for number of vertices in thecache window; it works reasonably well, but when using meshlet compression,
the compression ratio could be improved further by producing longer strips.
That requires prioritizing matches by cache recency and triangles with low
minimum valence so that we visit dead-ends earlier.
This also reduces the efficiency of match>=2 early out: we need to examine
a few edge matches to pick the best one. To address this tradeoff, we now
allow specifying the level of optimization. At level 0, we use the old
heuristic which is a little cheaper to compute. At level 1+, we use the new
heuristic and early out after encountering level matches; in practice, level
3 or 4 results in maximum compression ratio, but level 1 or 2 are still
useful to reduce the optimization cost at a more marginal benefit.
This contribution is sponsored by Valve.