Model with skeleton animation scaled smaller

Hi team, I got a problem when exporting glb file from 3dsmax 2018.
I’ve a biped animation exported from 3dsmax 2018. If the Bip001 is not moved, everything is ok. Playback: Babylon.js Playground
But If Bip001 moved a little bit, let’s say 10cm along Z axis, after exported, the model is scaled much smaller than before. Pb:

In the doc 3DSMax to glTF - Babylon.js Documentation, it says:

## Consideration about skins
In glTF, a skin is binded to a node. The skeleton (root bone) of a skin should be positioned at origin, without rotation or scaling. The node to which is applied the skin is responsible of its transformation (translation, rotation, scale).

Does it mean the root bone can’t be moved? How to create a jump animation?

Pinging @PatrickRyan to see if he can help

@dingoogle I’ve been looking at your issue, and am running into some questions that need to dig into the source to answer. Is there any way you can share the source file so I can see what may be happening here.

The glTF spec you are referencing means that the exporter will create a Skeleton Group node at world 0 but I am not seeing that in your model. I would like to run your file through an export manually so I can help debug the process. If you can share the source file with me as well as the exact version of Max you are using (plain 2018 versus one of the service packs) as well as which version of the Babylon exporter for Max you are using. Thanks for your help in debugging this issue.

Hi Patrick, thanks for your reply. The file is here (93.1 KB)
3dsmax 2018 without any sp, the only plugin is Max2Babylon-1.3.32 for max 2018

@dingoogle, I looked into the file over the weekend and this seems to be a bug in the Max exporter. If I push your file into Maya and export with the Maya exporter the issue does not repro. @drigax and I will look into the exporter and see what might be going on.

Hi Patrick, thanks for your effort. May the force be with you :grinning:

1 Like

Tried Max2Babylon-1.4.2 for max 2018, the bug is still there. Could it be fixed?

Ping @Drigax and @PatrickRyan for follow up.

This should get fixed soon but @dingoogle, there might be a bit of delay with the vacations.

Hi @dingoogle,

have you tried with our latest release?

I recall that 1.4.2 was released back in June, before we changed our build versioning system.

I tried Pre Release 20190906.5 and some releases later than July, it looks worse than before :frowning: . I didn’t do any update in my test file.


Oh boy. That looks absolutely dreadful. Can I see your scene or a repro scene? I usually test against a skeletal rig, but I’m not sure what could be causing this off hand.

Still have this annoying problem. This time it gets bigger. The exporter is 3dsmax2018 v20191214.2. Attached source file FYI. (728.9 KB)

Thanks for the scene, Looking at the export, I’m guessing something’s wrong with the animation export. I can see that the skeleton root “robo_bipe_01” is getting scaled up to 5.6, but…why?

Huh. Where is that coming from? I was able to trace the data to where we export our skeletal animations to these lines:

it appears that our bone’s world matrix has a scale…I’m not too sure why unfortunately… however I think this code is wrong, we should be using the local transform regardless of whether or not it’s a root node. Luckily enough, this fixed the issue as well.

I opened this issue to represent this:

and addressed this via this pr:

I was able to reexport, and everything looks properly scaled now: (474.3 KB)

1 Like

Hi Drigax, you solved it! Many many thanks. I can use characters in my projects now.

1 Like

@dingoogle your character looks amazing !!! I can not wait to see what you are doing with it :slight_smile: