[osg-users] speeding up/slowing down animations

2012-08-31 Thread Trajce Nikolov NICK
Hi community,

Lately I was doing something with animations (using osgAnimations). Any
hints how to speed up/slow down animations (osgAnimation::Animation)

Thanks a bunch

Nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] speeding up/slowing down animations

2012-08-31 Thread Sergey Polischuk
Hi Nick There are setDuration method in osgAnimation::Animation interface. Using it you can rescale animation to any duration you want.i.e. to slowdown animation N times you can useanimation-computeDuration();animation-setDuration(animation-getDuration() * N); Cheers,Sergey.31.08.2012, 13:02, "Trajce Nikolov NICK" trajce.nikolov.nick@gmail.com:Hi community,Lately I was doing something with animations (using osgAnimations). Any hints how to speed up/slow down animations (osgAnimation::Animation)Thanks a bunchNick___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] speeding up/slowing down animations

2012-08-31 Thread Trajce Nikolov NICK
Thanks Sergey,

I just did it like this and it seam to work although the transition is not
smooth from one to another scale. I was waiting for some like TimeScale or
such. Anyway, any idea how to playback frame by frame forward/backward?

Thanks a lot

Nick

On Fri, Aug 31, 2012 at 12:22 PM, Sergey Polischuk pol...@yandex.ru wrote:

 Hi Nick

 There are setDuration method in osgAnimation::Animation interface. Using
 it you can rescale animation to any duration you want.
 i.e. to slowdown animation N times you can use
 animation-computeDuration();
 animation-setDuration(animation-getDuration() * N);

 Cheers,
 Sergey.
 31.08.2012, 13:02, Trajce Nikolov NICK 
 trajce.nikolov.nick@gmail.com:

 Hi community,
 Lately I was doing something with animations (using osgAnimations). Any
 hints how to speed up/slow down animations (osgAnimation::Animation)
 Thanks a bunch
 Nick

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] speeding up/slowing down animations

2012-08-31 Thread Sergey Polischuk
You can try to play clever tricks with animation:getStartTime() and setStartTime()Animation manager uses simulation time for update, so if you know this value either from viewer framestamp or some other source, you can calculate what start time you should set to get smooth transition from one animation speed to another, and even smoothly play animation backwards switching to PPONG animation play mode. Also there are TimelineAnimationManager, which have a lot of functionality with regard to controlling animation speed and direction (and also animation tracks blending), it easy to use and have a lot of useful features, but there are one drawback - it operates only on distinct animation keys without interpolating between them (at least it was this way when i used it last time), so animation will jitter if you dont have a lot of keyframes (like at least 30 keys per frame).Cheers.31.08.2012, 14:31, "Trajce Nikolov NICK" trajce.nikolov.nick@gmail.com:Thanks Sergey,I just did it like this and it seam to work although the transition is not smooth from one to another scale. I was waiting for some like TimeScale or such. Anyway, any idea how to playback frame by frame forward/backward?Thanks a lotNickOn Fri, Aug 31, 2012 at 12:22 PM, Sergey Polischuk pol...@yandex.ru wrote:Hi Nick There are setDuration method in osgAnimation::Animation interface. Using it you can rescale animation to any duration you want.i.e. to slowdown animation N times you can useanimation-computeDuration();animation-setDuration(animation-getDuration() * N); Cheers,Sergey.31.08.2012, 13:02, "Trajce Nikolov NICK" trajce.nikolov.nick@gmail.com:Hi community,Lately I was doing something with animations (using osgAnimations). Any hints how to speed up/slow down animations (osgAnimation::Animation)Thanks a bunchNick___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org