Object with two inependent animations only advance half-way

11 views
Skip to first unread message

Mauricio Franco

unread,
Apr 30, 2020, 8:07:36 PM4/30/20
to OpenSceneGraph Users
Hi,
I've a FBX object exported from Blender that have two parts.  The object has two animations (one for each part).
I call playAnimation for both parts at the same time but they only play until half way the animation duration.
If I play either animation it will play to the end.


Any advice and suggestions will be greatly appreciated,

Mauricio.

Mauricio Franco

unread,
May 2, 2020, 12:48:03 PM5/2/20
to OpenSceneGraph Users
To illustrate the problem better.  This is the scene structure:
      1. Shape (osg::Group) => Callbacks (update:  [ LeftFrameOpen LeftFrameClose RightFrameOpen RightFrameClose ])
       2. Block (osg::MatrixTransform) => Callbacks (update: Block)
        3. Block (osg::Geode)
       2. LeftFrame (osg::MatrixTransform) => Callbacks (update: LeftFrame)
        3. LeftFrame (osg::Geode)
       2. RightFrame (osg::MatrixTransform) => Callbacks (update: RightFrame)
        3. RightFrame (osg::Geode)

The group node at level 1 (called Shape) has three child objects and an animation manager with 4 animations: LeftFrameOpen LeftFrameClose RightFrameOpen RightFrameClose.  Each child object has its own MatrixTransformUpdater to perform the animation.

If I do:
playAnimation(animation1)
it plays OK till the end.

If I do:
playAnimation(animation3)
it plays OK till the end.

But if I do:
playAnimation(animation1)
playAnimation(animation3)
both animations play half their duration.

Setting the data variance to dynamic on the root node didn't help.

Mauricio Franco

unread,
May 3, 2020, 5:36:18 PM5/3/20
to OpenSceneGraph Users
It happened to be an issue in the FBX file.  
The example: osganimationtimeline helped a lot.
Thanks.
Reply all
Reply to author
Forward
0 new messages