question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gLTF loader not setting BoundingInfo

See original GitHub issue

Hi, I think I’ve found a bug with the gLTF loader. I’m using it through the AssetsManager and it doesn’t seem to set the bounding info object. I thought this might be related to this issue (although I don’t think I’m using gLTF 1 here), but setting IncrementalLoading to false doesn’t change anything. I’ve created a minimal example PG.

  • Bug repro on playground: https://www.babylonjs-playground.com/#3QG2DZ
  • Expected result: the bounding box should appear and getBoundingInfo().boundingBox should be set
  • Current result: the bounding box doesn’t appear (presumably size is 0), and getBoundingInfo().boundingBox doesn’t seem to be set

Just in case, I’ve tried with another model (both exported from Sketchfab) and it’s the same.

By the way, just got started with babylonjs and I’m blown away by how well it’s built, the ES6 support, tree shaking, the overall state of the docs and example. Kudos! 🚀

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bghgarycommented, Jun 17, 2019

This is by design. getBoundingInfo returns a shallow bounding of the mesh (i.e. does not include children). Since the code is calling getBoundingInfo on the root node with no mesh associated, it just returns all zeros. To get the full bounding of all children, call getHierarchyBoundingVectors.

https://www.babylonjs-playground.com/#3QG2DZ#2

0reactions
tibotibercommented, Jun 19, 2019

PR opened. Thanks guys 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

THREE.js GLTFLoader does not works on loading the 3D model
The way how you work with container is problematic since clientHeight is zero when you access it to compute the aspect ratio.
Read more >
Babylon.js + glTF Loader does not support glTF 1.1
I tried the glTF 1.1 sample with some glTF Loader. https://github.com/cx20/gltf-test#gltf-11-tutorial-models ... Next GLTF Loader not setting BoundingInfo.
Read more >
What's New | Babylon.js Documentation
(carolhmj); Updated the glTF loader to place the skinned mesh as a sibling of the skeleton root node instead of using skeleton.overrideMesh ....
Read more >
GLTFLoader – three.js docs
GLTFLoader relies on ES6 Promises, which are not supported in IE11. ... .glb file correctly, with the assumption that the renderer is set...
Read more >
@babylonjs/core: Versions | Openbase
#13187: NME: Fix preview not updated when changing the clamp settings in the Texture block ... #13157: Fix loading the gltf loaders and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found