Working with Keys
Keys are the basic building blocks of animation in Terragen 4. This chapter helps you understand what animation keys are and how to work with them.
For a hands-on example of creating an animation and working with keys please read this tutorial.
What are keys?
Keys are specific points in an animation which you set. When you want to animate a parameter you will typically add at least a start key and end key. When your render an animation the value of the parameter will then be animated between the start key and the end key. You don't need add keys at every frame. Terragen calculates the values in between each key using a process called "interpolation". You can find out more about interpolation in the chapter on interpreting curves in the Curve Editor.
Keys are really a combination of two values. The first value is the frame the key is set on. You can also think of this as the time. The second value is the value of the parameter at the frame the key is on.
There are two ways to create keys. The first is to use the animation button for a parameter. The other is to insert them using the editors in the Animation Panel such as the Curve Editor and the Dope Sheet.
It's important to note that to get a parameter to show in the Animation Panel you first need to set a key on it using the animation button for the parameter. That being the case we'll discuss the animation buttons first.
Every parameter which can be animated has an animation button. When you click the button a menu pops up which lets you choose from several things. One is "Set animation key". Choose that item to set a key. If the parameter has multiple components there will be a submenu which lets you choose to set a key on one or all of the components. When you set a key on a parameter a new key is created at the current frame. The current frame is the one the timeline at the bottom of the main window is set to.
You can tell a parameter has a key set on it because any editable text for the parameter will change colour. The text will be green if there is a key set at the current frame. For frames with no key the text will be blue.
Most animation will need at least two keys to be useful. You can set another key on the parameter by changing the current frame and then setting a key at the new frame.
Although it's certainly possible to create animations using only animation buttons it's a lot easier if you use the Animation Panel. The editors in the Animation Panel let you insert keys visually. As mentioned above you do need to set at least one key on a parameter before it will show up in the Animation Panel. There is a tutorial on creating animations using the Curve Editor here. It's also worth reading the Animation Panel reference.
Naturally you will want to make changes to keys when you are animating a scene. It is possible to do this using only the animation buttons in the parameter views. However this can be a bit awkward and it's recommended that you use the Animation Panel for the bulk of your animation work.
You can perform basic operations using the animation buttons though. Aside from setting keys the main use of the animation button is removing or deleting them. The animation button menu has a "Remove animation key" item. If the parameter has multiple components there will be a submenu which lets you choose the component to remove the key from. If a component doesn't have a key at the current frame the menu item for it will be disabled. There is also a "Delete animation" item in the animation button menu which will remove all the keys from the parameter at once.
You cannot change the frame of keys using the animation button. You would need to first delete the key at the current frame, change the current frame to the new frame, enter the value you want and set a new key. It's much easier to use the editors in the Animation Panel to move keys. All you need to do is click and drag on the key to move it.
When you want to change the value of a key you first change the value and then you have to set a new key. If you don't set a new key your change to the value won't stick. If you changed the current frame and then changed it back to the frame where you changed the value you would see the old value unchanged. Again this is easier in the Animation panel, a click and drag will change the value without you needing to do anything else.
One situation where the animation button is useful is setting keys to precise values. It is possible to move keys to exact values in the Animation Panel editors, if you can't be exact enough just using the mouse, by using the Action buttons for the editors. However you can also do it using the animation button. Make sure the current frame is set to the frame of the key you want to edit. Change the value in the parameter view and set a new key.
The Animation Panel has more options for editing keys. It is much easier to see at a glance what is happening with an animation. Aside from being easier to modify keys you can also perform operations on multiple keys at once. You can also do things like scale keys.
Keys in the Animation Panel
Keys are shown in the Animation Panel editors as white diamonds. You can click a key to select it. Selected keys are coloured orange. Some keys are yellow diamonds. These are special keys called metakeys and are discussed further below.
There are two editors in the Animation Panel. One is the Curve Editor. The Curve Editor allows you to edit both the frame and values of keys. The other editor is the Dope Sheet. The Dope Sheet only allows you to edit the frame of keys. Another way of looking at it is that the Dope Sheet allows you to edit the timing of keys. This is something you often need to do when animating, for example making something happen a bit sooner or happen over a longer timespan. The Dope Sheet specialises in changing timing and by only letting you change the frames of keys it helps to prevent accidental changes to the values of the keys.
In both editors you can click and drag keys to move or scale them. First select the keys either by clicking on them or drag selecting. Once the keys are selected you can manipulate them.
When you use the Dope Sheet you may notice that some of the keys are drawn as yellow diamonds instead of white ones. These yellow keys are special keys called metakeys. You will only see metakeys for parameters which have multiple components (i.e. vectors or colours). You will also only see metakeys in rows in the Dope Sheet for parameter level items in the node list.
A metakey is like a summary. If you look at the image below you will see that for every frame there is a metakey there is one or more normal keys below it at the same frame. Metakeys are helpful for giving you an overview of the animation without having to expand a param to show all its components.
Metakeys allow you manipulate more than one key at once. When you select a metakey it also selects all the normal keys below it. Any operation you perform on the metakey will also happen to the normal keys at that frame. Looking at the image above you will see that there are keys for each of the X and Y components of the Position param at frame 15. If you select the metakey at frame 15 you can move both of those keys at once, instead of having to select all the normal keys and move them or move them individually. You could also delete all the keys at frame 15 by selecting the meta key at frame 15 and then deleting it.
You don't need to insert metakeys yourself. The Dope Sheet automatically inserts them when you insert a normal key. However you can insert a metakey just like a normal key. When you insert a key in a parameter level row a metakey is inserted and a normal key is inserted at that frame for every component of the parameter.
A parameter is an individual setting in a node parameter view which controls some aspect of the node.
A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.