WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   How to control ive or osg animation? (https://forum.worldviz.com/showthread.php?t=4419)

blaise 11-20-2012 10:22 AM

How to control ive or osg animation?
 
Dear All

The animation I exported from 3DSmax into ive files run in vizard loop mode. How can I control that animation?

I would need to pause/ slow down or speed it up.

Many thanks in advance.

Jeff 11-21-2012 10:09 AM

There are a number of get and set commands that can be used with imported animations. The following example shows how to set the speed, state, and loop mode on one of the animations included in the piazza_animations.osgb file:
Code:

import viz
import vizact
viz.go()

viz.setMultiSample(8)
viz.fov(60)
viz.go()

# Add piazza model
model = viz.addChild('piazza.osgb')
# Add piazza animations
animations = viz.add('piazza_animations.osgb')

# Create avatar parented to walk animation
avatar_path = animations.getChild('walk')
avatar = viz.addAvatar('vcc_male2.cfg')
avatar.setParent(avatar_path,node='walk')
avatar.state(2)

#set animation time, speed, and loop mode
avatar_path.setAnimationTime(10.0)
avatar_path.setAnimationSpeed(1.5)
avatar_path.setAnimationLoopMode(0)

#toggle between pause/play
vizact.onkeydown(' ',avatar_path.setAnimationState,viz.TOGGLE)
               
viz.MainView.move([0,0,-7])


blaise 11-22-2012 06:26 AM

Thank you Jeff!

I understand the script works only for osg animations. Is there a way to control animations on ive files?

Jeff 11-26-2012 12:13 PM

It will work with ive. If you are exporting these models yourself we recommend exporting to osgb, the newer and preferred version of the compiled osg format.


All times are GMT -7. The time now is 01:44 AM.

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