Time Loop Layer

From Synfig Studio :: Documentation
Jump to: navigation, search
m (Parameters of Time Loop Layers: intralinks on paramters)
m (Parameters of Time Loop Layers: information about "statics" parameters)
Line 14: Line 14:
 
==Parameters of Time Loop Layers==
 
==Parameters of Time Loop Layers==
  
These parameters, like any other in Synfig can be animated, so that they change over time. This can be confusing, so make sure you aren't in {{L|Animate_Editing_Mode|Animate Edit Mode}} when working with the Time Loop layer, unless you know what you're doing!
+
These parameters, to prevent undesired modification, by default are {{l|Static_Parameters|statics}}.
 +
 
 +
Once they are no more {{l|Static_Parameters|statics}}, like any other parameters in Synfig they can be animated, so that they change over time. This can be confusing, so make sure you aren't in {{L|Animate_Editing_Mode|Animate Edit Mode}} when working with the Time Loop layer, unless you know what you're doing!
  
 
The parameters of the time loop layers are:
 
The parameters of the time loop layers are:

Revision as of 19:45, 21 October 2015

Languages Language: 

English


Layer other timeloop icon.png

About Time Loop Layers

The Time Loop layer can be used to repeat an animation over and over. It loops a section of the layers below and within the same canvas over and over.

See also the Time Loop ValueNode conversion, which can be used to loop the value of a single parameter, rather than an entire layer or group of layers.

Parameters of Time Loop Layers

These parameters, to prevent undesired modification, by default are statics.

Once they are no more statics, like any other parameters in Synfig they can be animated, so that they change over time. This can be confusing, so make sure you aren't in Animate Edit Mode when working with the Time Loop layer, unless you know what you're doing!

The parameters of the time loop layers are:

Name Value Type
Type real icon.png Z Depth 0.000000 real
Type time icon.png Link Time 0f time
Type time icon.png Local Time 0f time
Type time icon.png Duration 1s time
Type bool icon.png Only For Positive Duration
bool
Type bool icon.png Symmetrical
bool

Link Time (time)

Start time of cycled material/child layers.

Local Time (time)

Start time of loop. (this is currently (since 120323 at least) broken and has no effect on time loops, see http://synfig.org/forums/viewtopic.php?f=12&t=3526#p14986 for a discussion)

Duration (time)

Number of seconds or frames that are looped in the child layer.

Only For Positive Duration (bool)

  • If checked and "Duration" is zero or negative, then the time loop layer is effectively disabled, and acts as if it wasn't there.
  • If not checked and the Duration is zero, the Time Loop layer freezes the animation of the children layers at the value of "Link Time".

Symmetrical (bool)

If not checked, and the current time is less than "Local Time", then "Duration" is taken off the resulting time. This is to provide compatibility with version 0.1 of the time loop layer.

How to loop

The Time Loop layer repeatedly loops through the "Duration" seconds of its child layers, from "Link Time" to "Link Time" + "Duration". "Local Time" is used to line up the offset of the time looping. When the Time Loop layer is asked to set its time to "Local Time", it sets the time in its child layers to be "Link Time", ie. the start of the loop.

Breaking loop

To break a loop and continue animating you basically need to do two things; break the loop with a waypoint and copy the animation keyframe to your position in the timeline.

  • Find out which frame in the child layers that corresponds to the frame in the time loop layer where you want to break the loop.

Goto this frame in the child layer and add a keyframe here. Then goto the frame where you want to break the loop and duplicate the keyframe.

  • Set the first time loop "Duration" waypoint to "Constant" and check "Only For Positive Duration". Then at the breaking frame set "Duration" to 0.
  • Continue animating the child layer(s) which are not looped anymore.

Visualized Example

For example, suppose:

  • Link Time is 5s
  • Duration is 3s
  • Local Time' is 4s

And suppose that the Time Loop layer is applied over an existing animation. The "Link Time" and "Duration" specify that the section from 5s to 8s in the children layers will be looped. The "Local Time" specifies that this loop will be at the beginning at 4s. (And so also therefore at 1s, 7s, 10s, etc).

This is how the mapping actually works:

real time child time
(symmetrical = true)
child time
(symmetrical = false)
0 7 4
1 5 2
2 6 3
3 7 4
4 5 5 (local time = 4; link time = 5)
5 6 6
6 7 7
7 5 5 (duration = 3, so loop repeats after 3 seconds)
8 6 6
9 7 7
10 5 5

Specifying a huge number for the Duration parameter effectively turns the Time Loop layer into a Time Shift layer. The Link Time and Local Time parameters controls which time in the children lines up with which time in the Time Loop layer, giving the amount of the timeshift, with both positive and negative differences working as expected.

Contrived Example

Download and examine this example file: Time-loop-demo-0.2.sifz

It's a 10 second animation, and shows 2 circles. The top one moves linearly from the left to the right. Its position is marked by static text digits 0 through 10.

The other circle is an identical copy of the first one, with the same waypoints, but it's inside an Group layer. The parameters are:

  • Link Time: 5s
  • Duration: 1.5s
  • Local Time: 2s
  • Symmetrical: true

So as time=2s, the top circle is at position 2 (local time) and the bottom circle is at position 5 (link time):

Image:Time-loop-demo-0.2-2s-0f.png

The loop is 1.5s long, so the bottom circle is also at position 5 every 1.5 seconds before and after this point in time, for example at t=3.5s and at t=8s:

Image:Time-loop-demo-0.2-3s-12f.png Image:Time-loop-demo-0.2-8s-0f.png

The following two images show the positions at t=0s and t=3s. The loop starts at t=2s, so it's also at the start at t=0.5s. So at t=0s it's half a second before finishing the previous loop. And at t=3s the same is true, but 2 loops later on:

Image:Time-loop-demo-0.2-0s-0f.png Image:Time-loop-demo-0.2-3s-0f.png

There's a rendered copy of this example on YouTube, and it's also available for download: Time-loop-demo-0.2.avi‎.


Languages Language: 

English