Setting animation groups for different objects with morph targets results in deserialization error

Hi there, I’ve been encountering this bug and was able to reproduce a few times.

I’m using 3DS Max 2018, with the latest version of the exporter (20200701.2), exporting to .gltf format.

Basically, I have got a scene with two objects. Each object has a morph target modifier, each using a different target, and the morph weights are animated.

When I create an animation group for the first object, it works and exports fine; but when I create an animation group for the second one in a similar vein, it seems to go through fine, but then re-opening the animation groups window and trying to export the object results in a deserialization error:

It works fine when adding multiple basic animations - such as translation and rotation. The issue seems to be with having multiple animations with animated morph targets.

Worth mentioning that when I click “confirm” to commit the changes for the second object’s animation, I get this weird behaviour where both animations are selected in the left pane - shouldn’t just the animation for the second object be selected? Might be a clue for the cause of the bug:

I am uploading two really basic scenes to reproduce the bug here: one has an animation group set for the first object only and works fine; the second one has an animation group set for each but is in a broken state - attempting to export / open the animation group window will result in the aforementioned error.

Pinging @drigax aka TheExporterOverlord

@Deltakosh @Drigax Doesn’t seem to be an issue related to the exporter though, I get the error message even when simply opening the animation groups window on the scene.

I have been banging my head the whole on this - I can replicate that fairly easy, just add two animations for two objects with an animated morph target each, and then all animations in the scene are corrupted - I get that deserialization error every time I open the animation groups window and all the existing animations are gone, can’t add new ones.

Another way to trigger this bug is to add two animations for a node which has two animated morph target. With one animation it all works fine, the moment I add a second animation all hell breaks loose.
Attaching a basic broken .max scene example for this: animmorphbroken.max - AnonFiles

Sounds like we may have an issue in @elpie89’s animation group dialog, got any time to look at it?

Having the same problem here. This is proving to be the bane of my existance, since I have a very complex model with multiple animation groups and I can’t see a way to resolve this issue then deleting the existing animation groups and starting from scratch, which takes me a whole afternoon and pray to god that I don’t make a mistake that will cost me my whole day. If you guys are planning on adding more and more things to the exporter, I would suggest looking into this first.

I have the same error going on. The model’s animations are not that complex but enough to be painful to have to rebuild. I can’t even get into the animations menu to purge things as the error pops up when you try and launch the animations group window. Oddly, after deleting keys on the last thing animated before the error, the message continues.

I did try resetting and merging into a fresh scene, that did not help.


JIT Trace
System.Exception: Invalid ID, can't deserialize.
   at Max2Babylon.AnimationGroupList.LoadFromData(IINode dataNode)
   at Max2Babylon.AnimationForm.AnimationForm_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Edit: Completely deleting the animated dummies I am using will stop the error, but that is painful to have to rebuild.

Edit, Edit: If you save after you delete your nodes, then immediately undo the node deletes the error seems to clear but you loose any and all animation names saved in the babylon>animations editor. Still better than a complete reanimation of things, but :slightly_frowning_face:

@Guillaume_Pelletier Thoughts?

which version of the exporter? I correct a similar bug few weeks ago with pr #914 which was comming from this forum discussion.