Difference between revisions of "Doc:Reuse Animations"
(Update) |
(Included animationa and sample file) |
||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
− | One of the goals of all animators (specially the lazy ones like me) is to have the opportunity to reuse pieces of animation. It allows you to save a lot of time if you can insert some portions of animations already recorded into any other position in time. | + | One of the goals of all animators (specially the lazy ones like me) is to have the opportunity to reuse pieces of animation. It allows you to save a lot of time if you can insert some portions of animations already recorded into any other position in time. |
+ | |||
+ | This is specially useful for making characters speaking because you have to move your character's mouth to repeated positions depending on the phonemes it describes while speaking. | ||
This can be done easily just using a combination of [[Keyframe|keyframes]] and exported canvases. | This can be done easily just using a combination of [[Keyframe|keyframes]] and exported canvases. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Keyframes == | == Keyframes == | ||
Line 18: | Line 14: | ||
# Modify your objects in the way you want (for example make eye closed just moving the points of the eyelid). | # Modify your objects in the way you want (for example make eye closed just moving the points of the eyelid). | ||
# Give a name to the keyframe just making a click into its corresponding Description cell. | # Give a name to the keyframe just making a click into its corresponding Description cell. | ||
− | # Repeat the above steps as many times you need to make a new "pose". Let's say you have created | + | # Repeat the above steps as many times you need to make a new "pose". Let's say you have created a keyframe at frames numbers 2 (eye open) and 4 (eye closed) |
# Once done then go to another frame with the [[Time Cursor|time cursor]], select the keyframe you want to introduce and press the "Duplicate keyframe" button. You'll obtain a copy of the selected keyframe at the current [[Time Cursor|time cursor]] position. | # Once done then go to another frame with the [[Time Cursor|time cursor]], select the keyframe you want to introduce and press the "Duplicate keyframe" button. You'll obtain a copy of the selected keyframe at the current [[Time Cursor|time cursor]] position. | ||
− | There is a problem with this technique. You are making copies of the entire animation poses that you have stored in the first keyframes of the time (frames 2 and 4 of the sample) and therefore you have made copies of all the other objects existing in the scene (following example the eyeball). If you have already a eyeball animation recorded and you overlap a eyeblink (open and closed) set of keyframes in the middle then the eyeball animation would be broken by the insertion of the copies of the keyframes of the movement of the eyelids. | + | There is a problem with this technique. You are making copies of the entire animation poses that you have stored in the first keyframes of the time (frames 2 and 4 of the sample) and therefore you have made copies of all the other objects existing in the scene (following the example, the eyeball). If you have already a eyeball animation recorded and you overlap a eyeblink (open and closed) set of keyframes in the middle, then the eyeball animation would be broken by the insertion of the copies of the keyframes of the movement of the eyelids. |
== Exporting the Canvas Parameter == | == Exporting the Canvas Parameter == | ||
− | To avoid | + | Every time you encapsulate a group of layers you obtain a layer called [[Inline Canvas]] that is a special layer that holds other layers inside and prevents the composition of the inner layers over the other layers outside of it, that are outside of its scope. |
+ | |||
+ | One of the parameters of the encapsulate layer is the [[Canvas Parameter|Canvas]]. The canvas is like a workspace that represent all the layers that are held by the encapsulation layer. | ||
+ | |||
+ | To avoid the problem described in the previous section (the keyframes affect to all the objects in the scene) you can do following: | ||
# Before create the keyframes poses of the eyelids then encapsulate all the layers that form the eyelids inside a Inline Canvas layer. | # Before create the keyframes poses of the eyelids then encapsulate all the layers that form the eyelids inside a Inline Canvas layer. | ||
# Then select the just encapsulated layer and select the Canvas parameter in the Parameter Dialog. | # Then select the just encapsulated layer and select the Canvas parameter in the Parameter Dialog. | ||
− | # Right click a the Canvas parameter and export | + | # Right click a the Canvas parameter and export it and give a name (in the sample will be "eyelids"). |
Once exported you can go to the [[Canvas Browser]] and select the just exported canvas. | Once exported you can go to the [[Canvas Browser]] and select the just exported canvas. | ||
− | Double click it and you would open a new window with the layers that are encapsulated on the "eyelids" canvas. | + | Double click it and you would open a new window with the layers that are encapsulated on the step 1. The "eyelids" canvas in the sample. |
Now you can create all the keyframes you need to store your "poses". Once done you can go to the proper frame and insert a copy of the pose keyframe. It would produce a keyframe at the "eyelids" canvas, but not any other keyframe on the other layers (for example the eyeball). This allow you make independent the animation of a portion of your model from the others. | Now you can create all the keyframes you need to store your "poses". Once done you can go to the proper frame and insert a copy of the pose keyframe. It would produce a keyframe at the "eyelids" canvas, but not any other keyframe on the other layers (for example the eyeball). This allow you make independent the animation of a portion of your model from the others. | ||
− | Now once stored the eye blinks (open ad closed) at the desired position you can go to the main window just closing the "eyelids" canvas. You'll see that all the modifications are | + | Now once stored the eye blinks (open ad closed) at the desired position you can go to the main window just closing the "eyelids" canvas window. You'll see that all the modifications are transmitted to the main animation but they don't place any keyframe for any of the current layers. Even the layers that are inside the "eyelids" encapsulated layer doesn't have keyframes (you can see the indication that there is a keyframe inside but none keyframe is displayed at the kayframe dialog). Also you can see the waypoints and tweak them but not the keyframes. |
− | Now, once you have created your animation of the eyelids you can go to the eyeball and modify to your taste inserting keyframes or waypoints with no worry on interfering on the eyelids animation. | + | Now, once you have created your animation of the eyelids you can go to the eyeball and modify to your taste inserting keyframes or waypoints with no worry on interfering on the eyelids animation. Also you can animate the eyeball before and make the animation of the eyelids later. They wouldn't interfere. |
− | It would be a great improvement if you can connect the time cursor of the main animation window and the exported inline canvas. This would allow have a feedback on where insert the poses keyframes of your local animation. | + | It would be a great improvement if you can connect the time cursor of the main animation window and the exported inline canvas to show at both windows the same current time. This would allow have a feedback on where insert the poses keyframes of your local animation. |
== A sample == | == A sample == | ||
Here you can find a sample animation of a eye making eyeblinks (the closed and open position are copies of the keyframes "Open" and "Closed", meanwhile the eyeball moves independently in its own animation. | Here you can find a sample animation of a eye making eyeblinks (the closed and open position are copies of the keyframes "Open" and "Closed", meanwhile the eyeball moves independently in its own animation. | ||
+ | |||
+ | I have stored the poses "Open" and "Closed" at frames 0 and 2. The animation is defined to start at frame 6. | ||
+ | |||
+ | http://www.darthfurby.com/genete/synfig/eyeblink.gif | ||
+ | [http://www.darthfurby.com/genete/synfig/eyeblink.sifz file sample] | ||
+ | |||
+ | All comments are welcome. |
Revision as of 21:09, 28 September 2007
Introduction
One of the goals of all animators (specially the lazy ones like me) is to have the opportunity to reuse pieces of animation. It allows you to save a lot of time if you can insert some portions of animations already recorded into any other position in time.
This is specially useful for making characters speaking because you have to move your character's mouth to repeated positions depending on the phonemes it describes while speaking.
This can be done easily just using a combination of keyframes and exported canvases.
Keyframes
Our goal is to record some sort of animation and reuse it later. This can be done using keyframes. If you create some keyframes at the beginning of your animation you can reuse these "poses" at a later point in time just duplicating the keyframes at other time position. To do that just do following:
- Create a Keyframe at frame (all of our keyframes would be created close to each other to use a small portion of time. We only want to record a "pose" not a transition)
- Modify your objects in the way you want (for example make eye closed just moving the points of the eyelid).
- Give a name to the keyframe just making a click into its corresponding Description cell.
- Repeat the above steps as many times you need to make a new "pose". Let's say you have created a keyframe at frames numbers 2 (eye open) and 4 (eye closed)
- Once done then go to another frame with the time cursor, select the keyframe you want to introduce and press the "Duplicate keyframe" button. You'll obtain a copy of the selected keyframe at the current time cursor position.
There is a problem with this technique. You are making copies of the entire animation poses that you have stored in the first keyframes of the time (frames 2 and 4 of the sample) and therefore you have made copies of all the other objects existing in the scene (following the example, the eyeball). If you have already a eyeball animation recorded and you overlap a eyeblink (open and closed) set of keyframes in the middle, then the eyeball animation would be broken by the insertion of the copies of the keyframes of the movement of the eyelids.
Exporting the Canvas Parameter
Every time you encapsulate a group of layers you obtain a layer called Inline Canvas that is a special layer that holds other layers inside and prevents the composition of the inner layers over the other layers outside of it, that are outside of its scope.
One of the parameters of the encapsulate layer is the Canvas. The canvas is like a workspace that represent all the layers that are held by the encapsulation layer.
To avoid the problem described in the previous section (the keyframes affect to all the objects in the scene) you can do following:
- Before create the keyframes poses of the eyelids then encapsulate all the layers that form the eyelids inside a Inline Canvas layer.
- Then select the just encapsulated layer and select the Canvas parameter in the Parameter Dialog.
- Right click a the Canvas parameter and export it and give a name (in the sample will be "eyelids").
Once exported you can go to the Canvas Browser and select the just exported canvas.
Double click it and you would open a new window with the layers that are encapsulated on the step 1. The "eyelids" canvas in the sample.
Now you can create all the keyframes you need to store your "poses". Once done you can go to the proper frame and insert a copy of the pose keyframe. It would produce a keyframe at the "eyelids" canvas, but not any other keyframe on the other layers (for example the eyeball). This allow you make independent the animation of a portion of your model from the others.
Now once stored the eye blinks (open ad closed) at the desired position you can go to the main window just closing the "eyelids" canvas window. You'll see that all the modifications are transmitted to the main animation but they don't place any keyframe for any of the current layers. Even the layers that are inside the "eyelids" encapsulated layer doesn't have keyframes (you can see the indication that there is a keyframe inside but none keyframe is displayed at the kayframe dialog). Also you can see the waypoints and tweak them but not the keyframes.
Now, once you have created your animation of the eyelids you can go to the eyeball and modify to your taste inserting keyframes or waypoints with no worry on interfering on the eyelids animation. Also you can animate the eyeball before and make the animation of the eyelids later. They wouldn't interfere.
It would be a great improvement if you can connect the time cursor of the main animation window and the exported inline canvas to show at both windows the same current time. This would allow have a feedback on where insert the poses keyframes of your local animation.
A sample
Here you can find a sample animation of a eye making eyeblinks (the closed and open position are copies of the keyframes "Open" and "Closed", meanwhile the eyeball moves independently in its own animation.
I have stored the poses "Open" and "Closed" at frames 0 and 2. The animation is defined to start at frame 6.
All comments are welcome.