Anatomy of a Synfig Animation

From Synfig Studio :: Documentation
Jump to: navigation, search
(Synfig determines parameter values using waypoints, interpolation, or other parameter values: More paragraph breaks and frame->page.)
m (What about layers: Intra links)
 
(6 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
[[Category:Manual]]
 
[[Category:Manual]]
 
[[Category:Unverified]]
 
[[Category:Unverified]]
 +
{{NewTerminology}}
 
<!-- Page info end -->
 
<!-- Page info end -->
  
{{Note|Note|'''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.
== Introduction ==
+
  
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.
+
Synfig files are called {{Literal|documents}} or simply animation source files in the wiki. Synfig can use these files to {{Literal|render}} the frames in an animated GIF or a video.
  
== A Synfig canvas is a flip book with drawing instructions ==
+
In each Synfig document there must be at least one canvas, called the root canvas. A canvas is defined by the default width and height of the rendered frames, the default frequency for sampling the contents of the canvas when rendering (the frames per second), the animation duration (start and end times), other parameters, and a stack of layers that are combined on the canvas to render each frame.
  
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.
+
== What about layers ==
  
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'''.
+
There are two types of layers: {{l|Primitive Layer|Primitive}} and {{l|Filter Layer|Filters}}. Primitives, such as shapes and gradients, produce content based on their own parameters. Filter layers, such as {{l|Blur Layer|Blur}} and {{l|Rotate Layer|Rotate Layers}}, produce content based on their own parameters and on the context of the layer. The context of a layer is the rendered result of the layers that are stacked behind it.
  
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.
+
There is one special kind of layer that is called a {{l|Group Layer}}. It is a folder-like layer that uses the rendered result of all the layers in another canvas. The other canvas can be:
 +
* the root canvas of another document,
 +
* an internal separate canvas, called an "exported canvas", that can be used at several different places in the same document,
 +
* an exported canvas in another document, or
 +
* a {{l|Group Layer}} that takes the default definitions (dimensions, frames per second, etc.) inherited from the canvas containing the Group layer
  
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.  
+
All the layers inside the canvas held by a Group Layer, are called Children Layers of the Group Layer.
  
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.
+
The context of a layer is defined by the canvas where it lives. It is the rendered result of layers that are behind it. If the layer is a child of a Group Layer, its context is the sibling layers (i.e. other children of the same Group Layer) which are behind it.
  
== Synfig draws frames according to instructions called layers ==
+
Treated as a layer, a Group Layer is like a "super layer". Its rendered result is based on its context, parameters, and the rendered result of its children.
  
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 layers of a canvas are used for the entire duration of the canvas. In other words, the same layers are used to render all frames. However, each layer can be animated by the animation of its parameters. The animation of a parameter is determined by a list of {{l|Waypoint|Waypoints}} associated with the parameter. Each waypoint defines the value of the parameter value at a certain time. Synfig automatically interpolates parameter values between waypoints.
  
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.  
+
Many types of layers have a parameter called the {{l|Blend Method Parameter}}. The Blend Method defines how a layer is combined with its context. The default Blend Method, {{Literal|Composite}}, effectively places the layer in front of its context, letting the context show through only where the layer is transparent. However, there are other blend methods that do other effects like masks, shading, etc.
  
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".
+
To summarize, when Synfig renders an animation from a Synfig document it renders each frame using the layers in the root canvas and their interpolated parameter values.
 
+
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.
+
 
+
== Summary ==
+
 
+
To summarize, a list of layers with their time-varying parameter values, are the drawing instructions that taken together with a flip book containing some number of pages 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 frame determine the ways that the layers create the image for that frame, one step at a time. There are many kinds of layers, including layers that draw shapes on the image, rotate the image, or blur the image, and parameter values control things like the position and colors of shapes, and the amount an image is rotated or blurred. There are also layers called Inline Canvas or Pasted Canvas layers which can create a frame in a different animation and blend that frame into the the current frame. These layers allow simple animations to be combined into very complex ones.
+

Latest revision as of 16:37, 20 August 2013

Languages Language: 

English


Navigation Navigation:  Manual>>


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.

Synfig files are called "documents" or simply animation source files in the wiki. Synfig can use these files to "render" the frames in an animated GIF or a video.

In each Synfig document there must be at least one canvas, called the root canvas. A canvas is defined by the default width and height of the rendered frames, the default frequency for sampling the contents of the canvas when rendering (the frames per second), the animation duration (start and end times), other parameters, and a stack of layers that are combined on the canvas to render each frame.

What about layers

There are two types of layers: Primitive and Filters. Primitives, such as shapes and gradients, produce content based on their own parameters. Filter layers, such as Blur and Rotate Layers, produce content based on their own parameters and on the context of the layer. The context of a layer is the rendered result of the layers that are stacked behind it.

There is one special kind of layer that is called a Group Layer. It is a folder-like layer that uses the rendered result of all the layers in another canvas. The other canvas can be:

  • the root canvas of another document,
  • an internal separate canvas, called an "exported canvas", that can be used at several different places in the same document,
  • an exported canvas in another document, or
  • a Group Layer that takes the default definitions (dimensions, frames per second, etc.) inherited from the canvas containing the Group layer

All the layers inside the canvas held by a Group Layer, are called Children Layers of the Group Layer.

The context of a layer is defined by the canvas where it lives. It is the rendered result of layers that are behind it. If the layer is a child of a Group Layer, its context is the sibling layers (i.e. other children of the same Group Layer) which are behind it.

Treated as a layer, a Group Layer is like a "super layer". Its rendered result is based on its context, parameters, and the rendered result of its children.

The layers of a canvas are used for the entire duration of the canvas. In other words, the same layers are used to render all frames. However, each layer can be animated by the animation of its parameters. The animation of a parameter is determined by a list of Waypoints associated with the parameter. Each waypoint defines the value of the parameter value at a certain time. Synfig automatically interpolates parameter values between waypoints.

Many types of layers have a parameter called the Blend Method. The Blend Method defines how a layer is combined with its context. The default Blend Method, "Composite", effectively places the layer in front of its context, letting the context show through only where the layer is transparent. However, there are other blend methods that do other effects like masks, shading, etc.

To summarize, when Synfig renders an animation from a Synfig document it renders each frame using the layers in the root canvas and their interpolated parameter values.


Languages Language: 

English