WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-16-2004, 01:44 PM
bailenson bailenson is offline
Member
 
Join Date: May 2004
Posts: 35
accessing morph targets of avatar

Hello...we have successfully accessed VZF morp targets (i.e., an avatar with the mouth open) using the avatar.speak command. However, if we have created other morph targets (such as a one with the eyes closed), how can we access that morph directly using Vizard from a Timer?

Thanks,

jb
Reply With Quote
  #2  
Old 09-16-2004, 01:51 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

VZF objects have a morph command which allows you to set the percentage value of a morph. Sample:
Code:
face = viz.add('myhead.vzf')

#Set morph 0 to 50%
face.morph(0,0.5)

#Animate the morph going to 100% in 2 seconds
face.morph(0,1.0,2)
Look in the command reference under node3d:face for more information.
Reply With Quote
  #3  
Old 09-16-2004, 03:31 PM
bailenson bailenson is offline
Member
 
Join Date: May 2004
Posts: 35
thanx...jb
Reply With Quote
  #4  
Old 09-21-2004, 01:59 PM
vjosh vjosh is offline
Member
 
Join Date: Sep 2004
Posts: 17
Accessing morph targets by name

Is there a way to access morph targets by name? The morph function seems to take only integer values to specify which morph to perform.

Thanks!

-Josh
Reply With Quote
  #5  
Old 09-21-2004, 02:06 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Josh,

Yeah, you can retrieve the index of a morph target by name, then use that index with the morph command. For example, let's say you have a morph called "smile", you would do something like the following:
Code:
face = viz.add('myface.vzf')

#Get the index for the morph named 'smile'
smile = face.getmorph('smile')

#Now apply the smile morph
face.morph(smile,1.0)
Reply With Quote
  #6  
Old 09-21-2004, 02:23 PM
vjosh vjosh is offline
Member
 
Join Date: Sep 2004
Posts: 17
Thanks! FYI, the Vizard (offline) command reference documents getmorph's behavior differently... It says that getmorph takes an integer specifying the index of the morph and returns a floating point number representing the degree to which the morph is applied.

-Josh
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 12:58 AM.


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