Introduction to Layers

From Synfig Studio :: Documentation
Jump to: navigation, search
m
(Not a manual page)
 
(3 intermediate revisions by 2 users not shown)
Line 13: Line 13:
  
 
# Layers that add content. Usually called {{l|Primitives|primitives}}. They are mainly grouped into the Geometry group of layers but there are others that just add content to the canvas and aren't real primitives (Text, Plant, Metaballs etc.). Those layers can produce content without any layer below them just using the {{l|Doc:Blend Method Parameter#Composite|composite blend method}}.
 
# Layers that add content. Usually called {{l|Primitives|primitives}}. They are mainly grouped into the Geometry group of layers but there are others that just add content to the canvas and aren't real primitives (Text, Plant, Metaballs etc.). Those layers can produce content without any layer below them just using the {{l|Doc:Blend Method Parameter#Composite|composite blend method}}.
# Layers that add content but based on the layers that are below it. Those layers take the render result that are below them, and performing a transformation, filter or whatever, produce a modified version of the {{l|Doc:Context|context}} and then composite the result over it using the blend method of the layer. Example layers of that type are: Blur layer, Shadow layer, Bevel layer, etc. They cannot produce any content if there are not any layer below it.
+
# Layers that add content but based on the layers that are below it. Those layers take the render result that are below them, and performing a transformation, filter or whatever, produce a modified version of the {{l|Doc:Context|{{l|Context|context}}}} and then composite the result over it using the blend method of the layer. Example layers of that type are: Blur layer, Shadow layer, Bevel layer, etc. They cannot produce any content if there are not any layer below it.
# Layers that doesn't add content, just replace the render of the context by a transformed version of it. Layers of this type need a context to modify it and replace in the current canvas context. They are called {{l|Doc:Filters}} or {{l|Doc:Transformations}}. Examples of those layers ate the Color Correct layer, Rotate layer, Zoom layer, etc.
+
# Layers that doesn't add content, just replace the render of the {{l|Context|context}} by a transformed version of it. Layers of this type need a {{l|Context|context}} to modify it and replace in the current canvas {{l|Context|context}}. They are called {{l|Doc:Filters}} or {{l|Doc:Transformations}}. Examples of those layers ate the Color Correct layer, Rotate layer, Zoom layer, etc.
  
 
Each layer has a set of {{l|Doc:Parameters|parameters}} which determine how it behaves. When you click on a layer (either in the canvas window, or in the {{l|Doc:Layers Panel}}), you will see its parameters in the {{l|Doc:Params Panel}}.
 
Each layer has a set of {{l|Doc:Parameters|parameters}} which determine how it behaves. When you click on a layer (either in the canvas window, or in the {{l|Doc:Layers Panel}}), you will see its parameters in the {{l|Doc:Params Panel}}.
Line 22: Line 22:
 
When Synfig or Synfig Studio renders the stack of layers the procedure is the following:
 
When Synfig or Synfig Studio renders the stack of layers the procedure is the following:
  
# The layer ask the context to render itself. The context is asked to be rendered with certain parameters in which it is included the time to render.
+
# The layer ask the {{l|Context|context}} to render itself. The {{l|Context|context}} is asked to be rendered with certain parameters in which it is included the time to render.
# Once the context renders itself there are three alternatives:
+
# Once the {{l|Context|context}} renders itself there are three alternatives:
** The layer renders its primitive based on its own parameters and composite the result with the context producing a new context for the upper layer.
+
** The layer renders its primitive based on its own parameters and composite the result with the {{l|Context|context}} producing a new {{l|Context|context}} for the upper layer.
** The layer get the context result and modify it with certain parameters and then composite it against the context itself producing a new context for the upper layer.
+
** The layer get the {{l|Context|context}} result and modify it with certain parameters and then composite it against the {{l|Context|context}} itself producing a new {{l|Context|context}} for the upper layer.
** The layer get the context result, modify it and replace the context by the modification the layer did, creating a new context for the upper layer.  
+
** The layer get the {{l|Context|context}} result, modify it and replace the {{l|Context|context}} by the modification the layer did, creating a new {{l|Context|context}} for the upper layer.  
  
 
So if there are for example, four layers (A,B,C,D) the sequence is like this:
 
