Difference between revisions of "BVH Frame Rate"

From Second Life Wiki
Jump to navigation Jump to search
(Remove a lot of misinformation from this page.)
 
(6 intermediate revisions by one other user not shown)
Line 3: Line 3:
}}
}}


BVH animations for Second Life can have any frame rate you desire.  It's important to understand that the FPS (frames per second) of a BVH file only indicates how often a motion is sampled, not the number of images that will be shown when they are played.
{{KBnote|Animations in Second Life do not have a framerate internally, as motions are interpolated between timestamped keyframes on each joint, meaning the framerate is arbitrary.}}
{{KBwarning|This page contains a lot of incorrect information; and should not be used for definitive reference. A lot of misinformation has been removed, however some may remain.}}


The advantage of using a low frame rate is smaller animation files, which means they transfer to other viewers fasterYou need not worry that the animation will appear choppyThe viewer will smoothly interpolate between the keyframes on computers with a display FPS higher than the FPS of your animation.  That said, 30 second animations at 45 FPS are smaller than most images.
Theoretically, BVH animations for use in Second Life can have a frame rate between 1 and 1092 FPS (frames per second).  Internally, the time that a key frame is displayed is stored as a unsigned short (a 16-bit integer), which has 65536 unique values (including 0)Animations can be up to 60 seconds longFor each key frame to have a unique value for the time it's displayed:<br>
FPS = 65536/60


The advantage of using a high frame rate is more detail can be recorded.  While Second Life lossily compresses animations, the motions dropped are so subtle as to be imperceptible.  You should feel free to use 45 FPS for all animations.
It's important to understand that the FPS of a BVH animation only indicates how often the motion is sampled, not the number of images that will be shown when they are played.
 
The advantage of using a low frame rate is smaller animation files, which transfer to viewers faster.  You need not worry that the animation will appear choppy.  The viewer will smoothly interpolate between the key frames on computers with a display FPS higher than the FPS of your animation.  That said, 60 second animations at 45 FPS are smaller than most textures.
 
The advantage of using a high frame rate is more detail can be recorded.  While Second Life lossily compresses animations, the motions dropped are so subtle as to be imperceptible.


The following is a table of frame rates with desirable qualities.
The following is a table of frame rates with desirable qualities.
Line 13: Line 19:
{|{{prettytable}}
{|{{prettytable}}
|-{{Hl2}}
|-{{Hl2}}
!Frame Rate
! Frame Rate
!Factors
! Factors
!Factor Of
! Factor Of
|-
| 5
| prime
| 5 10 45 60 360
|-
| 6
| 2 3
| 60 360
|-
| 8
| 2 4
| 360
|-
| 9
| 3
| 45 360
|-
| 10
| 2 5
| 10 60 360
|-
| 12
| 2 3 4 6
| 60 360
|-
| 15
| 3 5
| 45 60 360
|-
| 18
| 2 3 6 9
| 360
|-
|-
|12
| 20
|2 3 4 6
| 2 4 5 10
|60
| 60 360
|-
|-
|15
| 24
|3 5
| 2 3 4 6 8 12
|30 45 60
| 360
|-
|-
|20
| 30
|2 4 5 10
| 2 3 5 6 10 15
|60
| 60 360
|-
|-
|30
| 36
|2 3 5 6 10 15
| 2 3 4 6 9 12 18
|30 60
| 360
|-
|-
|45
| 40
|3 5 9 15
| 2 4 5 8 10 20
|45
| 360
|-
| 45
| 3 5 9 15
| 45 360
|}
|}


A frame rate with many factors is desirable.  It is also desirable that the frame rate be a factor of numbers you often need to divide.  In our case, those numbers would be 30 which is the length limit in seconds on animations for Second Life, 45 which is the maximum useful frame rate, and 60 because there are 60 seconds in a minute and 60 minutes in a hour.  This makes it easy to place keyframes such that the time is evenly divided, which is something animators often need to do.
A frame rate with many factors is desirable.  It is also desirable that the frame rate be a factor of numbers you often need to divide.
 
Numbers Second Life animators might want to divide:
*  5 - pelvis offset limit in meters
* 10 - pelvis offset axis length in meters
*  60 - animation length limit in seconds; seconds in a minute; minutes in a hour
* 360 - degrees in a circle


You might find it easiest to place your keyframes at 15 FPS, then change to 45 FPS before exporting to maximize the detail recorded.  Selecting exactly the frame you want is easier at low frame rates.  It should export perfectly, because each frame at 15 FPS falls exactly on a frame boundary at 45 FPS.
This makes it easy to place key frames such that the time and space is evenly divided, which is something animators often need to do.


There's no point in using a frame rate above 45 FPS.  Nothing else in the simulator will be moving faster than 45 FPS.
You might find it easiest to place your key frames at 15 FPS.


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

Latest revision as of 07:32, 12 February 2023

KBnote.png Note: Animations in Second Life do not have a framerate internally, as motions are interpolated between timestamped keyframes on each joint, meaning the framerate is arbitrary.
KBwarning.png Warning: This page contains a lot of incorrect information; and should not be used for definitive reference. A lot of misinformation has been removed, however some may remain.

Theoretically, BVH animations for use in Second Life can have a frame rate between 1 and 1092 FPS (frames per second). Internally, the time that a key frame is displayed is stored as a unsigned short (a 16-bit integer), which has 65536 unique values (including 0). Animations can be up to 60 seconds long. For each key frame to have a unique value for the time it's displayed:
FPS = 65536/60

It's important to understand that the FPS of a BVH animation only indicates how often the motion is sampled, not the number of images that will be shown when they are played.

The advantage of using a low frame rate is smaller animation files, which transfer to viewers faster. You need not worry that the animation will appear choppy. The viewer will smoothly interpolate between the key frames on computers with a display FPS higher than the FPS of your animation. That said, 60 second animations at 45 FPS are smaller than most textures.

The advantage of using a high frame rate is more detail can be recorded. While Second Life lossily compresses animations, the motions dropped are so subtle as to be imperceptible.

The following is a table of frame rates with desirable qualities.

Frame Rate Factors Factor Of
5 prime 5 10 45 60 360
6 2 3 60 360
8 2 4 360
9 3 45 360
10 2 5 10 60 360
12 2 3 4 6 60 360
15 3 5 45 60 360
18 2 3 6 9 360
20 2 4 5 10 60 360
24 2 3 4 6 8 12 360
30 2 3 5 6 10 15 60 360
36 2 3 4 6 9 12 18 360
40 2 4 5 8 10 20 360
45 3 5 9 15 45 360

A frame rate with many factors is desirable. It is also desirable that the frame rate be a factor of numbers you often need to divide.

Numbers Second Life animators might want to divide:

  • 5 - pelvis offset limit in meters
  • 10 - pelvis offset axis length in meters
  • 60 - animation length limit in seconds; seconds in a minute; minutes in a hour
  • 360 - degrees in a circle

This makes it easy to place key frames such that the time and space is evenly divided, which is something animators often need to do.

You might find it easiest to place your key frames at 15 FPS.