I know there is this feature request thing, but I tought this is wort own topic, since I'd like to discuss this little further.
I was wondering if it would be possible to do interpolation between different animation "segments" of models.
So instead of instantly changing to different animation, there would be short transition of the animation smoothly blending to another. The blending would need to happen trough these two animations, and not by just "fading" to the first frame of that new animation.
Here is example pic of what I mean. It has pig cop walk animation changing to shoot animation. The other one switches right away, and the other has 2 frame "transition". Although you might not see it THAT good in these images, you can clearly see the improvement in motion:
http://koti.mbnet.fi/~halflife/transition.jpg
Again, I know it's very easy for me to plan this sort of thing, but unfortunately (or fortunately :)) I "can't" code it.
But what do you think.. would implementing this be difficult(=time consuming) or if it would give any benefit?
Awesoken at
Implementing this wouldn't be too hard. It's a matter of adding some variables to the animation structure, re-writing updateanimation, and adding "m2" and "m3" vectors to md3draw(). I think there are other issues with animation that should be addressed first though. For example, sprite angle changes should be smoothed out. Also, I always wondered why monsters in Duke pulsate back & forth over your dead body after you die. This looks like a problem in the game code... or maybe it's just a very poor "eating" animation : )
Zilppuri at
Hmm.. yeah that is problem indeed.. also the fact that the monsters really walk badly in game. They seem to walk in clearly visible "steps" and only turn 45 degrees at one time. But I guess changing this would mean really radical changes in AI too?
Maybe the eating thing really is what's going on :)
You remember that "un-used" big sprite 3drealms released that showed the pig cop hit the player with back of the shotgun, after played is dead? But they never got it working right. So maybe this "bug" is result of that experiment?
Anyways, I really hope to see the animation interpolation at some point.
It could be implemented to .def code by this:
definemodelanim "DIVE1" "DIVE2" 20 1 0.2
Where "0.2" would mean 0.2 second blend IN the animation.
etko at
If I remember it right, technique you described is called animation blending, when two different model animations are blended by specific amounts between each other.
Interpolation means when 8 fps animation is "smoothed" at play to not look "jaggy" when game gives 62 fps for example. For every "game" frame there are computed new vertex positions between two model "animation" frames.