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.
Buttons:
- AVATAR : when creating couple animations, switches between avatars A and B.
- SMOOTH : removes a red ball and smooths the values between the left and right red balls.
- ZERO : sets a neutral rotation 0,0,0
- UNDO : restore previous rotation
- COPY : copy rotations
- PASTE : paste the copied rotations
- PLAY : play the animation on the avatar
- PRIORITY : 0 (low) to 7 (high) - use 4 for furniture.
- FPS : speed in frames per second.
- LOOP : repeats the animation between 1st-frame and last-frame.
- INVERT HEELS :
By default, the height of an avatar in heels is increased if she's walking, and remains unchanged if she's sitting.
By checking this option, the opposite is done : the height is increased for a seated avatar, but not if she's walking.
For the vast majority of animations, you should NOT check this option, as it is only useful in a few rare cases, ex: crawl on the floor.
Always test your animation with and without heels.
- Apply : save animation to inventory.
- OK : save animation to inventory and closes dialog.
- Cancel : close dialog without saving.
- To display all bones, right-click on "Expand Bones".
- To hide all unused bones, right-click on "Shrink Bones".
- To insert frames, right-click on "Insert Frames".
- To remove frames, right-click on "Delete Frames".
To add an animation in furniture :
- edit the furniture object and go in the SCRIPTs tab.
- Drag/drop the animation from the inventory into the object's scripts tab.
- Write a little script to make it work, for example :
// 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);
else
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 an animation with an extern program, for example QAvimator,
and then import it in your inventory.