How to create avatar animations ?

To create a new animation, open your inventory, click right and choose the menu New > BVH
That creates a new MyBVH.

To edit an animation, open your inventory, click right on a BVH and choose the menu Edit.


To add an animation in furniture :

// Example 1 : dancing ball

const string ANIMATION_NAME = "dancing";

event touch()
  key k = touched_avatar();

  if (is_animation_active (ANIMATION_NAME, k))
    stop_animation (ANIMATION_NAME, k);
    start_animation (ANIMATION_NAME, k);

// Example 2 : sit on a chair

event touch()
  key k = touched_avatar();

  if (is_sitting (k))
    unsit (k);
  else if (sit (mesh_nr  => 1,
                position => {0.0, 0.0, 1.0},
                rotation => {0.0, 0.0, 0.0},
                avatar   => k))
    start_animation ("sit", k);

Alternatively, you can create the animation with the extern program QAvimator :
  1. Install QAvimator-Beta_0. (version from 2018)
    (or check out the developer's website if there is a newer version)

  2. Create your animation

    Like a cartoon, an animation is made up of several positions/rotations of your avatar that are linked together creating the movement of your avatar.

    First choose a moment on the timeline by pulling the bottom square button on the line.
    The first position is ignored by the software, you have to start at the second position.

    Then click on a joint of the avatar (the green balls)

    Modify the X, Y and Z rotations to make it move.

    The joints that you do not modify remain unchanged, which allows you to combine several animations (e.g. making an avatar drink while walking).

    To move two joints symmetrically, click on the first joint, then hold down the shift key and double-click on the other joint.

    To move an entire leg, double-click on the leg.

    Frame is to be changed when you make an animation with less than 30 positions.
    If you change only 10 positions out of the 30 available, reduce the number to 10 otherwise the last one will be repeated until the 30th.
    A static pose (that does not move) will have 2 positions, the first one you must not touch and the second one of your pose.

    FPS is the speed of the animation in positions per second.

    Loop In and Loop Out are used to create an introduction and an end to an animation that repeats itself in a loop. For example, if you change LoopIn to 5 and LoopOut to 25, your animation will first go to Play positions 1 to 4 once, then repeat positions 5 to 25 in a loop, and just before stopping will play once the 26 to 30 positions.

    You can test all your animation by clicking the big BLUE button, click again to stop.
    When your animation is finished, save it in .AVM format in a folder on your PC (menu File / Save).

    Open your inventory and click on the Import button to load the BVH.