Difference between revisions of "Switching Scenes"

From Synfig Studio :: Documentation
Jump to: navigation, search
(Updated Terminology)
m (update cat : data link ----> import art)
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
{{Category|Tutorials}}
 
{{Category|Tutorials}}
 
{{Category|Tutorials Advanced}}
 
{{Category|Tutorials Advanced}}
 +
{{Category|ImportArt}}
 +
{{TOCright}}
 
<!-- Page info end -->
 
<!-- Page info end -->
 +
=Introduction=
 +
{{l|File:SwitchingScenes.gif|left}}Suppose you've made a few different scenes in separate .sif files and want to edit them together.
  
Suppose you've made a few different scenes in separate .sif files and want to edit them together.
 
  
Of course, you could render each .sif file to a separate video file and use some kind of [http://en.wikipedia.org/wiki/Non-linear_editing_system video editing] software to edit it together. But what if we want to use Synfig itself to do the editing?
+
Of course, you could render each .sif file to a separate video file and use some kind of [http://en.wikipedia.org/wiki/Non-linear_editing_system video editing] software to edit it together.
  
 +
 +
But what if we want to use Synfig itself to do the editing?
 +
<br style="clear:both" />
 +
=Take the scenes you need=
 
In this example I'm going to take 3 sifz files made by {{l|User:Zelig|Zelig}} and mix them together:
 
In this example I'm going to take 3 sifz files made by {{l|User:Zelig|Zelig}} and mix them together:
 
* {{l|Media:Sy-n-fig-s1-hi.sifz|Sy-n-fig-s1-hi.sifz}} - a 3 second introduction scene (scene 1)
 
* {{l|Media:Sy-n-fig-s1-hi.sifz|Sy-n-fig-s1-hi.sifz}} - a 3 second introduction scene (scene 1)
Line 14: Line 21:
 
* {{l|Media:Sy-n-fig-s3-boid.sifz|Sy-n-fig-s3-boid.sifz}} - 6 seconds of a different scene that needs cutting into the middle of scene 2
 
* {{l|Media:Sy-n-fig-s3-boid.sifz|Sy-n-fig-s3-boid.sifz}} - 6 seconds of a different scene that needs cutting into the middle of scene 2
  
Make a new document in Synfig and set its time to 47 seconds (3 seconds for scene 1 + 28 seconds for scene 2 + 6 seconds for scene 3 + 5 seconds each for opening and closing titles).
+
=Prepare the project=
 +
First we need a new document in Synfig ({{Shortcut|Ctrl|N}}), and configure his {{l|Canvas_Properties_Dialog|properties}} a bit.
 +
 
 +
Use {{c|<Menu>|<Canvas>|Properties}} ({{Shortcut|F8}}), select the {{Literal|Time tab}} and set the {{Literal|End Time}} to '''47''' seconds ('''3''' seconds for scene 1 + '''28''' seconds for scene 2 + '''6''' seconds for scene 3 + '''5''' seconds each for opening and closing titles).  To set the  {{Literal|End Time}}, you can type '47s' in the field.  Alternatively, you can type the {{literal|Duration}}, eg. '1128f' for 24 frames per second.
 +
 
 +
==Import and prepare your scenes==
 +
Using {{c|<Menu>|<File>|Import}} ({{Shortcut|Ctrl|I}}), import each of the three scenes one at a time. The scenes will be imported as separate layers.
 +
 
 +
From {{l|Layers_Panel}}, double click each imported layer to rename them 'Synfig Hi', 'Synfig Ball' and 'Synfig Boid' as appropriate.
 +
 
 +
Two of the scenes have transparent backgrounds, so create a background layer to go behind them. {{c|<Menu>|<Layer>|<New Layer>|<Geometry>|Solid Colour}}.  Change the {{l|Color Parameter}} to white and move the layer to the bottom of the list in the Layers panel.
 +
 
 +
=Switch by visibility=
 +
Synfig now uses the layer visibility (the {{l|Amount_Parameter}}) to switch between scenes, rather than canvases.  To start with, we want all our imported scenes to be invisible, so the '''Amount''' will be set to '''0'''.
 +
 
 +
As we switch to each scene, we want to set the '''Amount''' to '''1''', but we don't want it to gradually fade from one value to the other. To set this up, change the {{l|New_Layer_Defaults#Default_Interpolation|default interpolation}} type to {{l|Constant}}.  This can be found in the main toolbox window, right at the bottom.  It defaults to {{l|Clamped}}, but we want our edits to happen exactly when we specify them. The Constant interpolation means that when the {{l|Waypoint}} is reached, the value changes immediately.
 +
 
 +
From the layers panel, select all scenes using {{Shortcut|Ctrl|Click}} and from the {{l|Parameters_Panel}} set '''0'''  '''Amount'''  row. Now, only the white background remain visible.
 +
 
 +
==Opening, closing titles==
 +
We don't have any opening or closing titles, so we're going to have to make those ourselves.  Make a new text layer: {{c|<Menu>|<Layer>|<New Layer>|<Other>|Text}} and edit the {{l|Text Parameter}} to say something appropriate for the opening titles, and the Color parameter to something you like.
  
Using Caret>File>Import, import each of the three scenes one at a time.
+
{{l|Group}} the {{l|Text layer}} and rename it 'Titles'. Add a background for the text using {{c|<Menu>|<Layer>|<New Layer>|<Geometry>|Solid Colour}}.  This will probably be the same color as the text, so change the color of either the text or new Solid Colour layer until you're happy with it.  Now get the background layer into the Titles group by dragging it (if it is not already in the group).  Finally, ensure that the background is below the text.
  
Select each of the three scenes in turn in the layer dialog, and export its canvas in the parameters dialog by right-clicking the {{l|Canvas}} Parameter and selecting {{l|Export}} from the context menu. Call the exported canvases "scene1", "scene2", and "scene3".  Now we can delete the three group layers from our document.  We don't need them yet. ''Note: The Export context menu is not available for imported files in recent versions due to a previous bug already fixed. The external files can be referenced using the {{l|Group Layer#Canvas Parameter|canvas parameter}} nomenclature so it doesn't need to be exported at all.''
+
==Lets animate==
 +
Next, go to frame '''0''' by entering '''0f''' in the Current time in the {{l|Category:Canvas_Window|canvas window}}. Turn on {{l|Animate Editing Mode}}.
  
We don't have any opening or closing titles, so we're going to have to make those ourselves.  Make a new text layer:  Caret > Layer > New Layer > Text and edit the Text Parameter to say something appropriate for the opening titles.
+
We want the 'Titles' to show for the first 5 seconds, then switch to the 'Synfig Hi' layer.  
  
Group the Text layer, and export the group layer's canvas parameterCall it 'titles'.
+
Type '5s' in the Current time field, or move the {{l|Time_Cursor}} as appropriate. Check that Animate editing mode is on and the default interpolation is ConstantSelect the Titles layer and change the '''Amount''' to '''0''', then select the 'Synfig Hi' layer and set the '''Amount''' to '''1'''.
  
Turn on {{l|Animate Editing Mode}}, and make a keyframe at frame 0, and set the default interpolation type to "Constant"This can be found in the main 'toolbox' window, right at the bottomIt defaults to TCB, but we want our edits to happen exactly when we specify them rather than taking the risk that TCB waypoints will somehow try to 'smooth' them.
+
If we play the animation from the beginning now (press the |<< button to go to the start of the animation, then press play), we'll see the title frame for 5 seconds, and then it will jump to the 'Synfig Hi' sceneBut the 'Synfig Hi' scene has already ended - they've already done their waveWe need to delay the 'Synfig Hi' scene by 5 seconds, so it starts to play at the same time that it's displayed.  With the time slider at '''5s''', edit 'Synfig Hi' layer's {{l|Time_Offset_Parameter}} to be '''-5s'''.  
  
Looking at the dialog now, we notice that we forgot to put a background behind the title text.  Go to the {{l|Canvas Browser Panel}} Dialog, open up the tree and double-click 'titles' to open the titles sub-canvas in a new window.  There we can modify it.  Add a new Solid Color Layer, make it white, and put it below the Text layer.  Then close the sub-canvas window.
+
Now when we preview the animation, we see the static title frame for 5 seconds, and then the scene 1 plays until 8s !
  
We want the first scene to start displaying at 5s. Move the time slider to 5s, make sure the main workarea is selected, select its only layer, [titles], and edit its Canvas parameter to be the 1st sceneThe menu displays the titles of the scenesScene 1's title is "Sy'n'Fig say hi".
+
Next we need to switch to the Synfig Ball scene. Move the {{l|Time_Cursor}} to '''8s'''. Select the 'Synfig Hi' layer and change the '''Amount''' to '0' to hide itThen select the 'Synfig Ball' layer and set the '''Amount''' to '''1''' to show itAgain we'll need to delay the start of this scene, so set the {{l|Time_Offset_Parameter}} to '''-8s'''.
  
If we play the animation now, we'll see the title frame for 5 seconds, and then it will jump to the 1st scene.  But the first scene has already ended - they've already done their wave.  We need to delay the first scene by 5 seconds, so it only starts to play when it's displayed.  With the time slider at 5s, edit our only layer's "Time Offset' parameter to be -5s.  Now when we preview the animation, we see the static title frame for 5 seconds, and then the scene 1 plays until 8s.
+
==Cut the scene==
 +
Now we want to cut the 'Synfig Boid' scene into the middle of the 'Synfig Ball' scene.  
  
Move the time slider to 8s and edit the Canvas Parameter to select the 2nd sceneAgain we'll need to delay the start of this scene, so set the "Time Offset" to -8s.
+
Playing with the {{l|Time_Cursor}} in the main {{l|WorkArea}}, we see that we want scene 3 to be cut in at around the '''23s''' mark (15 seconds into Synfig Ball, which started at 8s).  Adjust the time cursor to '''23s''' and set the '''Amount''' to '''0''' on the 'Synfig Ball' layerSet the '''Amount''' to '''1''' on the 'Synfig Boid' layer.  Adjust the Time Offset parameter to '''-23s''', so that the Synfig Boid scene starts when we switch to it.
  
Now we want to cut scene 3 into the middle of scene 2.  Playing with the time slider in the main workarea, we see that we want scene 3 to be cut in at around the 23s mark (15 seconds into scene 2, which started at 8s).  Adjust the time slider to 23s and switch the canvas to scene 3Adjust the Time Offset parameter to -23, so that scene 3 starts when we switch to it.
+
Scene 3 lasts for 6 seconds, so move the time cursor to '''29s''' and set the 'Synfig Boid' layer '''Amount''' to '''0'''Switch back to the 'Synfig Ball' layer and set the '''Amount''' to '''1'''.
  
Scene 3 lasts for 6 seconds, so fast-forward to 29s and switch back to scene 2.  We'll need to edit the Time Offset parameter there to make up for the 6 seconds that scene 3 played for.  Previously, scene 2 was delayed by 8 seconds, so now it will be delayed a further 6 seconds, making a total of 14s.  Change the Time Offset parameter to -14.
+
Note that the 'Synfig Ball' layer animation just continued whilst the layer was invisible and the 'Synfig Boid' layer was being animated.  We don't want to lose those 6 seconds, so at the 29th second, we'll move the 'Synfig Ball' layer along by 6 seconds so that it picks up where we left off before the cut.
  
Scene 3 will end at 5+3+28+6 = 42s, so move the time pointer there, and switch back to the titles canvas.  Change the Time Offset to 0.
+
Previously, the Synfig Ball layer was offset by -8 seconds.  We now need a further delay of 6 seconds, making a total of '''14s'''.  Change the 'Synfig Ball' layer Time Offset to '''-14s'''.
  
Open the {{l|Canvas Browser Panel}}, double-click the titles canvas, move the time slider to 42s and edit the titles text to show the closing creditsNote that the titles are in a separate canvas from everything else, and so have their own set of keyframes.  Currently they have no keyframes, so if we edit the title text, it will change for all time.  To prevent this, make a keyframe at frame 0.  Note also that {{l|Animate Editing Mode}} is a per-canvas setting.  It's on in the main workarea, but off in the sub-canvases, so you'll need to enable it here before editing the titles.
+
==Lets display the closing title==
 +
The animation will be complete at 5+3+28+6 = 42s, so move the time cursor there and we can add the end credit sceneSwitch back to the titles canvas (Synfig Ball Amount = 0, Titles Amount = 1).
  
Close the titles sub-canvas and we're done.
+
Select the Text layer within the Titles layer group and update the Text parameter to something appropriate for the closing credits.
  
I ended up with this file:  {{l|Media:Sy-n-fig-mixed.sifz}}
+
=Final and extra notes=
 +
Preview your animation to see how it looks.
  
Note that using the 'Canvas' parameter to switch scenes will always cause an instant switch. If you want to fade from scene to scene, you can use 2 different layers, fading one out while the other fades in. Animate the Group Layer's "Amount" parameter from 1 down to 0 to fade the scene out.
+
I ended up with this file: {{l|Media:BallAnimation.sifz|BallAnimation.sifz}}
  
Note also that we end up with a single huge file which includes copies of the three imported canvases.  If we wanted to end up with a small file which referenced the imported files rather than copying them, then we could group the imported layers and export the canvases from the new group layers. I think that would leave the imported layers as file references. Please try it and update this tutorial with your findings...  Also, if we went that route, we could give each scene its own Time Offset value, and not have to keep messing with the Time Offset in the master canvas.
+
Note : that the use of the Constant interpolation means that layer visibility is switched instantly.  If you want to fade from scene to scene, you will need to add some extra waypoints at the start or end of the fade and change the interpolation to something other than Constant. Take a look to {{l|Doc:How_Do_I#Show_or_hide_a_layer.2C_or_fade_the_effect_of_a_blur.3F|How Do I : Show or hide a layer, or fade the effect of a blur?}} for more informations.

Latest revision as of 13:57, 31 March 2016

Languages Language: 

English • español • română



Introduction

SwitchingScenes.gif
Suppose you've made a few different scenes in separate .sif files and want to edit them together.


Of course, you could render each .sif file to a separate video file and use some kind of video editing software to edit it together.


But what if we want to use Synfig itself to do the editing?

Take the scenes you need

In this example I'm going to take 3 sifz files made by Zelig and mix them together:

Prepare the project

First we need a new document in Synfig (CtrlN), and configure his properties a bit.

Use "<Menu> → <Canvas> → Properties" (F8), select the "Time tab" and set the "End Time" to 47 seconds (3 seconds for scene 1 + 28 seconds for scene 2 + 6 seconds for scene 3 + 5 seconds each for opening and closing titles). To set the "End Time", you can type '47s' in the field. Alternatively, you can type the "Duration", eg. '1128f' for 24 frames per second.

Import and prepare your scenes

Using "<Menu> → <File> → Import" (CtrlI), import each of the three scenes one at a time. The scenes will be imported as separate layers.

From Layers Panel, double click each imported layer to rename them 'Synfig Hi', 'Synfig Ball' and 'Synfig Boid' as appropriate.

Two of the scenes have transparent backgrounds, so create a background layer to go behind them. "<Menu> → <Layer> → <New Layer> → <Geometry> → Solid Colour". Change the Color to white and move the layer to the bottom of the list in the Layers panel.

Switch by visibility

Synfig now uses the layer visibility (the Amount) to switch between scenes, rather than canvases. To start with, we want all our imported scenes to be invisible, so the Amount will be set to 0.

As we switch to each scene, we want to set the Amount to 1, but we don't want it to gradually fade from one value to the other. To set this up, change the default interpolation type to Constant. This can be found in the main toolbox window, right at the bottom. It defaults to Clamped, but we want our edits to happen exactly when we specify them. The Constant interpolation means that when the Waypoint is reached, the value changes immediately.

From the layers panel, select all scenes using CtrlClick and from the Parameters_Panel set 0 Amount row. Now, only the white background remain visible.

Opening, closing titles

We don't have any opening or closing titles, so we're going to have to make those ourselves. Make a new text layer: "<Menu> → <Layer> → <New Layer> → <Other> → Text" and edit the Text Parameter to say something appropriate for the opening titles, and the Color parameter to something you like.

Group the Text layer and rename it 'Titles'. Add a background for the text using "<Menu> → <Layer> → <New Layer> → <Geometry> → Solid Colour". This will probably be the same color as the text, so change the color of either the text or new Solid Colour layer until you're happy with it. Now get the background layer into the Titles group by dragging it (if it is not already in the group). Finally, ensure that the background is below the text.

Lets animate

Next, go to frame 0 by entering 0f in the Current time in the canvas window. Turn on Animate Editing Mode.

We want the 'Titles' to show for the first 5 seconds, then switch to the 'Synfig Hi' layer.

Type '5s' in the Current time field, or move the Time Cursor as appropriate. Check that Animate editing mode is on and the default interpolation is Constant. Select the Titles layer and change the Amount to 0, then select the 'Synfig Hi' layer and set the Amount to 1.

If we play the animation from the beginning now (press the |<< button to go to the start of the animation, then press play), we'll see the title frame for 5 seconds, and then it will jump to the 'Synfig Hi' scene. But the 'Synfig Hi' scene has already ended - they've already done their wave. We need to delay the 'Synfig Hi' scene by 5 seconds, so it starts to play at the same time that it's displayed. With the time slider at 5s, edit 'Synfig Hi' layer's Time Offset Parameter to be -5s.

Now when we preview the animation, we see the static title frame for 5 seconds, and then the scene 1 plays until 8s !

Next we need to switch to the Synfig Ball scene. Move the Time Cursor to 8s. Select the 'Synfig Hi' layer and change the Amount to '0' to hide it. Then select the 'Synfig Ball' layer and set the Amount to 1 to show it. Again we'll need to delay the start of this scene, so set the Time Offset Parameter to -8s.

Cut the scene

Now we want to cut the 'Synfig Boid' scene into the middle of the 'Synfig Ball' scene.

Playing with the Time Cursor in the main WorkArea, we see that we want scene 3 to be cut in at around the 23s mark (15 seconds into Synfig Ball, which started at 8s). Adjust the time cursor to 23s and set the Amount to 0 on the 'Synfig Ball' layer. Set the Amount to 1 on the 'Synfig Boid' layer. Adjust the Time Offset parameter to -23s, so that the Synfig Boid scene starts when we switch to it.

Scene 3 lasts for 6 seconds, so move the time cursor to 29s and set the 'Synfig Boid' layer Amount to 0. Switch back to the 'Synfig Ball' layer and set the Amount to 1.

Note that the 'Synfig Ball' layer animation just continued whilst the layer was invisible and the 'Synfig Boid' layer was being animated. We don't want to lose those 6 seconds, so at the 29th second, we'll move the 'Synfig Ball' layer along by 6 seconds so that it picks up where we left off before the cut.

Previously, the Synfig Ball layer was offset by -8 seconds. We now need a further delay of 6 seconds, making a total of 14s. Change the 'Synfig Ball' layer Time Offset to -14s.

Lets display the closing title

The animation will be complete at 5+3+28+6 = 42s, so move the time cursor there and we can add the end credit scene. Switch back to the titles canvas (Synfig Ball Amount = 0, Titles Amount = 1).

Select the Text layer within the Titles layer group and update the Text parameter to something appropriate for the closing credits.

Final and extra notes

Preview your animation to see how it looks.

I ended up with this file: BallAnimation.sifz

Note : that the use of the Constant interpolation means that layer visibility is switched instantly. If you want to fade from scene to scene, you will need to add some extra waypoints at the start or end of the fade and change the interpolation to something other than Constant. Take a look to How Do I : Show or hide a layer, or fade the effect of a blur? for more informations.


Languages Language: 

English • español • română