> Well, at any rate, if you can provide a set of guidelines for 
> doing this I'd love to volunteer to sit down and do it after 
> work tomorrow. I've submitted a few bug fixes here and there, 
> but I'd like to do something at least minutely important for 
> OSG for once. :)

Hi Jeremy -- Thanks for volunteering! :-)

In my opinion, this should be functionally equivalent to the
osgProducer-based osgviewer in OSG v1.2. So:

 * Hitting the 'z' key should start recording a path.
 * Hitting shift-'z' should cause the path to be written to a file called
saved_animation.path in the current working directory, and should
immediately start playing the path back again.

The current osgviewer already supports playback with the -p command line
option. It's just the recording and the writing that needs to be
implemented.

As a model for how to implement this, I suggest checking out an osgProducer
tree. I doubt it's changed much since the OSG v1.2 release, so all the code
for recording animations should still be present in the Viewer class. In a
nutshell, it simply snaps the view information each frame, stores it in an
instance of AnimationPath, then tells the AnimationPath to write itself out
when appropriate.

As Robert pointed out, there might be some issues with capturing the view
information at the right time. In my opinion, if what you capture is off by
one frame, that's irrelevant as long as 1) it's always off by one frame
(that is, you always capture it the same way), and 2) whatever is captured
gives me the same results each time I play it back. At this point in the
release cycle, I feel that having something in place that's usable is better
than leaving the feature out entirely.

Hope this helps,
   -Paul

* Hitting the

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to