Difference between revisions of "Animation Upload Loop Controls"

From Second Life Wiki
Jump to navigation Jump to search
m (→‎Known Issues: Replaced hard-coded JIRA links by template (may switch to github automatically); added link to L$; Beta Grid is now known as Preview Grid)
 
(16 intermediate revisions by one other user not shown)
Line 4: Line 4:
}}
}}


The loop controls are a regular source of confusion.  They work with percentages, rather than frame numbers, unlike every other animation program.
Beginning animators often don't understand what happens to frames before Loop In and after Loop Out.  They may not know how to make seamlessly looping animations.  The loop controls are also a common source of befuddlement.  They work with percentages, rather than frame numbers, unlike every other animation program.


Many people also fail to understand what happens to frames before Loop In, and after Loop Out.
This article attempts to clear up the confusion.


== Working with Percentages ==
== Before Loop In ==
When calculating the percent you must type in to indicate the frame number you desire, beware that the loop controls do not consider the first frame, because it is not displayedWhile this behavior would probably be expected, it ''is'' hard to keep in mindTo calculate the percentage, subtract 1 from the real frame number first.
Frames before Loop In, if any, will be played only when the animation starts.  You could think of this as the intro of the animation.
 
== During the Loop ==
Frames within the loop work like you would probably expect.  When playback reaches the Loop Out frame it jumps back to the Loop In frame and continues.  To make the loop seamless the Loop In and Loop Out frames need to be identicalThere is no interpolation or delay during this jump, which is necessary to avoid a noticeable pauseWhen the animation is stopped playback will stop jumping to the Loop In frame when it reaches the Loop Out frame.
 
If playback is stopped in the middle of the loop, playing will continue.  It just stops treating the Loop Out frame specially.


For example, in a BVH file with 7 frames, the animation is really only 6 frames longIf we wanted the loop to start on frame 4 of the file, and end on frame 5 of the file:
== After Loop Out ==
When the animation is stopped the frames after Loop Out, if any, will be playedYou could think of this as the outro of the animation.


Adjust Loop In Frame Value:
== Working with Percentages ==
frame 4 - 1 = frame 3
The percentages for Loop In and Loop Out indicate animation frame numbers, not BVH file frame numbers.


Calculate Loop In Percentage:
For example, in a animation with 7 frames, if we wanted the loop to start on frame 3 of the animation, and end on frame 5 of the animation:
frame 3/6 animation frames = 50.000%


Adjust Loop Out Frame Value:
'''Loop In Percentage:'''<br>
frame 5 - 1 = frame 4
frame 3/7 animation frames = 42.857%


Calculate Loop Out Percentage:
'''Loop Out Percentage:'''<br>
frame 4/6 animation frames = 66.666%
frame 5/7 animation frames = 71.429%


If this strikes anyone as unnecessarily complex and error-prone, that feeling is normal.
If this strikes anyone as unnecessarily complex and error-prone, that feeling is normal.


== A Diagram of the Example ==
== A Diagram of the Example ==
 
{| {{prettytable}}
{|{{prettytable}}
! BVH File Frame
!BVH File Frame
! Animation Frame
!Animation Frame
|-
| 1
| Removed (Reference Frame)
|-
|-
|1
| 2
|Not Displayed (Reference Frame)
| 1 (Intro Frame 1)
|-
|-
|2
| 3
|1 (Intro Frame 1)
| 2 (Intro Frame 2)
|-
|-
|3
| 4
|2 (Intro Frame 2)
| 3 (Loop Frame 1; Loop In)
|-
|-
|4
| 5
|3 (Loop Frame 1)
| 4 (Loop Frame 2)
|-
|-
|5
| 6
|4 (Loop Frame 2)
| 5 (Loop Frame 3; Loop Out)
|-
|-
|6
| 7
|5 (Outro Frame 1)
| 6 (Outro Frame 1)
|-
|-
|7
| 8
|6 (Outro Frame 2)
| 7 (Outro Frame 2)
|}
|}