So if there are for example, four layers (A,B,C,D) the sequence is like this:
Layer A ask layer B to be rendered, which ask layer C to be rendered which ask layer D to be rendered. As layer D hasn't any layer below it render itself against a empty context (transparent) producing a context for the layer C. Layer C gets the context and produce a new context for the layer B according to its render rules. Same for B to A.
+
Layer A ask layer B to be rendered, which ask layer C to be rendered which ask layer D to be rendered. As layer D hasn't any layer below it render itself against a empty {{l|Context|context}} (transparent) producing a {{l|Context|context}} for the layer C. Layer C gets the {{l|Context|context}} and produce a new {{l|Context|context}} for the layer B according to its render rules. Same for B to A.
 
----
 
----
 
This is the list of all the {{l|Doc:Layers|layers}} available in Synfig.
 
This is the list of all the {{l|Doc:Layers|layers}} available in Synfig.
  
{{l|Category:Manual}}
 
 
{{Include|Category:Layers}}
 
{{Include|Category:Layers}}
 
<!-------The title must be here to override the one given by the Include macro----->
 
<!-------The title must be here to override the one given by the Include macro----->
 
{{Title|Introduction to Layers}}
 
{{Title|Introduction to Layers}}

Latest revision as of 07:29, 19 February 2010

Introduction

Synfig, like most every other competent graphics program, breaks down individual elements of a Canvas into Layers. However, it differs from other programs in two major ways:

  1. An individual layer in Synfig usually represents a single "Primitive". ie. a single region, an outline of a region, an imported JPEG, etc... This allows you to have a great deal of flexibility and control. It is not uncommon for a composition to have hundreds of layers (organized into a hierarchy for artist sanity of course).
  2. A layer can not only composite information on top of the image below it, but also distort and/or modify it in some other way. In this sense, Synfig Layers act much like filters do in Adobe Photoshop or The GIMP. For example, we have a Blur Layer, Radial Blur Layer, Spherical Distortion Layer, color-correct layer, bevel layer, etc...

There are basically three types of layers:

  1. Layers that add content. Usually called primitives. They are mainly grouped into the Geometry group of layers but there are others that just add content to the canvas and aren't real primitives (Text, Plant, Metaballs etc.). Those layers can produce content without any layer below them just using the composite blend method.
  2. Layers that add content but based on the layers that are below it. Those layers take the render result that are below them, and performing a transformation, filter or whatever, produce a modified version of the [[Doc:Context|context]] and then composite the result over it using the blend method of the layer. Example layers of that type are: Blur layer, Shadow layer, Bevel layer, etc. They cannot produce any content if there are not any layer below it.
  3. Layers that doesn't add content, just replace the render of the context by a transformed version of it. Layers of this type need a context to modify it and replace in the current canvas context. They are called Doc:Filters or Doc:Transformations. Examples of those layers ate the Color Correct layer, Rotate layer, Zoom layer, etc.

Each layer has a set of parameters which determine how it behaves. When you click on a layer (either in the canvas window, or in the Doc:Layers Panel), you will see its parameters in the Doc:Params Panel.

How does it works

When Synfig or Synfig Studio renders the stack of layers the procedure is the following:

  1. The layer ask the context to render itself. The context is asked to be rendered with certain parameters in which it is included the time to render.
  2. Once the context renders itself there are three alternatives:
    • The layer renders its primitive based on its own parameters and composite the result with the context producing a new context for the upper layer.
    • The layer get the context result and modify it with certain parameters and then composite it against the context itself producing a new context for the upper layer.
    • The layer get the context result, modify it and replace the context by the modification the layer did, creating a new context for the upper layer.

So if there are for example, four layers (A,B,C,D) the sequence is like this: Layer A ask layer B to be rendered, which ask layer C to be rendered which ask layer D to be rendered. As layer D hasn't any layer below it render itself against a empty context (transparent) producing a context for the layer C. Layer C gets the context and produce a new context for the layer B according to its render rules. Same for B to A.


This is the list of all the layers available in Synfig.