WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-20-2004, 10:51 AM
vr_boyko vr_boyko is offline
Member
 
Join Date: Sep 2004
Posts: 19
Swapping VZF heads on the same avatar

Hi there,

I was wondering -- how do you "swap" one .vzf head with another on the same avatar?

For example, I have this neutral.vzf head for an avatar, and if I want his face to change to be happy.vzf -- how do I do so without having the head just superimpose itself onto the old neutral.vzf head?

(I defined a function in my class like this:

def face(self, facename):
self.head = viz.add(facename)
self.agent.face(self.head)
)
Reply With Quote
  #2  
Old 10-20-2004, 11:10 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Have you tried adding the happy head as a morph target of the neutral head? That would probably be the best way. Either way, to swap heads simply make the old head invisible and set the new head as the face:
Code:
neutral = viz.add('neutral.vzf')
happy = viz.add('happy.vzf')

avatar.face(neutral)

#Swap faces
neutral.visible(0)
avatar.face(happy)
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 07:01 AM.


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