== Before Loop In ==
== Known Issues ==
Frames before Loop In, if any, will be played only when the animation startsYou could think of this as the intro of the animation.
There are some bugs in the BVH importer.  One of them causes the first frame of a animation to be triplicated (see {{JIRA|SH-2550}}).  This causes a noticeable pause in animations that are looped from start to finish.  Many recommended adjusting Loop In to account for the reference frame.  However, the internal format for animations does not contain the reference frame, and a Loop In of 0% actually starts at 0 seconds into the animation.  Adjusting Loop In this way did reduce the visibility of the pause, but did not eliminate it, because it only skipped 1 of the extra frames.


== During the Loop ==
A bug causes frames after Loop Out to not be played in the animation upload preview windowHowever, they still play correctly in-world (see {{JIRA|VWR-8301}}).
Frames within the loop work like you would probably expect.  When playback reaches the Loop Out frame it jumps back to the Loop In frame and continuesWhen the animation is stopped playback will stop jumping to the Loop In frame when it reaches the Loop Out frame.
:You can avoid wasting [[Linden Dollar]]s due to this bug by testing all your animations on the [[Preview Grid]].
 
If playback is stopped in the middle of the loop, playing will continue.  It just stops treating the Loop Out frame specially.
 
== After Loop Out ==
When a animation has been stopped the frames after Loop Out, if any, will be played.  You could think of this as the outro of the animation.


==See also==
== See Also ==
*[[Animation Reference Frame]]
*[[BVH Reference Frame]]


[[Category:LSL_Animation]]
[[Category:LSL_Animation]]

Latest revision as of 09:14, 28 September 2024

Beginning animators often don't understand what happens to frames before Loop In and after Loop Out. They may not know how to make seamlessly looping animations. The loop controls are also a common source of befuddlement. They work with percentages, rather than frame numbers, unlike every other animation program.

This article attempts to clear up the confusion.

Before Loop In

Frames before Loop In, if any, will be played only when the animation starts. You could think of this as the intro of the animation.

During the Loop

Frames within the loop work like you would probably expect. When playback reaches the Loop Out frame it jumps back to the Loop In frame and continues. To make the loop seamless the Loop In and Loop Out frames need to be identical. There is no interpolation or delay during this jump, which is necessary to avoid a noticeable pause. When the animation is stopped playback will stop jumping to the Loop In frame when it reaches the Loop Out frame.

If playback is stopped in the middle of the loop, playing will continue. It just stops treating the Loop Out frame specially.

After Loop Out

When the animation is stopped the frames after Loop Out, if any, will be played. You could think of this as the outro of the animation.

Working with Percentages

The percentages for Loop In and Loop Out indicate animation frame numbers, not BVH file frame numbers.

For example, in a animation with 7 frames, if we wanted the loop to start on frame 3 of the animation, and end on frame 5 of the animation:

Loop In Percentage:
frame 3/7 animation frames = 42.857%

Loop Out Percentage:
frame 5/7 animation frames = 71.429%

If this strikes anyone as unnecessarily complex and error-prone, that feeling is normal.

A Diagram of the Example

BVH File Frame Animation Frame
1 Removed (Reference Frame)
2 1 (Intro Frame 1)
3 2 (Intro Frame 2)
4 3 (Loop Frame 1; Loop In)
5 4 (Loop Frame 2)
6 5 (Loop Frame 3; Loop Out)
7 6 (Outro Frame 1)
8 7 (Outro Frame 2)

Known Issues

There are some bugs in the BVH importer. One of them causes the first frame of a animation to be triplicated (see SH-2550). This causes a noticeable pause in animations that are looped from start to finish. Many recommended adjusting Loop In to account for the reference frame. However, the internal format for animations does not contain the reference frame, and a Loop In of 0% actually starts at 0 seconds into the animation. Adjusting Loop In this way did reduce the visibility of the pause, but did not eliminate it, because it only skipped 1 of the extra frames.

A bug causes frames after Loop Out to not be played in the animation upload preview window. However, they still play correctly in-world (see VWR-8301).

You can avoid wasting Linden Dollars due to this bug by testing all your animations on the Preview Grid.

See Also