Interpreting Curves in the Curve Editor

From Terragen Documentation from Planetside Software
Jump to: navigation, search

The Curve Editor in the Animation panel makes it easy to visualise and edit the animation in Terragen 4. This purpose of this chapter is to help you understand the Curve Editor and the lines and curves it displays.

The Curve Editor is basically a graph. The horizontal axis is for frames. You might think of this as time. As you move from left to right the frame number increases. The vertical axis is for parameter values. As you move up the value increases. As you move down the value decreases.

Intc editor as graph.gif

When keys are added to a parameter Terragen draws the keys in the editor. It also draws lines or curves between the keys. These lines show what the values would be at frames in between the keys.

Something to note is that Terragen currently only animates using whole frame numbers, for example frame 1, 2 or 3. It doesn't use partial or fractional frames like frame 1.5 or 2.25. This means that although the editor may draw curves that change between frame positions the only values which actually effect the animation are those points on the curve which correspond to a whole frame position. This isn't a very realistic example but imagine you have a curve that crosses one frame position and then wobbles up and down before it reaches the next frame position. Those wobbles in between the frames don't effect the animation at all. The only parts of the curve that do are the ones where it crosses the frame positions.

Terragen works out the values between keys using a process known as interpolation. To put it simply, Terragen uses a mathematical formula to figure out what the values should be between keys. It currently has two different methods of interpolation. The first is Linear. This connects the keys with straight lines. The second interpolation method is TCB. This connects the keys with a curve which ensures animation happens smoothly through key positions. TCB is the default interpolation method.

As an aside, TCB stands for "Tension Continuity Bias". The name describes some technical aspects of the curve. You don't need to know what they are, but it might help to know that TCB is a type of curve.

You don't need to understand the maths behind these interpolation methods to make use of them. The Curve Editor shows them graphically so you can see how they effect animation. However it is useful to understand the characteristics of each interpolation method to make best use of them.

Although TCB is the default interpolation method we'll talk about Linear interpolation first because it's the simplest method. Linear interpolation connects keys with straight lines. These straight lines show that the values are changing at a steady rate. For every frame between the keys the value increases or decreases by the same amount. A line which is sloping up shows that the value is increasing. By the same token a line which is sloping down shows that the value is decreasing. A line which is flat means the value is staying the same.

A key point here is that the slope of the line shows how the value is changing. A steeper line means the value is changing faster. A flat line means the value isn't changing at all. However you do need to keep in mind that you can zoom in and out of the Curve Editor and when you do this the slope of the line will often change. This doesn't mean the actual animation has changed of course, it just means the way it's displayed has changed. Here's an example:

Intc slope comparison.gif

The two lines shown here both show the same animation. However in the image on the right the editor has been zoomed horizontally and this has made the line appear steeper. It's still the same animation however, just displayed differently. You can of course tell this because the keys are still at the same frames and values.

Let's look at an example of a curve using Linear interpolation:

Intc linear example.gif

Going from left to right you can see that first and second keys are joined by a straight line sloping upward. This means the value (vertical axis of the graph) is steadily increasing. The second and third keys have the same value. As the value doesn't change between the keys they are joined by a straight horizontal line. The third and fourth keys are joined by a straight line sloping downward. In this case the value is steadily decreasing.

Linear interpolation is easy to understand and can be very useful when you want to animate something moving or changing at a steady speed. An example of that might be clouds moving at a steady speed across the sky. It does have limitations for more complex animation though, particularly for camera or object motion. If you look at the example above again you will see that when we reach a key the value changes quite abruptly. There's a sharp change in the angle of the lines on each side of a key and this happens instantaneously when we reach a key.

These sharp changes in angles can cause motion to be come jarring and jerky or, in the worst cases, disorienting. As an example imagine you have the camera moving in a straight line and then all of a sudden change direction by 90 degrees. It would look much better if the movement changed smoothly from one direction to the other. Another example is changing the colour of a surface. Changing the colour abruptly would give a flickering effect. Changing it smoothly would give more of a pulsing effect.

To give smoother changes in values we need to use an interpolation method which creates a curve between keys rather than just straight lines. TCB interpolation is the way to create smooth curves. It automatically "eases" or smooths values as they approach and move away from keys. This "easing" has the effect of slowing down and speeding things up. When you look at the graph the parts of the curve which are steeper are faster changes in value and the parts that are less steep are slower. Look at this curve:

Intc tcb example.gif

As we go from left to right, we start off a bit slower from the first key and gradually increase speed as we get to the middle of the curve. We then move at a fairly steady pace where the slope of the curve is staying about the same and then as we get closer to the last key we start to slow down again.

What the graph is really showing is acceleration. To use a car analogy, imagine that the two keys are traffic lights. You're stopped at the first key, which is a red light. When it turns green you accelerate away with your speed increasing until you reach the speed limit. This is what the first third of the curve is showing, where the curve actually looks as if it is curving up. The upward curve shows acceleration.

When you're at the speed limit you cruise along at a steady speed. This is shown in the middle third of the curve where the curve is pretty straight. A straight line shows movement at a steady speed. You're not speeding up or slowing down, just cruising along at a steady pace.

You can now see the second key/light coming up, and it's orange so you know you need to slow down to stop at the red light. As you take your foot off the gas and apply the brakes the car begins to slow down or decelerate until eventually you stop at the red light. This slowing down is shown in the final third of the curve. The flattening out of the curve is showing deceleration.

The number of frames or distance between keys is not really the important thing here, what's important is the slope of the curve. The distance between keys shows how long it takes to get from one key to another, but the slope of the curve is showing how quickly the values are changing between the keys.

That covers the basics of understanding what you're seeing when you're looking at curves in the Curve Editor. Here's the main points:

  • The Curve Editor is a graph showing frames (or time) on the horizontal axis and parameter values on the vertical axis.
  • The Curve Editor draws lines and curves between keys which graphically represent how values are changing between keys.

  • The slope of the line or curve shows how the value is changing. Sloping upward means increasing values. Sloping downward means decreasing values. Steeper slopes mean values are changing faster. A flat line means no change in value.

  • Changing the zoom in the Curve Editor can make the curve look steeper or flatter but this is only changing how the curve is displayed, not the actual animation itself.

  • Terragen has different methods of calculating the values between keys. This is called interpolation. Terragen 4 has two interpolation methods. The Linear method connects keys with straight lines which represent steady changes in value, but there can be sharp changes at keys. The TCB method creates a curve which smoothly connects keys without abrupt changes at keys.

  • Linear interpolation is ideal for simpler animation where you want change or movement at a steady speed. It's less suitable for more complex changes or motion because abrupt changes in value at keys can look jerky.

  • TCB interpolation is more suitable for complex animation because it creates a curve which smoothly passes through keys, helping to minimise abrupt changes in value.

Back to the Animation Module Guide

A parameter is an individual setting in a node parameter view which controls some aspect of the node.