Difference between revisions of "Doc:Adding Layers"

From Synfig Studio :: Documentation
Jump to: navigation, search
(Adding stuff from Getting_Started tutorial)
(Adding more stuff from Getting_Started tutorial)
Line 33: Line 33:
  
 
The gradient should now be restricted to the rectangle. Congratulations! You just made your first interacting layers with Synfig.
 
The gradient should now be restricted to the rectangle. Congratulations! You just made your first interacting layers with Synfig.
 +
 +
If only for it's organizational capability, encapsulating canvases into inline canvases dramatically improves the usability and usefulness of Synfig Studio. But lots of programs can do this. What sets Synfig apart from other programs with layer hierarchies is the concept of locality. Remember how some layers can muck with what is under them, like blur? Well, a layer can only modify the data that it gets from directly below it. In other words, if you were to throw a blur layer at the top of that inline canvas we just created, the only thing it would blur would be the region and outline that are inside of the inline canvas--the circles under it would not be blurred!
 +
 +
Lets try it. Make sure all the circles are under the inline canvas we just created. Expand the inline canvas to show its contents, and select the top layer inside of it (should be the "Outline" layer). This is where we want to insert the blur. Right click on the selected layer and a popup menu will appear. The first item in that popup is "New Layer". Inside of the "New Layer" menu, you'll see several categories of layers you could create, but what we want is a blur, so goto the Blur category and select the "Blur" layer. (so that would be "New Layer->Blurs->Blur")
 +
 +
Well, it blurred... but something is not quite right--the inside edge of the outline is now all soft, but it still kinda looks like there is a hard edge on the outside. It is doing this because the blend method of the blur defaulted to "composite" (you can change the default blend method for new layers from the toolbox). What we want is a blend method of "Straight". Just select the blur layer, and change the blend method to "straight" in the params tab.
 +
 +
(NOTE: I will probably change the way that default blend methods are handled in the future--as the way it is currently handled seems to only create hassles like this)
 +
 +
Ok, now we have all of the contents of the inline canvas blurred, but everything under it is sharp!
  
 
== Digging further... ==
 
== Digging further... ==

Revision as of 16:24, 11 January 2006

Languages Language: 

English • Deutsch • español • suomi • français • italiano • Nederlands • português • română • русский • 中文(中国大陆)‎


Usual note to the reader: This is not yet finished; please be patient.


Introduction

In the previous tutorial, you made a first simple animation by changing the attributes of primitive objects such as its position, color, and size. These simple types, however, are seldomly sufficient to create advanced characters and objects. To do so, Synfig uses Layers. They are similar to layers known from other drawing application such as the GIMP, for instance.

However, Synfig is different to simple layers in at least two respects:

  1. You can organize layers into hierachical groups.
  2. You can use upper layers to change the behaviour (or look) or underlying layers.

Doing so is quite easy. Let's look at a simple example.

  1. Create a new file with 0 duration. There's no need to bother with a timeline at this point.
  2. Create a simple rectangle.


Combining Layers

Now there are two ways to proceed. In the first way, pick the Gradient Tool from the Synfig main window, and click into the canvas once. You should note that another layer was added in your Layer tab called 'Gradient'. This is nothing special. If you see no gradient but just a plain color, pick the Normal tool, click into the canvas to acivate the gradient's ducks. You need to grab the one you see and move it a bit until a gradient appears.

You now have a gradient but it is not what you wanted: It spreads the whole canvas and the goal was to have a gradient on the rectangle. Let's fix this now.

Select the gradient and the rectangle layer in your Layer tab. They should appear with a blue background now. Then, context-click (ie. right-click on Windows and Linux) and select 'Encapsulate' from the menu. The view of your layer tab should change now, showing a small box called 'Inline canvas' with an arrow in front. If you click the arrow, it will unfold and show your previous two layers; the gradient and the rectangle.

You can treat this layer like any other layer -- move it around, duplicate it, copy and paste it. You'll notice an arrow next to the icon of the box. By clicking on this arrow, you can expand the inline canvas to see its contents.

If you want to change the name of it to something more descriptive, just select the layer in the layer tab and click on its label. Then you just edit it in place. You can do this for ANY layer, and are strongly encouraged to do so.

Using locality

However, there is still a problem: The gradient still covers the whole canvas althought we wanted it to be restricted on the rectangle. To do so, activate the gradient layer in the Layer tab. Now activate the Params tab in the Parameter Window, and search the attribute called 'Blend method'. Double-click the entry and select 'Unto' from the appearing drop-down menu.

The gradient should now be restricted to the rectangle. Congratulations! You just made your first interacting layers with Synfig.

If only for it's organizational capability, encapsulating canvases into inline canvases dramatically improves the usability and usefulness of Synfig Studio. But lots of programs can do this. What sets Synfig apart from other programs with layer hierarchies is the concept of locality. Remember how some layers can muck with what is under them, like blur? Well, a layer can only modify the data that it gets from directly below it. In other words, if you were to throw a blur layer at the top of that inline canvas we just created, the only thing it would blur would be the region and outline that are inside of the inline canvas--the circles under it would not be blurred!

Lets try it. Make sure all the circles are under the inline canvas we just created. Expand the inline canvas to show its contents, and select the top layer inside of it (should be the "Outline" layer). This is where we want to insert the blur. Right click on the selected layer and a popup menu will appear. The first item in that popup is "New Layer". Inside of the "New Layer" menu, you'll see several categories of layers you could create, but what we want is a blur, so goto the Blur category and select the "Blur" layer. (so that would be "New Layer->Blurs->Blur")

Well, it blurred... but something is not quite right--the inside edge of the outline is now all soft, but it still kinda looks like there is a hard edge on the outside. It is doing this because the blend method of the blur defaulted to "composite" (you can change the default blend method for new layers from the toolbox). What we want is a blend method of "Straight". Just select the blur layer, and change the blend method to "straight" in the params tab.

(NOTE: I will probably change the way that default blend methods are handled in the future--as the way it is currently handled seems to only create hassles like this)

Ok, now we have all of the contents of the inline canvas blurred, but everything under it is sharp!

Digging further...

If you care to look into Synfig's main menu 'Layer > New Layer' you will note quite a lot of different possibilities for making layers. Several of them sound rather unusual; 'Transform > Rotade' for example. You can use this to add new attributes to your objects. And just like other, basic attributes in the previous animation tutorial, you can change them to be different in certain keyframes. And of course, Synfig aill take of the steps in between.

For example, you could create a star from the layers menu, add a 'Rotate' layer. Combine this with the leeson learn in the last tutorial and you can create a rotating star. Change its color, too, and you'll get a quite impressive effect for 2 minutes of work.


Languages Language: 

English • Deutsch • español • suomi • français • italiano • Nederlands • português • română • русский • 中文(中国大陆)‎