Incorrect bounding box after loading a model quantized by gltf-transform

Windows 10 x64
Chromium 111.0.5563.65 x64 (ungoogled-chromium build)
Babylon.js 5.53.0

Assets: (75.3 KB)

  • model_orig.glb is the model before quantize, which is ok
  • model_gltf-transform.glb is the model quantized with steps below, which can reproduce this issue.
  • model_gltfpack.glb is the model quantized with gltfpack -ke -kn -km using gltfpack 0.18, which is ok

Actual behavior:
Load model_gltf-transform.glb in and drag around:

To Reproduce
Steps to reproduce the behavior:

  1. Go to and drag in model_orig.glb
  2. Click on Script button
  3. Use code below to do a quantize
import { quantize } from '@gltf-transform/functions';

await document.transform(
  1. Run and export
  2. Open and load the exported model in the right panel.

Extra Info:
This issue is also reported to glTF-Transform:

Another thing to notice is that gltfpack uses u16 for position and gltf-transform uses i16_norm for position, this could make a difference.

cc @bghgary ???

Thanks for the report! Issue is fixed in this PR: Fix bug with glTF accessor min/max code by bghgary · Pull Request #13696 · BabylonJS/Babylon.js · GitHub.