Animation - How to handle jumping forward?

Started by
4 comments, last by CarlML 1 year, 8 months ago

I'm curious about how this is generally handled. Let's say you have an enemy with skeletal animation that is supposed to be jumping forward. Would you animate it jumping stationary and move it forward in the code, or would you animate it jumping forward and update the enemy position in the code based on the root bone position at the end of the jump? Or some other way?

Advertisement

CarlML said:
Would you animate it jumping stationary and move it forward in the code,

Yes. To create the animation, i would create a temporary, simplified treadmill model to have a reference, which then is not exported.
The goal is, no matter if the animation is walking, running, or jumping, to have the center of mass of the character projected to the ground plane at the global origin.
But i'm not sure if the alternative you mention isn't used by some people as well.

JoeJ said:

CarlML said:
Would you animate it jumping stationary and move it forward in the code,

Yes. To create the animation, i would create a temporary, simplified treadmill model to have a reference, which then is not exported.
The goal is, no matter if the animation is walking, running, or jumping, to have the center of mass of the character projected to the ground plane at the global origin.
But i'm not sure if the alternative you mention isn't used by some people as well.

Yeah seems like a good choice since walk cycles are best handled that way. But when I look at a game like Horizon Zero Dawn where the enemies are moving around wildly all over the place, I'm thinking it would be hard to sync the movement to the animation in a good way without having the movement baked into the animation.

Good idea about the treadmill model btw. I'll implement that.

CarlML said:
But when I look at a game like Horizon Zero Dawn where the enemies are moving around wildly all over the place I'm thinking it would be hard to sync the movment to the animation in a good way without having the movement baked into the animation.

I guess one part of manual post processing motion capture data is to move the models from global space to the said origin.
After that it's easier to make loop-able sequences out of the data, for example. So this does not only help to apply the animation to game objects at runtime, but it also helps production as well.

Wanted to add that the ‘COM goal’ wasn't meant literally / precisely. Ofc. it's more important the leg contacts follow the constant velocity of the virtual treadmill, so it's easier to ground the character at runtime. Consequently the COM may wobble around a bit.

Edit: Cutscenes would be an exception, where things can keep in global space. Maybe this applies to some gameplay stuff as well, e.g. climbing over a cliff.

Thanks for the input. What I might do is to animate things moving and then export the movement and animation out separately. So each animation has a skeletal animation part (that is more or less stationary) and a movement part that is applied to the enemy position during runtime.

This topic is closed to new replies.

Advertisement