WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-02-2014, 02:03 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
I do not understand your problem fully. Providing sample code helps to clarify the problem greatly. Please use the code tags (click the # symbol while writing your message) to preserve indentation in your code as well.

As far as I know, you can put as many actions as you want in a vizact.sequence. Therefore,
Code:
vizact.sequence( wait_blink, closing_eyes, opening_eyes, angry, neutral, viz.FOREVER )
should result in a sequence of wait, blinking eyes, and angry.

See http://docs.worldviz.com/vizard/comm...t/sequence.htm for more information.
Reply With Quote
  #2  
Old 07-02-2014, 04:02 AM
pradeep pradeep is offline
Member
 
Join Date: Jun 2014
Posts: 14
Hi,
Thank you for your kind and patience reply. I really feel helpful with the knowledge what you provide

Here i included my code and problem i face,
face=avatar.face('pradeephead_black.vzf')
BLINK_MORPH_LEFT = 0
BLINK_MORPH_RIGHT = 1
ANGRY=3

#Action that will animate blink closing
close_eye_left = vizact.morph(BLINK_MORPH_LEFT,1,0.1)
close_eye_right = vizact.morph(BLINK_MORPH_RIGHT,1,0.1)
closing_eyes = vizact.parallel(close_eye_left, close_eye_right)
#Action that will animate blink opening
open_eye_right = vizact.morph(BLINK_MORPH_RIGHT,0,0.1)
open_eye_left = vizact.morph(BLINK_MORPH_LEFT,0,0.1)
opening_eyes = vizact.parallel(open_eye_left, open_eye_right)
#Action that will wait 1-5 seconds
wait_blink = vizact.waittime(vizact.randfloat(1,5))
#Action that will blink indefinitely
blinkAction = vizact.sequence( wait_blink, closing_eyes, opening_eyes, viz.FOREVER )
#Add blink action to avatar
face.addAction(blinkAction,0)

ANGRY=3
angry=vizact.morph(ANGRY,1,0.8)
neutral=vizact.morph(ANGRY,0,0.8)
wait=vizact.waittime(vizact.randfloat(1,5))
action=vizact.sequence(wait,angry,neutral,viz.FORE VER)
face.addAction(action)
This is my code where i need the avatar blink action for the entire session. while i can add some other morphs in-between when ever i need in my code in some functions.

Thank you,
Regards,
Pradeep Raj
Reply With Quote
  #3  
Old 07-02-2014, 05:03 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
Again, your question is not completely clear to me. If you want to have multiple action at the same time, add them to separate pools. Now, you add the blink action to pool 0, and for your angry action, you don't specify a pool. Because the default is pool 0, both actions are added to the same pool. This should do it:
Code:
face.addAction(action,1)
For more information about actions, see: http://docs.worldviz.com/vizard/Acti...troduction.htm.
Reply With Quote
  #4  
Old 07-02-2014, 11:57 PM
pradeep pradeep is offline
Member
 
Join Date: Jun 2014
Posts: 14
Ya i got my mistake, actually i dint used the pool vales. That is the problem i faced. Thank you for your answer.

Regards,
Pradeep Raj
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding morphs from FaceGen in peoplemaker Frank Verberne Vizard 2 03-06-2013 11:24 AM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 12:14 PM
Adding a face to an existing avatar dan12345 Vizard 1 01-29-2008 07:26 PM
How to make avatar's eyes to blink when speaking michelcm3 Vizard 12 01-15-2008 08:48 AM
Problem with letting an avatar face towards another avatar ghazanfar Vizard 2 03-21-2007 02:30 AM


All times are GMT -7. The time now is 09:35 PM.


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