WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-26-2011, 04:05 PM
Lithium Lithium is offline
Member
 
Join Date: Jun 2011
Posts: 7
"reverting" between animations & linking objects to bones

Hi all,
I am having a little issue with avatar animation I'm hoping you can help me solve. When I have multiple animations following one another (just using multiple avatar.addAction(vizact.animation(n)) calls ) the avatar "reverts" back to the state position between different animations. (i.e. between an animation of clapping and dancing for example, her arms move very quickly back toward her side as in the idle state before moving into the dancing animation).

Is there a way to avoid this?

Another problem I am encountering is that I get an "ERROR: Link failed (source linkable is invalid)" when attempting to link an object to a complete character (non-HD) 's Bip01 R Hand bone. I am not sure why this is as the exact same code runs fine if I replace the character with vcc_female.cfg and the bones are named the same.

Thanks in advance for any help!
Reply With Quote
  #2  
Old 07-26-2011, 07:04 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could remove the current state and then add it back just before the actions are done with a timer. That way the avatar won't revert to any state between actions:
Code:
import viz
import vizact

viz.go()

avatar = viz.addAvatar('vcc_female.cfg',pos=[0,0,5],euler=[180,0,0])
avatar.state(1)

def animateAvatar():
	
	#remove current state
	avatar.state(-1)
	
	#add a series of actions
	avatar.addAction(vizact.animation(4))
	avatar.addAction(vizact.animation(5))
	avatar.addAction(vizact.animation(6))
	
	actionsDuration = avatar.getDuration(4) + avatar.getDuration(5) + avatar.getDuration(6) - 0.1
	
	#set state before animations finish
	vizact.ontimer2(actionsDuration,0,avatar.state,1)

vizact.onkeydown(' ',animateAvatar)

Please create a new thread for the linking question and post some example code that replicates the problem for you.
Reply With Quote
  #3  
Old 07-27-2011, 01:35 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
In my own projects I set the idlepose/state to a "neutral" 1 frame animation that doesn't make my avatars jump between animation switches. For example if the avatar is sitting -> sitting looking around -> sitting talking -> sitting I will give it a base state of a sitting avatar. That way you don't have to do tricks with timers and most of the times you already have that one frame position that is equal to all animations begin and end states to make the animation go more fluently.

You could also try the fade-in en fade-out values (or setting them on 0):
<vizact>.animation(
number
delay_in = viz.AVATAR_DELAY
delay_out = viz.AVATAR_DELAY
freeze = False

)

or set freeze on true. But setting freeze on true will not end the animation and start the next one so you will need to start the next one your self. with timers again
Reply With Quote
  #4  
Old 08-08-2011, 12:01 PM
Lithium Lithium is offline
Member
 
Join Date: Jun 2011
Posts: 7
Thanks! I'll keep those suggestions in mind :]
Reply With Quote
Reply

Tags
animation, avatar, link, linking

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Animations and locked bones Enlil Vizard 1 06-17-2010 04:45 PM
Smooth transitions back to animations when unlocking bones Enlil Vizard 3 04-01-2009 08:24 PM
Linking problems with Live Character Frank Verberne Vizard 5 06-04-2008 12:42 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 12:01 PM
Linking avatar 'bones' to a position tracker. zachhendershot Vizard 3 11-19-2003 10:26 PM


All times are GMT -7. The time now is 02:39 AM.


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