Replies: 1 comment 2 replies
-
Hi! You're correct that the implementation doesn't provide a way to pick and choose meshes for compression at this time. In theory the draco and meshopt encoders are written to check a list of accessors that have already been written, and then skip those accessors. That would be a basic requirement for this feature. In practice, that behavior may or may not yet work as intended, and the possibility of primitives sharing accessors is a tricky case. I'd be open to reviewing a PR for this feature, and a decision on whether to merge or not would probably be dependent on how complex the maintenance will be. In the interest of identifying potential problems early, the API for picking primitives could just be something quick and hacky for now, like having draco skip every 2nd mesh. |
Beta Was this translation helpful? Give feedback.
-
Hi @donmccurdy
I would like to selectively choose which meshes receive which compression since we have some projects where this would be beneficial
I was just looking a bit through the code what the
draco
andmeshopt
functions do under the hood and it seems like I can't see a way right now to filter that using the builtin methods (nor do the extension implementations for writing have a way to filter or dismiss a specific prim).Would you say filtering out prims would be a feature you'd be open to add/accept as a PR to gltf-transform (e.g. skip prims based on x in
draco-mesh-compression
)or would you prefer if users would in cases like these directly make the calls to e.g.
encodeGeometry
etc.or is there a third option I'm not thinking of right now?
Beta Was this translation helpful? Give feedback.
All reactions