Maya glTF Exporter does not preserve Stepped interpolation for Scale animation

Hi! I’m having an issue exporting a GLB from Maya using the Babylon.js glTF exporter.

I’m using Maya 2022 with the latest version of the Babylon Maya glTF exporter.

I have an animation where several objects need to appear/disappear by changing their Scalefrom 0 to 1 or 1 to 0 over a single frame.

In Maya’s Graph Editor, the Scale X/Y/Z curves are explicitly set to Stepped.

However, after exporting to GLB, the Scale animation is exported as LINEAR instead of STEP. This causes the object to visibly scale/interpolate between the two keys.

I verified this by inspecting the exported GLB directly.

Interestingly, if I manually modify the exported GLB and change the corresponding animation sampler from:

interpolation: LINEAR

to:

interpolation: STEP

the animation works correctly.

So my question is:

Is there an option or setting in the Babylon Maya glTF exporter that forces or preserves STEP interpolation for animation keys?

I’ve already tried:

-Setting Scale X/Y/Z to Stepped in Maya’s Graph Editor.

-Exporting multiple times with the same result.

-Using the latest Babylon exporter.

-Baking the animation.

The important part is that I don’t want the entire animation to be STEP, because some later Scale animation needs to remain smoothly interpolated. I only need the specific Stepped keyframes to remain STEP in the resulting GLB.

Is this currently supported by the Maya exporter? If so, what exact export setting/workflow should I use?

Thanks!

cc @srzerbetto

Hi @ignacio , thank you for finding that bug! I will investigate it.

Could you please provide a simple maya file that repro this? Can be as simple as a cube that appears/disappears.

Hi! srzerbetto

Sure thing. My Maya project has multiple animations using scaling and blendshapes. As I mentioned in my post, when I export it using the Babylon plugin, it doesn’t preserve the stepped interpolation. I had to ask ChatGPT to modify the GLB file’s code to make it work.

If you export it and load the GLB in the Babylon Sandbox, you can see that the models that are supposed to disappear instantly have 2 or 3 frames where they gradually shrink before disappearing.

Since I’m a new user, I can’t upload files yet. Is there another way I could provide you with one of my files?

If it’s a public file you could upload it to a github repo and paste the like here. Or even share a link to a google drive.

Hello srzerbetto

Here’s a link to a google drive.

Thanks @ignacio! I just requested access. I think you need to approve. Once I have access I will take a look.

Sorry for thanking so long. Hopefully I can figure it out today.

Hello @srzerbetto

I just granted you acces, if you need anything let me know.

Cheers!