Difference between revisions of "Doc:Snowflake with the Duplicate Layer"

From Synfig Studio :: Documentation
Jump to: navigation, search
(Updated Terminology)
m (remove <br>)
 
(8 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
{{Category|Tutorials}}
 
{{Category|Tutorials}}
 
{{Category|Tutorials Intermediate}}
 
{{Category|Tutorials Intermediate}}
{{Category|NewTerminology}}
+
{{NewTerminology}}
 
<!-- Page info end -->
 
<!-- Page info end -->
 
 
'''This tutorial explain a simple example of the use of the {{l|Duplicate Layer}}, to create a snowflake.'''
 
'''This tutorial explain a simple example of the use of the {{l|Duplicate Layer}}, to create a snowflake.'''
  
 
== First branch of the snowflake ==  
 
== First branch of the snowflake ==  
  
The 1st part is very simple : We'll create a single snowflake branch with the {{l|Spline Tool}} (or the {{l|Polygon Tool}}). <br/>
+
The 1st part is very simple : We'll create a single snowflake branch with the {{l|Spline Tool}} (or the {{l|Polygon Tool}}).
Select the {{Literal|Spline tool}}, and in the tools options, make sure that only {{Literal|Create Region Spline}} is checked. (If you use the {{Literal|Polygon tool}}, check either {{Literal|Create Polygon Layer}} or {{Literal|Create Region Layer}}, as you wish).
+
  
Draw the branch in the upper middle part of your image. Once it's drawn, select the newly created layer (I will refer to it as the "Branch layer") and make sure that the bottom of the branch is more or less at the same place as the green dot showing the center of the image. You can move your branch by selecting all the points {{Shortcut|Ctrl|A}} and using the {{l|Normal Tool}}
+
Select the {{Literal|Spline tool}}, and in the tools options, make sure that only {{Literal|Create Region}} is checked. (If you use the {{Literal|Polygon tool}}, check either {{Literal|Create Polygon Layer}} or {{Literal|Create Region}}, as you wish).
  
http://i209.photobucket.com/albums/bb207/rore4wiki/Synfig/snow_step1.png
+
Draw the branch in the upper middle part of your image. Once it's drawn, select the newly created layer (I will refer to it as the "Branch layer") and make sure that the bottom of the branch is more or less at the same place as the green dot showing the center of the image. You can move your branch by selecting all the points {{Shortcut|Ctrl|A}} and using the {{l|Transform Tool}}
 +
 
 +
[[File:Snow Duplicate Tutorial Step1 0.63.06.png|frame|center]]
  
 
== Adding the Rotate and Duplicate Layers ==
 
== Adding the Rotate and Duplicate Layers ==
To make a whole 6-branches snowflake, we need to make several copies of the branch, and rotate them.<br/>
+
[[File:Snow Duplicate Tutorial Step2 0.63.06.png|frame|right]]
 +
To make a whole 6-branches snowflake, we need to make several copies of the branch, and rotate them.
 +
 
 
First, we need a {{l|Rotate Layer | Rotation layer}}. Right click on the image and select {{c|<Layer>|New Layer|Transform|Rotate}}. You should now have a Rotate Layer on top of the Branch layer.
 
First, we need a {{l|Rotate Layer | Rotation layer}}. Right click on the image and select {{c|<Layer>|New Layer|Transform|Rotate}}. You should now have a Rotate Layer on top of the Branch layer.
  
Line 24: Line 26:
  
 
So far, no change is visible on our image, it's normal :).
 
So far, no change is visible on our image, it's normal :).
In the {{l|Layers Panel}}, make sure that the layers are in the following order : Duplicate on top, Rotate in the middle, and the "Branch" layer on the bottom.
 
 
http://i209.photobucket.com/albums/bb207/rore4wiki/Synfig/snow_step2.png
 
  
 +
In the {{l|Layers Panel}}, make sure that the layers are in the following order : Duplicate on top, Rotate in the middle, and the "Branch" layer on the bottom.
  
 
== Connecting everything together ==
 
== Connecting everything together ==
Select the Duplicate layer and look at the {{l|Parameters Panel}}. There's an {{Literal|Index}} value that is automaticaly exported. Its name is {{Literal|Index 1}}. (It looks like {{Literal|Index(Index 1)}} in the panel). <br/>
+
Select the Duplicate layer and look at the {{l|Parameters Panel}}. There's an {{Literal|Index}} value that is automatically exported. Its name is {{Literal|Index 1}}. (It looks like {{Literal|Index (Index 1)}} in the panel).
 +
 
 
This value is made of 3 subparameters : {{Literal|From}}, {{Literal|To}} and {{Literal|Step}}.
 
This value is made of 3 subparameters : {{Literal|From}}, {{Literal|To}} and {{Literal|Step}}.
 
Those parameters tells how many times an object is duplicated.  
 
Those parameters tells how many times an object is duplicated.  
 
<!--- |((From - To)/Step)|+1 = Number of duplicates. --->
 
<!--- |((From - To)/Step)|+1 = Number of duplicates. --->
 +
 
We need 6 branches so set the {{Literal|To}} parameter to '''6''' (keep {{Literal|From}} and {{Literal|Step}} to 1).  
 
We need 6 branches so set the {{Literal|To}} parameter to '''6''' (keep {{Literal|From}} and {{Literal|Step}} to 1).  
  
http://i209.photobucket.com/albums/bb207/rore4wiki/Synfig/snow_step3.png
+
[[File:Snow Duplicate Tutorial Step3 0.63.06.png|frame|none]]
  
 
Now move to the {{l|Library Panel}}, and select our {{Literal|Index 1}} value. (Unfold the {{Literal|ValueBase Node}} if necessary).
 
Now move to the {{l|Library Panel}}, and select our {{Literal|Index 1}} value. (Unfold the {{Literal|ValueBase Node}} if necessary).
Line 42: Line 44:
 
In order to have 6 rotated branches, we need to link the duplication and the rotation together.  
 
In order to have 6 rotated branches, we need to link the duplication and the rotation together.  
  
Select the Rotate layer, and go back to the Parameters panel. <br/>
+
Select the Rotate layer, and go back to the Parameters panel.
 +
 
 
The Rotate layer has just 2 parameters: {{Literal|Origin}} and {{Literal|Amount}}. The important one here is {{Literal|Amount}}, it tells the angle of the rotation.  
 
The Rotate layer has just 2 parameters: {{Literal|Origin}} and {{Literal|Amount}}. The important one here is {{Literal|Amount}}, it tells the angle of the rotation.  
  
Right click on {{Literal|Amount}} and select {{c|<Convert>|Scale}}. <br/>
+
Right click on {{Literal|Amount}} and select {{c|<Convert>|Scale}}.
 +
 
 
Now Amount is made of 2 subparameters, {{Literal|Link}} (an angle) and {{Literal|Scalar}} (a real), the whole rotation being equal to Link * Scalar.  
 
Now Amount is made of 2 subparameters, {{Literal|Link}} (an angle) and {{Literal|Scalar}} (a real), the whole rotation being equal to Link * Scalar.  
  
Line 52: Line 56:
 
Right click on the {{Literal|Scalar}} parameter and select {{Literal|Connect}}. It will connect the previously selected {{Literal|Index 1}} value (in the Library panel) to the Scalar parameter.
 
Right click on the {{Literal|Scalar}} parameter and select {{Literal|Connect}}. It will connect the previously selected {{Literal|Index 1}} value (in the Library panel) to the Scalar parameter.
  
''How it looks after the connection:''<br/>
+
''How it looks after the connection:''
http://i209.photobucket.com/albums/bb207/rore4wiki/Synfig/snow_step4.png
+
  
 +
[[File:Snow Duplicate Tutorial Step4 0.63.06.png|frame|none]]
  
You should now have a complete snowflake, yay!
 
  
http://i209.photobucket.com/albums/bb207/rore4wiki/Synfig/snow_step5.png
+
You should now have a complete snowflake, yay! (maybe you will need to adjust Rotate Layer's {{l|Origin_Parameter}})
  
 +
[[File:Snow Duplicate Tutorial Step5 0.63.06.png|frame|center]]
  
 
== What happened? ==  
 
== What happened? ==  
We linked the "Scalar" value of the rotation to the duplicate layer: <br/>
+
We linked the "Scalar" value of the rotation to the duplicate layer:
Thanks to the Duplicate, the Scalar parameter was set to values between 1 and 6 (From and To), by steps of 1 - instead of being set to a single value. <br/>
+
 
 +
Thanks to the Duplicate, the Scalar parameter was set to values between 1 and 6 (From and To), by steps of 1 - instead of being set to a single value.
 +
 
 
So we had 5 rotations in addition to the original branche : One of 60° (Scalar * Link = 1 * 60°), another of 120° ( 2 * 60°), another of 180°, etc. And all of these rotations were displayed together.
 
So we had 5 rotations in addition to the original branche : One of 60° (Scalar * Link = 1 * 60°), another of 120° ( 2 * 60°), another of 180°, etc. And all of these rotations were displayed together.
  
You can think of the Duplicate Layer as something allowing you to have a list of values, that you can link to a (real) parameter in the same way you could link a single value to a parameter. <br/>
+
You can think of the Duplicate Layer as something allowing you to have a list of values, that you can link to a (real) parameter in the same way you could link a single value to a parameter.
 +
 
 +
  You can download the project [[File:SnowFlake.sifz]]

Latest revision as of 10:54, 11 February 2016

Languages Language: 

English • français • română


This tutorial explain a simple example of the use of the Duplicate Layer, to create a snowflake.

First branch of the snowflake

The 1st part is very simple : We'll create a single snowflake branch with the Spline Tool (or the Polygon Tool).

Select the "Spline tool", and in the tools options, make sure that only "Create Region" is checked. (If you use the "Polygon tool", check either "Create Polygon Layer" or "Create Region", as you wish).

Draw the branch in the upper middle part of your image. Once it's drawn, select the newly created layer (I will refer to it as the "Branch layer") and make sure that the bottom of the branch is more or less at the same place as the green dot showing the center of the image. You can move your branch by selecting all the points CtrlA and using the Transform Tool

Snow Duplicate Tutorial Step1 0.63.06.png

Adding the Rotate and Duplicate Layers

Snow Duplicate Tutorial Step2 0.63.06.png

To make a whole 6-branches snowflake, we need to make several copies of the branch, and rotate them.

First, we need a Rotation layer. Right click on the image and select "<Layer> → New Layer → Transform → Rotate". You should now have a Rotate Layer on top of the Branch layer.

Then, we'll use the Duplicate Layer. Right click on the image and select "<Layer> → New Layer → Other → Duplicate".

So far, no change is visible on our image, it's normal :).

In the Layers Panel, make sure that the layers are in the following order : Duplicate on top, Rotate in the middle, and the "Branch" layer on the bottom.

Connecting everything together

Select the Duplicate layer and look at the Parameters Panel. There's an "Index" value that is automatically exported. Its name is "Index 1". (It looks like "Index (Index 1)" in the panel).

This value is made of 3 subparameters : "From", "To" and "Step". Those parameters tells how many times an object is duplicated.

We need 6 branches so set the "To" parameter to 6 (keep "From" and "Step" to 1).

Snow Duplicate Tutorial Step3 0.63.06.png

Now move to the Library Panel, and select our "Index 1" value. (Unfold the "ValueBase Node" if necessary).

In order to have 6 rotated branches, we need to link the duplication and the rotation together.

Select the Rotate layer, and go back to the Parameters panel.

The Rotate layer has just 2 parameters: "Origin" and "Amount". The important one here is "Amount", it tells the angle of the rotation.

Right click on "Amount" and select "<Convert> → Scale".

Now Amount is made of 2 subparameters, "Link" (an angle) and "Scalar" (a real), the whole rotation being equal to Link * Scalar.

Set the "Link" subparameter to 60 (that's the angle between the snowflake branches).

Right click on the "Scalar" parameter and select "Connect". It will connect the previously selected "Index 1" value (in the Library panel) to the Scalar parameter.

How it looks after the connection:

Snow Duplicate Tutorial Step4 0.63.06.png


You should now have a complete snowflake, yay! (maybe you will need to adjust Rotate Layer's Origin)

Snow Duplicate Tutorial Step5 0.63.06.png

What happened?

We linked the "Scalar" value of the rotation to the duplicate layer:

Thanks to the Duplicate, the Scalar parameter was set to values between 1 and 6 (From and To), by steps of 1 - instead of being set to a single value.

So we had 5 rotations in addition to the original branche : One of 60° (Scalar * Link = 1 * 60°), another of 120° ( 2 * 60°), another of 180°, etc. And all of these rotations were displayed together.

You can think of the Duplicate Layer as something allowing you to have a list of values, that you can link to a (real) parameter in the same way you could link a single value to a parameter.

 You can download the project File:SnowFlake.sifz


Languages Language: 

English • français • română