1
$\begingroup$

I am working on reverse engineering the animation system of a video game. I initially assumed it used a Bezier curve to interpolate between keyframes, but I've since worked out the curve it actually uses is given by $$ (2t+1)(t-1)^2\cdot{P_1}+t(t-1)^2\cdot{P_2}+(t-1)t^2\cdot{P_3}+(3-2t)t^2\cdot{P_4} $$ where $P_1$ and $P_4$ are the starting and ending keyframe values, respectively, and $P_2$ and $P_3$ are control points. This feels awfully close to a cubic Bezier curve, but as I understand it, that would be given by $$ (1-t)^3\cdot{P_1}+t(1-t)^2\cdot{P_2}+(1-t)t^2\cdot{P_3}+t^3\cdot{P_4} $$ Does the first curve have a name? Is it related to Bezier curves in any way? Is it a Bezier curve in disguise and I just can't see it?

$\endgroup$

1 Answer 1

0
$\begingroup$

This is an interpolation that specifies the endpoints and the derivatives at the endpoints. P1 and P4 are the initial and final values, while P2 and P3 are the derivatives.

Also, which video game? As it happens, I also came across this interpolation while reverse engineering the animation system of a video game.

$\endgroup$
1
  • $\begingroup$ Thank you! I guess it's called a cubic Hermite spline. I'm working on Pokémon Battle Revolution. $\endgroup$
    – SAMM
    Sep 12, 2021 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .