Reference: Avatars

Avatar Basics

  

 

Avatars are 3D models that can change their shape with animations.  Often, people use avatars to simulate humans who can perform animations such as walking, falling down, or twiddling their thumbs.  Vizard comes with several avatars which have a number of animations.  It's also possible to create your own avatars with animations for use in Vizard by modeling programs and by a Motion Capture system.

 

NOTE: For more information on using mo-cap animations, check out our next generation real-time virtual interaction -- Vizard Live Characters  -- a full-body motion capture with powerful integration with the Vizard VR toolkit.

 

 

To use an avatar in Vizard it must be exported from a modeling program in the Cal3D (Character Animation Library) format.  A Cal3D avatar has four parts:

 

Viewing avatar info

In the Resources window, you can expand individual avatars and use the "tree" view to explore avatar properties.

 

 

 

Built-in Animations

An avatar's built-in animations are coded into the avatar file and are used to trigger avatar limb movements created in modeling programs.  Built-in animations can be used to make an avatar walk, stand idly, sit down, or any movement created in character animation software.  An avatar's animations are listed in the resources window.  When changing animations Cal3D has the ability to blend limb movements so the avatar does not instantly jump into a new pose.  

 

If you want an avatar to repeat an animation over and over, set its state.  You access animations by their index, or the number next to their name in the resources view of the avatar.  

 

dude = viz.add('vcc_male.cfg')
dude.state(1) #looping idle animation

 

To run an animation once, you execute the animation.  

 

dude = viz.add('vcc_male.cfg')
dude.execute( 5 ) #do dance animation

Animating Avatars with Bones

You can modify the movement of avatar limbs within Vizard script by manipulating the avatar's bones.  To move a bone, get a handle to the bone, lock the bone and rotate the bone the desired amount.  

 

import viz

viz.go()

viz.MainView.setPosition(1,1.7,-3)

male = viz.add('vcc_male.cfg')
armBone = male.getBone('Bip01 L UpperArm')
armBone.lock()
armBone.setEuler(90, 0, 0)

Example Scripts

Vizard directory: /examples/avatar

Files: linkbones.py, motions.py

See also

In this section:

Avatar modeling and cal3d

Built-in avatars

Built-in animation

Actions that animate

Bones

Avatar command table

Other sections:

Tutorial: Animating Avatar bones -- Tutorial for performing actions on objects.

Tutorial: Custom avatar heads -- Tutorial for creating your own avatar head.

Tutorial: Animating Avatars -- Tutorial for performing actions on avatars.

3D Model transform basics

Action basics

Event Reference

Example scripts:

Motions

Bones