The position of boundingbox is separated from the mesh. So mesh.isInFrustum() get false when moving camera

When I load model to scene, the position of boundingbox is separated from the mesh.


So mesh.isInFrustum() get false when moving camera.

The model is as follow.

Does it help if you do this:

mesh.refreshBoundingInfo(true); 

Can you provide a repro in the playground ?

When I import glb in plapyground, the position of boundingbox is correct.

But when I use “Export to babylon”, and import babylon into sandbox, the position of boundingbox is incorrect.


Is there any problem in “Export to babylon”?

I used export to babylon from your playground and I see this when loaded in the sandbox:

I think it is because by default bounding box are not updated with skeleton info.

@bghgary worked on some nifty tricks to make this faster recently ?

yes here: Babylon.js docs

When I use animation groups to control model, the “03” animation group is speaking.

,the “05” animation group is waving hands.

If I want to use speaking and waving hands at the same time, is there any method to achieve?

We will add very soon support for layering but in the meantime maybe @PatrickRyan has an idea (please be patient he is OOF for now ;))

@xiaopangoo, if you have animations that target different bones in the skeleton - for example the wave animation only has keyframes on the arm/shoulder and the speaking only has keyframes on the mouth/jaw - you can play multiple animation groups at once without layering. However, if both animations have keyframes on similar bones - if both wave and talk have keyframes on the head bone - then only one animation will win out and will produce unexpected results. You can try animation blending playing the two groups at once, but the issue here is that if you have large deltas in a bone the blend will be the worst case because the interpolation will be directly between the extremes. So if you have arms at the waist clasping hands for talking and want to blend waving, the waving arm will wiggle part way between the two positions.

The layering support that @Deltakosh mentioned is really what you need for this in conjunction with bone masking. We have the initial bone masking in, but if I remember correctly, we still need some extra work done on layering before those systems are ready to release in full.

I tried to use keyframes on the mouth/jaw of speaking and keyframes except the mouth/jaw of waving, the result seems ok.

1 Like