Hi Gianni,
is osgAnimation library quite new and growing fast?
Yes.
Anyway, I really didn't get the pro and cons of using osgAnimation library wrt the callback method explained for instance in osganimationnode example. Is the callback method more general? Does osgAnimate basically use callbacks inside? Are there some features only available in osgAnimation?
Callbacks are low-level, they allow you to do whatever you want but you have to manipulate your objects directly. osgAnimation is generally implemented with callbacks, but gives a higher-level interface in particular for character animation. Animating a character with its bones and skinning is relatively complex, and storing these animations so they can be activated on demand, or blending between different animations, etc. are also not so simple. osgAnimation allows you to do this in a simpler way than manipulating the transforms yourself.
What if I need to save an animation in mpg format? Is is possible in both cases or no one?
That's a different topic. osgAnimation and callbacks let you animate objects in your 3D scene at runtime, whereas saving an animation means capturing what's going on and recording that in a video file.
See the osgscreencapture example and osgViewer::ScreenCaptureHandler, which will show you how to save the rendered frames of your application, and then you can use a tool like ffmpeg or others to put all these separate image files into a video file (mpeg, avi, etc.). Or you can even override a class in osgViewer::ScreenCaptureHandler (the CaptureOperation class) and give the frames directly to ffmpeg to encode the video on the fly without saving individual frames to disk first.
One more thing, since OSG documentation is quite poor, it would be nice to have the examples updated (or enhanced) according to the new OSG development.
Generally they are. But older examples that still demonstrate useful things will stay there... The osganimationnode example is not obsolete, it still demonstrates useful techniques, but when doing more complex things there are higher-level libraries (in this instance osgAnimation) that can help you with the details.
Hope this helps, J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

