New Avatar Workflow Tips for Vizard 6

December 12, 2018

Sado Rabaudi

In earlier versions of Vizard, Cal3D exports out of 3ds Max were the only option for a character workflow. As of version 6, Vizard includes the ability to use any FBX avatar. These can come from a variety of sources. In this case, we'll be using a .FBX avatar exported from a program called “Character Creator”.

Importing and Preview Lighting
First, import your avatar into Inspector. This can be done by using Open With... and selecting Vizard 6 Inspector from the list, or by running Vizard 6 Inspector and dragging the avatar's FBX file into the scene.

Make sure to toggle “Effects” on. This is necessary to show shader effects. Disabling the option shows the avatar in legacy mode.

If the avatar looks flat, you can add a temporary light from your current view direction by pressing Ctrl+L on the keyboard. This preview light is not stored within your scene.

It's also possible to add permanent lights within Inspector, but in most cases you'll want to remove them before using the avatar so they don't have a light following them around. To add a light in Inspector, go to Create > Light and choose which light type you want from Directional, Spot, or Point. You can further adjust the light in the Properties panel on the right. The same method can be used to add lights to an environment model, and they can also be added through code when necessary. For more on adding lights in Vizard, see the official documentation.

Overlapping transparent objects can often have draw order artifacts. If the hair looks odd at certain angles, toggle on “Alpha to Coverage” and toggle off “Blend” and “Cull Face” for pieces of the model. Changes apply to all faces sharing the same material. If those options are not showing you can choose them by clicking on “Modes” and using the dropdown menu.

Next you will need to check the size of your avatar. Vizard uses meters. A good general size is to have the ‘Y” value be around 1.8 meters.

Model Scale
Use the “Scale” tool to scale your avatar, making sure that the topmost node is selected in your scene graph. This should be the one that contains the avatar’s name.

Any animations that are included with your avatar will be shown in the bottom left panel under “Animations” . You can also add more animations by selecting the “root node” and then right clicking under “Animations” and selecting “import”

Now save your avatar, making sure it is saved in the same folder as your Vizard project. If you haven’t already, create a new folder to save your project in. The avatar will be saved in Vizard’s default format “OSGB”.

Adding to Code in Vizard
Create a new Vizard file by going to File- “New Vizard File” and add the following code to bring in your avatar. Note that “vizfx” is needed if your avatar uses shader effects

import viz

import vizfx


#Add avatar model, where Test_avatar is the name you gave your avatar

model = vizfx.addAvatar('Test_avatar.osgb')


Here is some more detailed code that also adds an environment, changes the lighting a bit, changes the position of your avatar, triggers an animation state,  and uses “setMultiSample” to increase the antialiasing.sdf

import viz

import vizfx



#Get a handle to the main headlight and disable it.  

headLight = viz.MainView.getHeadLight()


#Add your environment

loft= viz.addChild('living_loft.ive')

#Add avatar model

model = vizfx.addAvatar('Test_avatar.osgb')

#Adjust position of avatar



#Trigger any included animations



Facial Morph Targets

Under the “Animations” on the right panel, you will see the facial morph targets. Click to see the full list and drag the slider to see the effect. In the Vizard code you will reference the morph ID if you want to utilize them in your scene. Use this code in Vizard to set a Morph (where “23” is the morph ID, 1 is the value and time is in seconds). See this page in the Vizard documentation for more.

morph = vizact.morphTo(23,1,time=2)

See Also
For more information on using avatars in Vizard see this page in the documentation.

Programs for creating avatars:
Character Creator:

Make Human:

Stay Updated
Subscribe to our monthly Newsletter
Phone +1 (888) 841-3416
Fax +1 (866) 226-7529
813 Reddick St
Santa Barbara, CA 93103