Interpolation magic

This topic is 3859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Imagine a body animated with 2 keyframes which needs to be interpolated across using a blend factor. The problem is that the first keyframe isn't known, the only thing you know is that once upon a time the body resided on keyframe 1. If you simply linearly interpolate between the bodys current position and the destination position it will have a curved path and a very high speed when the blend factor is low and a very low speed when the blend factor is high. This is what the euqation looks like atm: Position = ( Target * blendFactor ) + ( CurrentPosition * ( 1.0 - blendFactor ) ) The ideal sollution would create a straight line path and have a constant speed, I don't know if this is at all possible though. Any help appreciated.

Share on other sites
Do you at least know when the first key frame was?

Share on other sites
Sadly no, I guess I can create a guesstimate from the speed of the animation in relation to the blend factor though. The problem is that the "real" previous keyframe could've been a combination of out of sync keyframes, there's also the problem of the physics engine affecting the interpolation. I'm very tired atm though and must get this done so I'm not exactly clear in the head hehe. I'm thinking some exponential of some sort applied to the blend factor could at least create a somewhat constant speed, which at least would make it look a lot better.

Share on other sites
Do you know when the destination key frame is?

Share on other sites
Position = ( Target * blendFactor ) + ( CurrentPosition * ( 1.0 - blendFactor ) )
blendFactor = 1 / numberOfStepsToGetToTarget

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 11
• 16
• 9
• 10
• 13
• Forum Statistics

• Total Topics
633004
• Total Posts
3009851
• Who's Online (See full list)

There are no registered users currently online

×