2009/5/25 Christian Buchner <christian.buch...@gmail.com>: > Forgive my laziness - are there any utility classes within OSG that > let the camera go on a smooth ride to a specific location and eyepoint > vector from the current location? I mean smooth in the sense of the > camera accelerating and braking, instead of making a simple constant > linear movement and rotation. > > If there is no ready made solution for camera paths - how difficult > would it be to dynamically create a key frame animation for the camera > for abitrary start and stop locations? > > Ideally I'd like the user to be able to quickly observe some points of > interests within in my 3D simulation, without instantaneously zapping > the camera to the new position. There should be some kind of "whoosh" > effect where the camera travels from the current location to the > destination quickly, within about second. This may have the > advantage that the user will be able to maintain a sense of > orientation in space which would be lost by switching to the > destination camera position instantly. > > Christian > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
Hi Christian, do you mean "continuity" (that's the technical term, AFAIK), as in easing in and out of motion? Did you see osganimationnode example? It uses bezier keyframes. That is, changes in variables (e.g. position x) will not be linear but will be smooth. Add your camera as a child of a MatrixTransform, then set the update callback (that has a bezier keyframe container) of matrix transform. osganimationnode is a very good example for this type of animations. I am using similar technique in my animation (I move rectangles) and works just fine. Ismail _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org