Some animations are shown in 3DsMax but not exported with the Babylon gltf exporter

Hello,

We are making a furniture configurator with Babylon.js. This was previously a Unity project, so we have hundreds of assets previously done, in FBX format. We export them loading them in 3DsMax (v2024, I think) and using the Babylon exporter plugin (v20230922.2) and sometimes animations work and sometimes not. It seems there are more possibilities of failing if there are several animations/animations groups (sometimes it only plays one of them), sometimes it works “cleaning” the file (removing objects from the 3DsMax file), but sometimes it simply doesn’t work.

I don’t provide a code demo because it even fails dragging it to the babylon playground/sandbox, to keep apart my handling of the loading, that could be buggy (I’m new to this).

I link (my user cannot attach yet) one of the simplest non-working .glb:
https://cdrepo.cdinvest.es/configurator-assets/forum/JR-3760_brainbuilder_armrest.glb

And the source 3DsMax file (where the animation can be seen working properly):
https://cdrepo.cdinvest.es/configurator-assets/forum/brainbuilder_armrest.max

If we convert the animations with the Facebook tool (FBX2glTF) we have a greater rate of success with animations being present, but geometries fail more and sometimes they have glitches. The Babylon plugin works much better on the geometries.

I’m quite new to 3D in general, more even to Babylon, so I can’t be 100% sure that it is a bug, but the fact that some files can be seen moving in the sandbox when we convert them with FBX2glTF but not with the exporter is what makes me think it is a bug.

Thanks,
Jaime

Did you try to open FBX in Blender and save as GLB?

I’ve tried three examples and I can’t see them in Blender (even some that have exported OK with the 3DsMax exporter). The bones are there, the object hierarchies are there, but I hit play and nothing happens. I export it to GLB and drop it in the sandbox and no animation there either.

I believe at some point of some export something went wrong.
When I tried to export your .max file to another formats like .dae I have the following error:

The following Bones will have incorrect Bone binding matrices under the associated Skins:
-B_Seat

Hi. Are you using 3dsMax plugin options for animations groups?

It gives you an option to create and define animation groups. These animation groups should be available in the Babylon scene after export.

image

2 Likes

No (I’m not the one handling the assets, but don’t think they know about it). We’ll try with that.

Thanks a lot, but it didn’t help (or I don’t know what to make there). There is nothing in Animations, nor Animation Nodes, nor it helps creating a new one.

I have observed one thing. This is the original content tree in 3Ds:

imagen

And this is the structure in the Babylon inspector:

The animation targets B_Seat. This way it doesn’t move at all. However, if I change the parent of the container object (Brainbuilder JR-7760_MEDI_Armrest) to B_Seat, there’s animation, although not the correct one. It seems like if the animation is there and it is affecting B_Seat, but there’s some relationship between B_Seat and Brainbuilder JR-7760_MEDI_Armrest that it is lost.

I tried also when importing the .fbx changing the “Bone conversion” from “Convert as dummy” to “Leave as bones”, with the same result.

Thanks for your answer.

I have similar messages importing from the .FBX:

The following Link node(s) is/are not part of the BindPose definition.
-B_Seat

and

The following parent and/or ancestor node of the Link(s) is/are not part of the BindPose definition.
-D_Root
-B_Root

But the animation it is there in 3DsMax after the warnings, but doesn’t export to the .glb file. I don’t know what it really means. We don’t have access to any source prior to the .fbx files. Do you know if there is any keyword/hint/process I can say to the 3D artist that it can help to fix it?

There is something wrong with the FBX considering Bones and skinning. That broken information is part of the FBX.
Probably you could share FBX as well to have a look at?

Try to google the errors which you have, probably there will be some clues for designer.

brainbuilder_armrest.zip (26.1 KB)

Does this look correct?

I basically cleaned up the hierarchy and left only B_Seat which is driving the animation and actual mesh. I am not sure what’s exactly the issue. There is this message, and indeed, in the .max file hierarchy skinned mesh is not root node. So I simply deleted two parent nodes and basically made B_Seat a root node (with armrest object linked as a child to B_Seat)

Not sure how this process helps you though as this is specific for this file. But it seems that you need to go over each file and figure out what’s the deal.

Hi,

For this case certainly it has worked. Going this way we can probably tweak a lot of the files, although I’m not confident it works for all of them.

The animations are done this way probably because this bones structure is the one of the chairs that go together with the armrest. But it is not the same file because they are different seats (sizes and some other options), so we load the different assets depending on the user selection.

The problem is that there are hundreds of files. I would have been great that the 3DsMax exporter preserved what it seems to work in 3DsMax.

I’ll talk with the person handling the assets about the warnings, the animation groups dialog and this hierarchy modifications.

Thanks again for all the info and the advice.

Sure, it seems now I can attach the file (inside the .zip, doesn’t allow me to upload the fbx directly).

BrainBuilder_3760_Armrest.zip (321.3 KB)

Thanks for looking at it. At the 3D software part I’m quite ignorant, and although I understand what the bones and skins are, I don’t know how it is edited at all.

Maybe @PatrickRyan can take a look.

1 Like

@jblazquezcdi, on a quick first pass, I see that the file is not exporting as expected in Max and when I load the file exported from Max into the sandbox I see it has over 13K errors in the glTF validator:

By comparison, importing the same file in Maya exports a glb that has the same animation that appears in the FBX and exports a valid file according to the validator.

I see warnings when loading into Max that there are two elements that are not part of the bind pose definition. This means that Max thinks they weren’t present when the mesh was bound to the skeleton.


To see if I could repro the issue in another DCC tool, I opened it in Blender 4, and got the following error:

While the mesh and skeleton do open in Blender, there is no animation that plays in the scene, so there would be nothing to export.

I’m guessing from the first message in the thread that you only have access to the FBX assets from the unity project and don’t have the original files (blender, max, maya, etc). This is going to make things harder to fix without a lot of rebuilding. If you need to stay in Max, I would suggest reskinning the mesh to the skeleton. You can do this by making a duplicate of the mesh and skeleton, then detaching the skin on the mesh. Then you will redo the skinning and weighting to the skeleton to ensure all bones are present in the bind pose. Then copy the animation data from the original mesh to the new mesh if needed. This could be a lot of work depending on your assets and I don’t know that it would work in all cases.

However, if you have access to Maya, this asset seems to open in Maya and export to glTF without problem and this would likely be the best path for you. Hope this helps.

2 Likes

The same is true for Cinema4D. FBX opens without any problems, animation is OK.
When saving to GLB make sure to check the ‘Skin’ option in Animation tab, otherwise there will be no animations at all in GLB file.


The resulting GLB is attached in the archive.
BrainBuilder_3760_Armrest2.zip (214.4 KB)

2 Likes

Thanks a lot. Maybe one temporary license for Maya to export the assets will do the work.

1 Like

Thanks a lot. I’ll pass this info to take also Cinema4D in consideration in case they have some licensing suitable for us (although I think Maya will be the way as we were considering having an Autodesk Flex license for some cases like mine - I sometimes may have to manipulate assets, although I’m no 3D artist).

2 Likes