Not able to blend animation with beginWeightedAnimation

Hey @Shubham - Reading through this thread it looks like you’re trying to go from Mixamo → Blender → Babylon.js

Have you checked out this doc that walks through that exact process?

2 Likes

Hi @PirateJC, I have followed the Document it worked with the Animatables, but some of the blendings are working weirdly can you check it?

hi, @PirateJC @PatrickRyan can you check why my animation is working weirdly?

Hmmmm there is definitely strange going on with the weights here. Maybe something to do with rotation.
skeleton-back
@bghgary got any ideas?

Fixed in this PR: Fix quaternion blending math by bghgary · Pull Request #12955 · BabylonJS/Babylon.js · GitHub

3 Likes

Oh thank you its working now :+1:

1 Like

Hi is there a way to use this animatable on a different glb model having the same rig?

@Shubham, you can certainly share animations between meshes. The best way is to use an animation group from one of your meshes to retarget another identical skeleton. This means cloning the animation group and changing the target of the targeted animations within the group. It’s a little convoluted to read in text so I built a sample for you to look at.

The most important thing to remember is that not only do your skeleton hierarchies need to be the same, but if the bind poses are different, your retargeted animations will potentially stretch or squash the proportions of your retargeted character. For example, if the shoulder bone is not in the same proportion to the parent spine bone in both skeletons, the retargeted animation will move the shoulder to match the original bind pose. If you are using skeletons of the same proportion, you should be fine.

I hope this helps, but let me know if you have any other questions.

2 Likes

Actually, I have already done this, but I need to use beginWeightedAnimation on the new model because we can’t blend animations in the animation group right?

@Shubham, we are just starting an audit of our animation system to make sure we can blend, override, retarget, etc animations between skeletons and transforms so some of this will get easier in the future. For now, I will ping @Evgeni_Popov to see if he can think of a work around for retargeting a weighted animation from one skeleton to another.

@Shubham, in answering another forum question, I ran across this PG which is using animation groups to blend and is closer to what you are looking for with blending animations. I also updated my example with some animation overrides for animation groups for you to see My last message about auditing our animation techniques is still valid, and we will be doing this work as a part of a larger feature, but this may unblock you for now.

1 Like