Difference between revisions of "Time Loop Layer"
m |
m (add 2 more parameters for v0.1 compatibility) |
||
Line 5: | Line 5: | ||
[Note: ''the Time Loop layer used to have parameters 'start time' and 'end time'. Documentation for that old version of the layer [[Time Loop Layer (v0.1)|is available]]''. | [Note: ''the Time Loop layer used to have parameters 'start time' and 'end time'. Documentation for that old version of the layer [[Time Loop Layer (v0.1)|is available]]''. | ||
− | It has | + | It has 6 parameters, as follows: |
* real "Z Depth" | * real "Z Depth" | ||
* time "Link Time" | * time "Link Time" | ||
* time "Local Time" | * time "Local Time" | ||
* time "Duration" | * time "Duration" | ||
+ | * bool "Only For Positive Duration" | ||
+ | * bool "Symmetrical" | ||
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 Animate Edit Mode when working with the Time Loop layer, unless you know what you're doing! | 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 Animate Edit Mode when working with the Time Loop layer, unless you know what you're doing! | ||
+ | |||
+ | If 'Only For Positive Duration' is checked, and 'Duration' is zero or negative, then the time loop layer is effectively disabled, and acts as if it wasn't there. | ||
When the Duration is zero, the Time Loop layer freezes the animation of the children layers at the value of "Link Time". | When the Duration is zero, the Time Loop layer freezes the animation of the children layers at the value of "Link Time". | ||
Otherwise, 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. | Otherwise, 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. | ||
+ | |||
+ | If 'Symmetrical' isn't checked, and the current time is less than 'local time', then 'duration' is taken off the resulting time. This is to provide compatibility with [[Time Loop Layer (v0.1)|version 0.1]] of the time loop layer. | ||
For example, suppose: | For example, suppose: | ||
Line 27: | Line 33: | ||
{| border="1" cellspacing="0" | {| border="1" cellspacing="0" | ||
− | |'''real time'''||'''child time''' | + | |'''real time'''||'''child time<br/>(symmetrical = true)'''||'''child time<br/>(symmetrical = false)''' |
|- | |- | ||
− | | 0 || 7 | + | | 0 || 7 || 4 |
|- | |- | ||
− | | 1 || 5 | + | | 1 || 5 || 2 |
|- | |- | ||
− | | 2 || 6 | + | | 2 || 6 || 3 |
|- | |- | ||
− | | 3 || 7 | + | | 3 || 7 || 4 |
|- | |- | ||
− | | 4 || 5 (local time = 4; link time = 5) | + | | 4 || 5 || 5 (local time = 4; link time = 5) |
|- | |- | ||
− | | 5 || 6 | + | | 5 || 6 || 6 |
|- | |- | ||
− | | 6 || 7 | + | | 6 || 7 || 7 |
|- | |- | ||
− | | 7 || 5 (duration = 3, so loop repeats after 3 seconds) | + | | 7 || 5 || 5 (duration = 3, so loop repeats after 3 seconds) |
|- | |- | ||
− | | 8 || 6 | + | | 8 || 6 || 6 |
|- | |- | ||
− | | 9 || 7 | + | | 9 || 7 || 7 |
|- | |- | ||
− | | 10 || 5 | + | | 10 || 5 || 5 |
|} | |} | ||
Line 64: | Line 70: | ||
* Duration: 1.5s | * Duration: 1.5s | ||
* Local Time: 2s | * 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): | So as time=2s, the top circle is at position 2 (local time) and the bottom circle is at position 5 (link time): |
Revision as of 00:33, 25 February 2008
The Time Loop layer can be used to repeat an animation over and over. It loops a section of the layers under it 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.
[Note: the Time Loop layer used to have parameters 'start time' and 'end time'. Documentation for that old version of the layer is available.
It has 6 parameters, as follows:
- real "Z Depth"
- time "Link Time"
- time "Local Time"
- time "Duration"
- bool "Only For Positive Duration"
- bool "Symmetrical"
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 Animate Edit Mode when working with the Time Loop layer, unless you know what you're doing!
If 'Only For Positive Duration' is checked, and 'Duration' is zero or negative, then the time loop layer is effectively disabled, and acts as if it wasn't there.
When the Duration is zero, the Time Loop layer freezes the animation of the children layers at the value of "Link Time".
Otherwise, 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.
If 'Symmetrical' isn't 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.
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 encapsulation 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):
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:
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:
There's a rendered copy of this example on YouTube, and it's also available for download: Time-loop-demo-0.2.avi.
Language: |
English |