#1
|
|||
|
|||
face problems in Vizard 3.0
We have several scripts that were written for Vizard 2.5 that have problems with custom faces when run in Vizard 3.0.
The function is pasted below, with the relevant lines bolded. I've also attached a picture of what the face looks like. Thanks for the help. Code:
def loadAgent(scene,condition,person,gender): global agent, agents, faces, default_euler face_file = 0 if gender == vhil.FEMALE or gender == vhil.MALE: agent_file = 'female2.cfg' if person == CONDITION_1: face_file = 'Sandra/sandra.vzf' #face_file = 'Sandra/sandra.vzf' clothes = viz.add('') elif person == CONDITION_2: face_file = 'F-201/F-201.vzf' clothes = viz.add('F-201/fem_outfit2_2.jpg') else: print "\t\terror: not a valid gender!" print "\t\tloading",agent_file,face_file,"(scene",scene,")" agent = viz.add(agent_file,viz.WORLD,scene) agents.insert(scene-STARTING_SCENE, agent) if face_file == 0: print "\t\terror: not a valid face!" else: face = viz.add(face_file, viz.WORLD, scene) faces.insert(scene-STARTING_SCENE, face) agent.setFace(face) if gender == vhil.MALE: agent.texture(clothes, 'm_torso_LS.cmx') agent.texture(clothes, 'm_legs.cmx') agent.scale(AGENT_SIZE_M) elif gender == vhil.FEMALE: agent.texture(clothes, 'm_torso.cmx') agent.texture(clothes, 'm_legs.cmx') agent.scale(AGENT_SIZE_F) agent.translate(AGENT_POS) agent.rotate(0,1,0,180) agent.state(1) |
#2
|
|||
|
|||
You need to define the head mesh in the avatars cfg file. Have a look at the documentation for the setFace command. Basically, you need to add a line similar to the following in the cfg file:
Code:
head_mesh = NameOfHeadMesh.cmf |
#3
|
|||
|
|||
That did it. Thanks!
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|