[osg-users] extracting camera path from model

Richard Baron Penman richardbp+osg at gmail.com
Thu Sep 25 00:38:05 PDT 2008


I have a model and camera animation path exported from 3ds max to osg
In OpenSceneGraph I want to jump to any point along this animation, so I'm
trying to extract the AnimationPath ControlPoints.

Here is the relevant part of the osg file:

PositionAttitudeTransform {
    DataVariance DYNAMIC
    name "Camera01"
    nodeMask 0xff
    cullingActive TRUE
    UpdateCallbacks {
      AnimationPathCallback {
        DataVariance DYNAMIC
        pivotPoint 0 0 0
        timeOffset 0
        timeMultiplier 1
        AnimationPath {
          DataVariance DYNAMIC
          LoopMode LOOP
          ControlPoints {
            0 235.432098388672 9.58514785766602 0 0.500558972358704
0.499440401792526 0.499440401792526 0.500559031963348 1.00000011920929
0.999999761581421 1.00000023841858

So you can see the AnimationPath is stored within a callback within a
Transform. My problem is I haven't figured out how to extract this path.

There was a similar thread on this earlier (
but the author was just after an initial position.
I looked at getUpdateCallback() but the interface of its return type
NodeCallback looks like a dead end.
Has anyone done this before?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080925/abe726a9/attachment-0002.htm>

More information about the osg-users mailing list