WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-18-2007, 12:40 PM
v-clizzin v-clizzin is offline
Member
 
Join Date: Sep 2006
Posts: 15
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)
Attached Thumbnails
Click image for larger version

Name:	face_problem_example.jpg
Views:	533
Size:	19.0 KB
ID:	194  
Reply With Quote
  #2  
Old 09-18-2007, 03:27 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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
Reply With Quote
  #3  
Old 09-19-2007, 03:32 PM
v-clizzin v-clizzin is offline
Member
 
Join Date: Sep 2006
Posts: 15
Quote:
Originally Posted by farshizzo View Post
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
That did it. Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC