Animating reaction to blow over existing keyframe animation

Ok, having a look at this now, and will divide the task into two parts.

  1. Transitioning into simulation
  2. Transitioning into animation

Transition into Simulation

The Blend attribute is capable of interpolating between any animated and simulated pose, but it does not take into account mass or momentum and is meant to solve only the smallest of differences between two poses.

In this case, you seem to have a character with a permanent blend up until the point of being hit.

Here I’ve exaggerated the downside to this approach, which is that you can’t be certain that the simulated pose matches your animation since you are simulating into a pose. In my case, my character has slightly dropped with gravity, so as soon as I blend into simulation, the character drops. This has to happen before box hits him, such that the blend can be smooth rather than instant.

A better option is to have your group set to Animated and transition into Simulated.

Benefits include:

  1. No need to blend anything
  2. You don’t need to pin or otherwise constrain your character leading up to the transition
  3. You don’t need to simulate any frames leading up to the transition, you can set the start frame around the time of the transition; saving on performance and tweaking
  4. Most importantly, the pose at the transition will always 100% match your animation.

Transition Into Animation

Generally, you’ve got the right idea. But the Blend attribute can only get you so far. For the best results, I recommend:

  1. Animating the group stiffness/damping
  2. Animating individual marker stiffness/damping
  3. Finally, tune the final pose with pin constraint stiffness/damping

Here’s an example of this, where the transitions are staggered, torso moving first, then head, then arms. I’ve selected all animated Markers here so you can see what the animation looks like.

Above is just the head animation.

There are 3 pin constraints in the scene too; they are there to help get the final pose closer to the animated pose, when tuning markers isn’t enough. When disabled, you can see there is a slight gap between the simulation and animation once I blend it back.

This can happen if the hierarchy is deep and gravity has too much of an effect on the overall character. The pin constraint add an additional worldspace force onto the Markers to get them closer to that final position. An alternative is animating away gravity, to remove any of those counteracting forces.

Here you can see the pin constraints (with staggered animation) getting markers into position before performing the blend.

And viola, the final result. With a high enough stiffness, and low enough damping, any simulation can reach the animated pose; pin constraints help, disabling gravity helps, and finally blending is a last resort for vertex-perfect final positioning.

Past this point, you can always tune the layer that keyframes are recorded onto.

The transition into physics, yes, the Kinematic → Animated approach is better. But transitioning back into animation is not niche nor unusual; it’s just a very hard problem to solve. We are working on alternative solutions to this, from a very different angle, that I expect will solve this in a much more artistically friendly way. We’ve been at it for a solid year or two, as it will solve not just this problem but many more, and it’s getting close; at most another year. But yes, a hard problem! This current method is as easy as I expect we can get without introducing new technology.

Yes. :slight_smile:

Naaaaah haha. That’s cheating. That’s what games do, because they too struggle to solve this problem proper. :slight_smile: As an animator with an eye on every frame and control over each limb, the aforementioned approach should yield much better results. Blending is a hack and last resort, with no respect for the real world or realistic results, and it should be treated as such.

Hope it helps, and please do post more questions, especially in this form. This was wonderful!

EDIT: Let’s add the scene file too.

transition_example.zip (124.7 KB)

1 Like