Hi Drew, On 12/19/06, Drew Whitehouse <[EMAIL PROTECTED]> wrote:
I'm using osgGA::AnimationPathManipulator to animate a camera in my scene, and I have a bunch of AnimationPathCallback's attached to various nodes in the scene. For some reason the viewer's AnimationPathManipulator seems to have a different concept of time to what's being seen by my animation path callbacks. Hitting the spacebar in the viewer window as soon as it appears on the screen *nearly* gets things synchronized so it seems that there is two different notions of time in the system. I've waded through some of the code involved, but it's a bit convoluted and I'm hoping someone can point me in the right direction ?
All the manipulators and animation path callbacks will be using the osg::FrameStamp that the viewer sets each frame for controlling their own timing, but.. each of them could have their has their local time offsets and scales, if all of these are set the same then everything should go like clockwork. Pressing the space bar will reset the offset in the AnimationPathManipulator, but not the reset the rest of the callbacks. Off the top of my head I can't think of the exact code to get things working sweetly, it might be just a case of manually setting the offsets/scales to make sure that they are in sync, or might be a case of bypassing the AnimationPathManipulator and using a AnimationPath directly in the main loop, get the new view matrix each frame and passing this to the viewer.
Maybe I shouldn't be wasting my time working with osgProducer ? Should I be looking to the new viewer code that is appearing in the CVS ? I do want to use active stereo in a single window and it seemed to be the easiest way to go.
I do want used to do a lot of testing with osgViewer, but it won't solve the problem you have as the underlying issue is really elsewhere i.e. sync'ing of the offsets etc. This week osgViewer will be under a great deal of flux as I get various elements of it working - the rough class layout is there, but the guts inside are under development, and during this dev work the interface will certainly evolve to keep everything working sweetly. Once osgViewer is most the way there I'd hope that many users will be able to port across from osgProducer::Viewer to osgViewer::Viewer will relative ease. It is a different design & implementation though. There are other ways of working too and my aim is to make it easier to roll viewer in many different ways. This topic belongs in its own thread of course... more info as the week progresses. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
