Forum: Poser Technical


Subject: Curve type for spline interpolation?

kuroyume0161 opened this issue on Nov 19, 2007 · 10 posts


kuroyume0161 posted Fri, 23 November 2007 at 9:06 PM

I'm back! ;)

With more research under my belt, it appears that Poser is using some form of cubic spline interpolation with "C2 continuity".  That quoted part means that the curve isn't created just from the immediate neighbors of a particular keyframe, but considers all contiguous spline-interpolated keyframes.  You know this by the fact that changing the value of one keyframe ripples across the curves of other keyframes changing their curvature as well.

There is a natural choice here (pun intented): natural free cubic splines.  These use a set of linear equations to interpolate (create the curve or plot the points inbetween keyframes) with that aforementioned C2 continuity.  The 'free' part has to do with handling the first and last keyframes.  Cyclic ends mean that the first and last have the same tangential vectors.  Acyclic (or clamped) means that a particular tangential value is assumed (0 usually).  Free means that the adjacent keyframe of first (second) or last (next-to-last) and a pseudo keyframe (usually just a duplicate of the one under consideration) are used to get one side of the tangent vector set..

There may also be a bit of smooching, er, smoothing in Poser's spline interpolation.  After I get a working natural free spline algorithm, it will be clear, I think, if Poser is also doing some rectification using ease-in and ease-out on the tangent vectors.  It is assured that Poser isn't using Catmull-Rom (with secant tangent vectors - that is a tangent on a keyframe that is parallel to the line from the previous to the next keyframe).  So, Catmull-Rom, Hermitian, and Kochanek-Bartels (TCB) splines are out.  I just hope that they aren't using some form of Bezier or B-Spline with 'invisible' control points.

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone