RE: [Algorithms] Re: Keyframe reduction
Brought to you by:
vexxed72
|
From: Ian E. <ie...@ku...> - 2002-12-17 22:29:47
|
I understand that in a 2d formulation. Does this operates multi-dimensionally the same way as 2 dimensionally then? (i.e. = quaternion). What happens with the matrix? (the only formulations I have in any of my references are 2d) =20 Sorry for this is a dumb question.. I just don't know. =20 -----Original Message----- From: Peter-Pike Sloan [mailto:gda...@li...] On Behalf Of Peter-Pike Sloan Sent: Tuesday, December 17, 2002 11:40 AM To: gda...@li... Subject: RE: [Algorithms] Re: Keyframe reduction =20 Least squares is very simple. Given a set of data points (2x = oversampled in caseys case) and a knot vector, compute the coefficients for the control points of the spline that minimize squared error. This involves solving = a linear system where each row corresponds to a data point (di - they are uniformly space so each point has a corresponding ti which is in the = domain of the curve) and each column corresponds to a control point for the = curve (cj the unkowns). So matrix element Aij is Bj(ti) where Bj is the basis function for the jth control point. The right hand side is just a = vector of the di and the x's are the unkown control points. Sine you are = compressing things there will be many more rows then columns in this linear system = so you don't have to worry about over fitting problems (which you would if there were more DOF...) =20 -Peter-Pike -----Original Message-----=20 From: Ian Elsley [mailto:ie...@ku...]=20 Sent: Tue 12/17/2002 10:35 AM=20 To: gda...@li...=20 Cc:=20 Subject: RE: [Algorithms] Re: Keyframe reduction Casey I think I may be missing the point. Do you do least squares on the already fitted cures (ie, a chi squared test) then curve fit separately, or do you use least squares to fit your actual spline to the data? I have not used least squared before and from the reading I have done (numerical recipes, last night), it seem that the equation of the line/spline are inherent in the method and it needs to be reformulated to use a different line/spline. (The version I read was for fitting a straight line to a data-set, which I know won't work for quaternions slerps anyway) I see the elegance of this method and would love to work it out, but I've got a few blanks here. Any pointers? Thanks in advance, Ian -----Original Message----- From: gda...@li... [mailto:gda...@li...] On Behalf Of Casey Muratori Sent: Monday, December 16, 2002 1:13 PM To: gda...@li... Subject: [Algorithms] Re: Keyframe reduction > On this first pass we're stuck with linear keyframing, because we just > don't have the cycles in game to go to splines. I know this would help a > lot, but it isn't an option. In Granny I do successive least-squares approximations do the data. I take the array of samples for a given channel (ie., position) which is 2x oversampled or better from the art tool. I then start by doing a least-square solve for a spline of arbitrary degree with knots at either end. I compute the error over the spline from the original samples, and add knots in the areas of highest error. Repeat and salt to taste. Since it's fairly easy to write a single solver that solves for any degree of spline, I use the same solver for linear keyframes as I do for quadratic keyframes, cubic keyframes, or even "0th order keframes", which is to say if you don't want to interpolate _at all_, the solver can still place the "stop-motion" key frames in the best locations. But hopefully no one is still doing that kind of animation. If I were doing this over again (which I probably will at some point), I would probably use some kind of weird waveletty scheme now. I decided not to do that originally, because I had about a month to do the entire spline/solver/reduction thing the first time, and it had to be highly optimized. So I didn't want to have to learn wavelets and spline solvers at the same time. Next time I'll spend some time on wavelets and probably use some sort of hierachical reduction scheme instead, primarily so you can change how densely your keyframes are placed at run-time, and so you can get hard edges easier (motions which are intended to have sharp discontinuities aren't handled well at all by my current scheme). - Casey ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 |