Anatomy of a Synfig Animation
(→Synfig determines parameter values using waypoints, interpolation, or other parameter values: More paragraph breaks and frame->page.)
(→Summary: Frame -> page. Simplified wording a bit.)
|Line 69:||Line 69:|
== Summary ==
== Summary ==
To summarize, a
To summarize, a of layers with their time-varying parameter values, are the drawing instructions thattaken together with a flip bookmake up a canvas. The time-varying parameter values are interpolated between waypoints or computed from other parameter values. The values of the parameters for a particular determine the ways that the layers that . There are many kinds of layers, including layers that draw shapes, rotate the , or blur the , and parameter values control things like the position and colors of shapes, and the amount an image is rotated or blurred. There are also Canvas layers which can a a into the current . These layers allow to be complex .
Revision as of 02:35, 2 April 2012
This page is still in draft form and might contain significant errors.
Before attempting to use Synfig Studio to create an animation, it is worthwhile to get a basic understanding of what a Synfig animation is, the names of its various parts, and how the parts fit together. This page attempts to provide that knowledge. It is quite possible to learn to use Synfig Studio effectively without reading this page, but the information here will hopefully prevent confusion or incorrect assumptions, especially concerning the meanings of terms like canvas and layer.
A Synfig canvas is a flip book with drawing instructions
An animation is a sequence of images or "frames" that are displayed to the viewer in quick succession to create the illusion of smooth motion. One way to create such an animation is to draw each frame on a separate page of a book called a flip book. A viewer can see the animation by flipping through the pages of the flip book quickly.
Of course, manually drawing all of the pages in a flip book takes a long time. What we'd really prefer is to simply describe how to draw the pages and have them all drawn automatically based on our instructions. Synfig Studio allows us to do that. In Synfig, the flip book with drawing instructions is called a canvas.
In real life, the term "canvas" normally refers to a single flat surface. It is important to remember that in Synfig, the canvas is not just one page in the flip book -- it is the entire flip book. And the flip book has drawing instructions for Synfig to follow.
Within this manual the term "canvas" is also used to refer to the window where most editing occurs. The canvas window only shows one page from the flip book at a time. Unfortunately, that can reinforce the wrong idea of the canvas being only one page. However, the canvas window also has a timeline at the bottom. Clicking on different times in the timeline shows different pages in the flip book. So the canvas window really does allow us to see all the pages in the flip book, just not at the same time.
Moreover, when we draw or edit in the canvas window, we aren't only changing the page that is currently displayed. Our changes can also affect other pages. For example, if we draw a circle on a page, it is automatically drawn on all the other pages as well.
Synfig draws frames according to instructions called layers
Synfig draws each page in a particular flip book according to a set of instructions. Each instruction is called a layer and these layers are arranged in a stack with the first layer/instruction at the bottom of the stack.
The term layer may seem to be an odd name for an instruction, but by default many layers act like the "transparent sheets" found in other applications. For example, consider a circle layer on top of a rectangle layer. When Synfig draws these layers the result is a circle on top of a rectangle as you might expect. If you think about layers as transparent sheets, you would think about this as a transparent sheet containing a circle on top of a transparent sheet containing a rectangle.
That "transparent sheets" ideas is often sufficient, but sometimes it is useful or necessary to think about layers as instructions. When thinking about layers this way, each page starts as completely transparent, and each layer tells Synfig to do something with the page. The first instruction is the bottom most layer. In our example that is the rectangle layer. The rectangle layer's instruction is simply "draw a rectangle". The next instruction is the next higher layer in the stack, the circle layer. It says to "draw a circle".
It is easy to see that drawing a rectangle and then drawing a circle will produce the same result as stacking a transparent sheet containing a circle on top of a transparent sheet containing a rectangle. So in this case it doesn't matter whether we think of layers as instructions or transparent sheets. So how are Synfig's layers different from transparent sheets?
First, although a transparent sheet could contain many shapes, a Synfig layer cannot. In Synfig, each shape is drawn by separate layer. In fact, Synfig even considers the outline and interior region of a shape to be separate shapes, so they are drawn by separate layers.
Second, there are many types of layers that don't act like transparent sheets at all. These types of layers are sometimes called filter layers or effect layers. For example, a blur layer blurs the page, and a rotate layer rotates the page. Layers always act on the page as it was left by the layers lower in the stack. So a rotate layer on top of two rectangle layers will rotate the page containing the rectangles. It won't rotate each of the rectangles in place.
Third, layers have parameters. Each type of layer has its own set of parameters. Layers which draw shapes have parameters such as the center and radius of a circle or the list of points that a curve goes through. A layer which rotates the page has a parameter for the angle of rotation. A layer which blurs the page has a parameter for the amount to blur it. Synfig uses exactly the same stack of layers to draw on every page of a flip book. The only thing which changes from one page to another is the values of the parameters. In a later section, we'll see how Synfig Studio allows us to control what parameter values to use when it draws each page.
Fourth, even shape layers don't always act like transparent sheets. Many types of layer, including shape layers, have a "blend method" parameter. To understand how it works it is easiest think about what these layers do as a two step process. First, they create a new transparent page, separate from any flipbook. For example, a circle layer creates a page with a circle on it. Next, they combine the new page with the current page through a process called blending.
The blend method parameter value controls how each pixel in the current page will be changed based on the color and transparency of that pixel and the pixel at the same location in the new page. There are many blend methods to choose from. The default is the composite blend method. It effectively places the new page on top of the existing page, letting the existing page show through only where the new page is transparent. This is why shape layers act like transparent sheets by default. However, other blend methods can have very different effects. As an extreme example, the Behind blend method effectively places the new page under the existing page. So a layer with a Behind blend method will actually appear to be under all of the layers that are below it in the stack.
Paste Canvas layers allow us to create trees of layers
There is one more way that Synfig layers are more like instructions than transparent sheets. There is a type of layer called a Paste Canvas layer that can blend a page from another flipbook (i.e. a canvas) into the current page. We can use Paste Canvas layers to build a complex canvas out of simpler canvases. Each of the simpler canvases has its own stack of layers, and the layers of a canvas only control the drawing of the pages in that canvas.
For example, if we are trying to animate a person we might have six separate canvases -- one each for the right leg, left leg, right arm, left arm, torso, and head. The main canvas would have six Paste Canvas layers, each one blending in a page from one of the body part canvases. This arrangement ensures that layers in one bodypart canvas don't affect another bodypart. For example, a rotate layer at the top of the right arm canvas will only rotate the right arm.
Of course, the simpler canvases can themselves contain Paste Canvas layers, resulting in a tree of nested layers. For example, the arm canvas could contain Paste Canvas layers that refer to separate canvases for the upper arm, lower arm, and hand.
With Synfig Studio, we can create each branch of the layer tree by telling Synfig to encapsulate a set of layers. Encapsulating a set of layers causes Synfig to move them to a new canvas and, in their place, add a Paste Canvas layer that refers to the new canvas. In the Layers Panel, the added Paste Canvas layer can be expanded to see the layers that were encapsulated in the new canvas.
Even though the layer tree may contains layers from many canvases, Synfig Studio provides a unified view that allows us to directly edit any of the layers in the tree without needing to open the canvases individually. For example, we can be directly select and edit the hand in the canvas window even though it is two layers deep in the layer tree.
Synfig determines parameter values using waypoints, interpolation, or other parameter values
As mentioned earlier, Synfig uses exactly the same stack of layers to draw on every page of a flip book. The only thing which changes from one page to another is the values of the layer parameters.
When drawing a particular page, Synfig needs to determine the values of all of the parameters for all of the layers at the page's time within the animation. If we want we can set the value directly for a particular page. This establishes a waypoint for the value at that page's time. The waypoint ensures that the parameter will have the specified value at the specified time.
Of course, directly specifying the value for each page is not practical. To avoid this, we can let Synfig interpolate the value based on the surrounding waypoints. There are a variety of interpolation methods from which to choose. The default interpolation method causes the parameter value to pass smoothly through the waypoints.
We can also indicate that a parameter value should always be the same as some other parameter value. The most common example of this occurs automatically when drawing a shape with the Draw tool. Drawing a single shape can create two layers, an outline layer which draws the outline of the shape and a region layer which fills the interior of the shape. The points which the outline of the shape goes through are parameters of both layers and they are normally linked to each other so that changing one will also change the other. Other values can be shared between parameters in a similar way through a process called Exporting and Connecting.
In more advanced scenarios, a parameter can be one of many types of computed parameters. Computed parameters calculate their values based on one or more other parameter values.
To summarize, a stack of layers with their time-varying parameter values, are the drawing instructions that, taken together with a flip book, make up a canvas. The time-varying parameter values are interpolated between waypoints or computed from other parameter values. The values of the parameters for a particular page determine the ways that the layers draw that page. There are many kinds of layers, including layers that draw shapes, rotate the page, or blur the page, and parameter values control things like the position and colors of shapes, and the amount an image is rotated or blurred. There are also Paste Canvas layers which can blend a page from a diffent canvas into the current page. These layers allow us to create a tree of layers which can be used to create complex animations.