PDA

View Full Version : Animation


brunomartelli
05-08-2013, 12:21 PM
I have some mocap characters and i want to be able to jump to and play from a particular frame - how do i do that?

Jeff
05-10-2013, 12:46 PM
I'm not sure what you mean by mocap characters. If have a Cal3D avatar with a saved animationyou can use <node3d:avatar>.setAnimationTime to play it from different points in the animation cycle.

brunomartelli
05-13-2013, 08:08 AM
yes but how specifically do I set the animation frame? I have a motion captured character, exported from 3dsmax using the Cal3d exporter, it has 1 animation and

bill = viz.addAvatar('LandMan.cfg' )
bill.state(1)
bill.setAnimationTime(1,180)

doesn't do it or any other combo of numbers ...

thanks

Jeff
05-13-2013, 05:25 PM
If the animation is cycling and you want to change the animation time, pass in 0 for the animation number. Does that work for you?
import viz
import vizact

viz.go()

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

vizact.onkeydown('1',avatar.setAnimationTime,0,5)
vizact.onkeydown('2',avatar.setAnimationTime,0,13)