Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:editors:tangents [2011/04/05 17:15]
bobocat
en:editors:tangents [2019/05/27 12:31] (current)
dirty-six
Line 1: Line 1:
-===== Keyframe Tangents and Interpolation =====+===== Keyframe Tangents and Interpolation - CP =====
  
-When we set keyframes in the Pose Editor or the Sequencer, we are creating poses at specific points in time. This could be the rotation of an elbow, the position of a hip, the degree of a sneer or the position of the camera, etc. In all of these cases we can also specify what happens between the keyframes. This is known as keyframe interpolation.+When we set keyframes in the Pose Editor or the Sequencer, we are creating poses at specific points in time. This could be the rotation of an elbow, the position of a hip, the amount of a sneer or the position of the camera, etc. In all of these cases we can also specify what happens between the keyframes. This is known as keyframe interpolation. 
 + 
 +=== Smooth Interpolation ===
  
 Let's start with a simple example.  Let's start with a simple example. 
Line 7: Line 9:
 Let's say you move the model's hand up and down a couple of times, setting keyframes in the timeline as you go.  Let's say you move the model's hand up and down a couple of times, setting keyframes in the timeline as you go. 
  
-Then you click the little "tangent" button next to the hand in the animation panel to change the tangent type to linear. \\+By default, we will see smooth interpolation between the keyframes. This is essentially drawing a smooth curve as illustrated below. The purple dots are the keyframes and the short lines are the tangents which indicate the direction of the curve at each keyframe. The hand animation shows what this will look like on your model. 
 + 
 +**Handy tip:** Where the curve is close to horizontal that is where the object is moving slowly. Where the curve is steep there is a lot of movement or speed. If the curve is flat there is no movement. 
 + 
 +{{:en:editors:curve_smooth.png|}} 
 +{{:en:editors:hand_smooth.gif|}} 
 + 
 +This actually looks pretty good, with one exception. The last two keyframes are the same so you would expect the hand to stay in the same place between them. Because the curve is being smoothed out it is introducing unwanted motion between the third and fourth keyframes. This might not look too bad here but it can be very annoying and **it happens a LOT**. Imagine if the hand was sitting on a desk? You would see it dipping into the desk at the end of the animation. 
 + 
 +=== Linear Interpolation === 
 + 
 +Let's look at linear interpolation for a moment. Linear interpolation is just a straight line between keyframes. The hand will go directly between the four positions at a constant speed.\\ 
 + 
 +Clicking the little "tangent" button next to the hand in the animation panel will change the tangent type to linear. For this example I did that for all of the keyframes.\\
 {{:en:editors:pe_animation_tangent_01.png|}} {{:en:editors:pe_animation_tangent_01.png|}}
  
-This is how the animation will be interpolated.\\ 
 {{:en:editors:curve_linear.png|}} {{:en:editors:curve_linear.png|}}
 {{:en:editors:hand_linear.gif|}} {{:en:editors:hand_linear.gif|}}
-OK - what this this mean? It's actually pretty simple. Linear interpolation is a straight line between keyframes. The hand will go directly between the two positions at a constant speed.\\ 
  
-What's the drawback of this? The motion will look very robotic and stiff. People don't move like that. +What's the drawback of this? The motion will look very robotic and stiff. People don't move like that. The hand will stay on the desk though!
  
-Let's try the next type of tangentsmooth. This is actually the default.\\  +We have control over the tangents at individual keyframes so we can fix this pretty easily. If we go to the first two keyframes and change the tangent type to "smooth" we will have the best of both worldsWhen you change the tangent for a specific keyframe it affects the curve between that keyframe and the one following it
-{{:en:editors:curve_smooth.png|}}+
  
-Now this is a lot better. The hand looks much more natural .. almost. For keyframes 1, 2 and 3 this is looking great. However, between keyframe 3 and 4 we wanted the hand to stay at the same height. What is happening instead is that the smooth interpolation is causing it to "drift" between those keyframes. This is a pretty common situation and there are a couple of solutions for it.+{{:en:editors:curve_custom.png|}}
  
-One solution is to change the tangent type at the problem keyframes to linear to flatten it out.+=== Flat Interpolation ===
  
 +The last type of interpolation is called "flat". With this type the tangent will always be flat or horizontal. The result is that objects will go slowly when they are near a keyframe and quickly when they are between frames. This is known as "easing in" and "easing out". A nice side benefit of flat interpolation is that when two keyframes have the same value (like key three and four in our example) they will stay steady between the keyframes.
  
-{{:en:editors:curve_flat.png|}} +Here's what the curve and hand look like for flat interpolation.
- +
-{{:en:editors:pe_animation_tangent_tip.png|}}+
  
 +{{:en:editors:curve_flat.png|}}
 +{{:en:editors:hand_flat.gif|}}
  
-When we create animation curves in the Pose Editor or the Sequencer, we can choose +Now go forth and animate!
  
-{{:pedit_curve02_1.png|}} 
-{{:pedit_curve02_1.png|}} 
-{{:pedit_curve03_1.png|}}