I tried to understand "osganimationmakepath" example.
I can't understand how to make an animation if I would use simple points like these:
v[0] = osg::Vec3(0, 0, 0);
v[1] = osg::Vec3(20, 0, 0);
v[2] = osg::Vec3(40, 0, 0);
v[3] = osg::Vec3(60, 0, 0);
I want an animation without stops between points and with a constant speed. What keys I have to add on path?
I don't understand the relationship between control points of bezier and the making of animation.
Is there anybody who can me explain?
Thank you!
Cheers,
daniele
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32861#32861
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Bezier Curves are parametric functions that are defined by their control
points. The number of control points will determine the degree of the curve
minus 1 so four control points will yield curve of degree three (cubic). The
control points can be specified in whatever dimension you want (i.e. 2D or
3D) and whatever coordinate system you want. The resulting curve will lie
within the control point polygon (the convex hull) where the curve will
interpolate the first control point at t=0 and the last control point at
t=1. As the parameter "t" varies between 0 and 1, the curve will trace out a
smooth path from the first to the last control point. The animation will be
controlled by the parameter "t" as input and the resulting point (x,y,z) on
the curve will be given as output for a position.
Without going into too much detail mathematically on Bezier curves and
splines, may I suggest you look at the book "Curves and Surfaces for
Computer Aided Geometric Design" by Gerald Farin to get more information if
you want to learn more about Bezier curves.
Hopefully this will answer your question on how the example works when using
Bezier curves to generate an animation path...
-Shayne
I don't understand why in my animation (and also in the standard example osganimationpath) I have not a costant speed.
If I create a straight line with bezier I can have no control point (control point equal to main point).
thanks
daniele
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32910#32910
I've 4 keyframes:
v[0] = osg::Vec3(0, 0, 0);
v[1] = osg::Vec3(20, 0, 0);
v[2] = osg::Vec3(40, 0, 0);
v[3] = osg::Vec3(60, 0, 0);
in times 0,2,4,6
How to move along this keyframes with a constant speed from 0,0 to 60,0???
thanks
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32978#32978
Have you looked at the osganimation example?
Robert.
I need a bezier path animation with constant speed from first to last keyframe.
Is it more clear?
How?
thanks
robertosfield wrote:
> Hi Daniele,
>
> Have you looked at the osganimation example?
>
> Robert.
>
> On Fri, Oct 22, 2010 at 12:03 PM, daniele argiolas <> wrote:
>
> > I've a pratical case, can anybody help me??
> >
> > I've 4 keyframes:
> > v[0] = osg::Vec3(0, 0, 0);
> > v[1] = osg::Vec3(20, 0, 0);
> > v[2] = osg::Vec3(40, 0, 0);
> > v[3] = osg::Vec3(60, 0, 0);
> >
> > in times 0,2,4,6
> >
> > How to move along this keyframes with a constant speed from 0,0 to 60,0???
> >
> > thanks
> >
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=32978#32978
> >
> >
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ------------------
> Post generated by Mail2Forum
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32981#32981
You might need to implement it yourself if OSG's spline interpolation
doesn't provide a constant velocity. Here's a link I found on the topic:
http://community.spinxengine.com/content/19-constant-speed-cubic-spline-interpolation.html
--"J"