#1
|
|||
|
|||
"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! |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
Thanks! I'll keep those suggestions in mind :]
|
Tags |
animation, avatar, link, linking |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Animations and locked bones | Enlil | Vizard | 1 | 06-17-2010 03:45 PM |
Smooth transitions back to animations when unlocking bones | Enlil | Vizard | 3 | 04-01-2009 07:24 PM |
Linking problems with Live Character | Frank Verberne | Vizard | 5 | 06-04-2008 11:42 AM |
Could not find plugin to load objects... | halley | Vizard | 1 | 05-30-2006 11:01 AM |
Linking avatar 'bones' to a position tracker. | zachhendershot | Vizard | 3 | 11-19-2003 09:26 PM |