WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-20-2012, 10:22 AM
blaise blaise is offline
Member
 
Join Date: Nov 2012
Posts: 2
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.
Reply With Quote
  #2  
Old 11-21-2012, 10:09 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
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])

Last edited by Jeff; 12-01-2012 at 10:31 AM.
Reply With Quote
  #3  
Old 11-22-2012, 06:26 AM
blaise blaise is offline
Member
 
Join Date: Nov 2012
Posts: 2
Thank you Jeff!

I understand the script works only for osg animations. Is there a way to control animations on ive files?
Reply With Quote
  #4  
Old 11-26-2012, 12:13 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
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.
Reply With Quote
Reply

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
control animation on ive or wrl files? Darkmax Vizard 8 07-17-2012 12:13 PM
Clarification on CAL3D Avatar Animation in Vizard shivanangel Vizard 2 11-22-2010 07:16 AM
adding more than 1 action for avatar animation slider control yak Vizard 0 07-21-2009 11:22 AM
Animation Tracks.... k_iwan Vizard 2 03-26-2007 05:52 PM
Jumpy animation Elizabeth S Vizard 1 11-08-2006 02:11 PM


All times are GMT -7. The time now is 05:24 AM.


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