Switching Scenes

From Synfig Studio :: Documentation
Revision as of 14:53, 17 March 2016 by Spuggiehawk (Talk | contribs) (Rewrite to describe the 1.1.7 implementation of this feature. Most significantly, "canvases" aren't used for this now.)

Jump to: navigation, search
Languages Language: 

English • español • română


Updated to describe the process for Synfig Studio 1.1.7.

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?

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

First we need a new document in Synfig. Use Caret>Canvas>Properties, select the Time tab and set the End Time 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 last frame number, eg. '1128f' for 24 frames per second.

Using Caret>File>Import, import each of the three scenes one at a time. Double click each imported layer to rename them 'Synfig Hi', 'Synfig Ball' and 'Synfig Boid' as appropriate.

The scenes will be imported as separate layers.

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

Synfig now uses the layer visibility (the 'Amount' property) 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 option means that when the keyframe is reached, the value changes immediately.

Next, go to frame 0 by entering '0f' in the Current time field at the bottom left of the main toolbox window. Turn on Animate Editing mode. Select the first layer in the Layers panel, then in the Properties panel change the Amount to 0. Then set the Amount to 0 for the other two layers.

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 > Other > Text and edit the Text Parameter to say something appropriate for the opening titles.

Group the Text layer and rename it 'Titles'. Add a background for the text using Caret > Layer > New Layer > Geometry > Solid Colour. This will probably be the same colour as the text, so change the colour 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.

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 timeline slider 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 selec 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 slider 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" to -8s.

Now we want to cut the Synfig Boid scene into the middle of the Synfig Ball scene. 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 Synfig Ball, which started at 8s). Adjust the time slider 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 timeline 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 29 second keyframe, 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.

The animation will be complete at 5+3+28+6 = 42s, so move the time pointer 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 to something appropriate for the closing credits.

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 keyframes at the start or end of the fade and change the interpolation to something other than Constant.


Languages Language: 

English • español • română