Skip to content

Meshopt compression alters bounds of skinned meshes in some cases #490

Closed
@hybridherbst

Description

@hybridherbst

Describe the bug
It seems that in some cases gltf-transform meshopt alters bounds of skinned meshes and results in files with either incorrect scale or incorrect bounds (haven't been able to verify which it actually is so far).

To Reproduce
Steps to reproduce the behavior:

  1. Download and unpack BentCylinder-Meshopt.zip
  2. Drop "BentCylinder.glb" into https://gltf-viewer.donmccurdy.com/
  3. Now drop "BentCylinder.meshopt.glb" into it
  4. Note that the second file displays very differently, the only difference is that it was processed with gltf-transform meshopt.

Without meshopt
image

With meshopt
image

Expected behavior
Files display the same.
This might also be an issue with bounds calculations inside modelviewer/gltf-viewer instead of gltf-transform (there's known issues with skinned meshes in model-viewer bounds calculations at least, see here: google/model-viewer#3189), but since in this case the only difference is meshopt compression might be a separate problem (and/or the model scale is incorrectly calculated in model-viewer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalProblems or limitations traced back to other tools.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions