Pre and Post Extrapolation in Timeline

Suleiman Abdullah
5 min readJan 3

--

Objective: Pre and Post Extrapolation in Timeline.

In the first step, let's us understand What is Pre and Post Extrapolations in TimeLine.

The main purpose for extrapolating animation data in the gaps between Animation clips is to avoid animation GameObject jumping between two transformations, or a humanoid jumping between different poses.

extrapolation makes sure each animation plays with the right time and position of the game object.

Each Animation clip has two gap extrapolation properties: Pre-Extrapolate, which controls how animation data is approximated in the gap before an Animation clip, and Post-Extrapolate, which controls how animation data extends in the gap after an Animation clip.

Here you will see me selecting one animation clip on the timeline but you will see only post extrapolation up on the inspector.

Why is no extrapolation shown?

The Pre-Extrapolate property is hidden when one of the following is true:

  • The gap before the Animation clip is set by the Post-Extrapolation mode of the previous clip.
  • There is no gap before the Animation clip.

So to see Pre extrapolation I will make the first clip have a gap before the animation clip.

Let's start with Post Extrapolation, we have 5 options for Post Extrapolation. None, Hold, Loop, Ping Pong, and Continue.

None: Turns off post-extrapolation. In the gap after the selected Animation clip, the GameObject uses its transform, pose, or state from the Scene. Selecting None is useful if, for example, you want to create an ease-out between an Animation clip and the motion of a GameObject in the Scene.

  • Hold (default): In the gap after the selected Animation clip, the GameObject bound to the Animation track uses the values assigned at the end of the Animation clip.
  • Loop: In the gap after the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation as a forward loop: from start to end. To offset the start of the loop, use the Clip In the property.

Note: This means when you have a gap between two clips before reaching the next animation clip the first clip will loop until the time frame reaches the next clip.

  • Ping Pong: In the gap after the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation forwards, then backward. Use the Clip In property to offset the start of the loop. Changing the Clip In property affects the start of the loop when looping forward, and the end of the loop when looping backwards.
Nice feature this can be used to reverse time like assassin's creed do in their movies
  • Continue: In the gap after the selected Animation clip, the GameObject bound to the Animation track either holds or loops the animation based on the settings of the Source Asset. For example, if the selected Animation clip uses the motion file “Recorded(2)” as its Source Asset and “Recorded(2)” is set to Loop, then selecting Continue loops the animation according to the “Recorded(2)” Loop Time settings.

For Pre Extrapolation, I will explain more with gifs when I spend more time learning and exploring this feature. I will update this article in the future.

Use the Pre-Extrapolation property to set the gap extrapolation of the gap before the selected Animation clip to one of the following options:

  • None: Turns off pre-extrapolation. In the gap before the selected Animation clip, the GameObject uses its transform, pose, or state from the Scene. Select None if, for example, you want to create an ease-in between the motion of a GameObject in the Scene and an Animation clip.
  • Hold (default): In the gap before the selected Animation clip, the GameObject bound to the Animation track uses the values assigned at the start of the Animation clip.
  • Loop: In the gap before the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation as a forward loop: from start to end. To offset the start of the loop, use the Clip In the property.
  • Ping Pong: In the gap before the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation forwards, then backward. Use the Clip In property to offset the start of the loop. Changing the Clip In property affects the start of the loop when looping forward, and the end of the loop when looping backward.
  • Continue: In the gap before the selected Animation clip, the GameObject bound to the Animation track either holds or loops the animation based on the settings of the Source Asset. For example, if the selected Animation clip uses the motion file “Recorded(2)” as its Source Asset and “Recorded(2)” is set to Loop, then selecting Continue loops the animation according to the “Recorded(2)” Loop Time settings.

See you in the next step.

--

--

Suleiman Abdullah

Self taught Unity Developer, who is passion about making games ,and he loves Math For Game Development