Hey all,
Does anyone know of a unity to .babylon file exporter?
Been looking around, (trying to avoid GLTF/GLB), but so far no success.
I couldn’t find the old one (pre toolkit) and i’d guess it doesn’t work with newer unity versions either way…
Tried the unity toolkit, but only seemed to export to GLTF and no animations from my quick test.
all i want is to select a mesh, click a button, get a .babylon & textures, the world is become way too complex
So i’m stuck with unityGLTF plugin from the official KhronosGroup github, but this is not perfect either.
Cheers
Maybe it’s just my setup it doesn’t support Unity have so many options.
either way, the UnityGLTF plugin exports the animations and models ok.
The problem “but this is not perfect either” turned out to be the GLTF spec itself, doesn’t support TRS animations on the root nodes bone (for some reason…)
So an animation that looks like this in Unity;
Now looks like this using GLTF;
Leaving two choices, the good old.babylon file format or reskin some 50 meshes (Separate Male/Female human models & armor/clothes) & find a whole new range of animations without TRS
I typed wrong in my previous post, (ment to be root Bone, not Node).
It’s not root motion, but a normal TRS (position, rotationQuaternion & scale in BJS terms) animation targeting the root bone’s position compared to it’s parent.
According to the GLTF spec, this is not to be supported by the spec & validator even throws a warning about it.
Skeleton is Humanoid with the following layout
Armature // Ground position
Root_M // skeleton root, located slightly above the hip, as seen in the first video.
Hip_L // builds bones down left leg
Hip_R // builds bones down right leg
Spine1_M // builds bones up torso, head, arms, etc
After spending some hours tinkering around,
I found the best solution was to simply copy the keyframe values from unity and put them in a babylon animation, and then add it to the respective animationGroup with root_m target as intended.
Why the GLTF spec thought this shouldn’t be “allowed” still baffles me.
Should not have to all that stuff to work around the issue.
Can you please send me the original character and animation for use in a Unity and I will try to export from Unity toolkit to gltf for Babylon with its animation
Unfortunately i won’t be near a pc until tomorrow.
I only have the validator warning msg right here and now.
The more i’m thinking about this, the more convinced i’m becoming that this must be some kind of misunderstanding between the spec and the developers of the validator & aswell as the exporter i’m using.
Not having TRS animation on a “skinned node” aka a skinned mesh makes perfect sense,
but the animation targets a bone which should be ok (it’s called root_m, but it’s a bone, and child of the actual skeleton root)
Funny side-note is that the exporter exports the RotationQuaternion animation targeting root_m just fine, this is what flips the model in the “death” animation from standing up to lying down, so it works in babylon, and it’s also what triggers the warning from validator
I’m part of the glTF working group and I worked on this part of the spec. I’m sure we can sort this out. Let me know if there are specific things we can investigate.