Skip to content

Is it possible to apply meshopt compression to everything except one mesh? #1398

Closed Answered by upisfree
upisfree asked this question in Q&A
Discussion options

You must be logged in to vote

@donmccurdy thanks for the answer, and sorry for a little late reply!

Could you say more about the reasons for excluding physics-related geometry? Does the physics library not support geometry that has been quantized to integer vertex attributes?

Yes, exactly it!

For anyone with the same problem, I found a solution that supports per-file meshopt compression. I am using Rapier physics v0.14.0. To make it work with meshopt you just need to prepare vertices before passing to Rapier. You can do it like here: https://github.com/dimforge/rapier.js/blob/262c307271f350ce8a5379c39cc0b33999d434ee/testbed3d/src/demos/glbToTrimesh.ts#L32-L48

const mesh = child as Mesh;
const geometry = mesh.geometry 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by donmccurdy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants