View Single Post
  #4  
Old 09-13-2012, 06:27 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,465
For the original Complete Characters, instead of morph targets you could remove the eye mesh and add eyeball geometry in Max. These would be child nodes of the head that could be rotated. Similar to the method used in the biohead file and head.py script in the tutorials\avatars folder of the Vizard install.

Here is an example of moving the eyes of the male HD character included with Vizard:
Code:
import viz
import vizact
viz.go()

viz.add('piazza.osgb')

male = viz.addAvatar('vcc_male2.cfg',pos=[0,0,1],euler=[180,0,0])
male.state(1)

leftEyeLeft = vizact.boneSpinTo('Bip01 LEye',mode=viz.AVATAR_LOCAL,euler=[-15,0,0],time=2)
rightEyeLeft = vizact.boneSpinTo('Bip01 REye',mode=viz.AVATAR_LOCAL,euler=[-15,0,0],time=2)

def moveEyesLeft():
	male.addAction(leftEyeLeft,pool=1)
	male.addAction(rightEyeLeft,pool=2)
	
vizact.onkeydown('1',moveEyesLeft)
Reply With Quote