Jump to content
  • Advertisement
Sign in to follow this  
LevyDee

Interpolating and animation

This topic is 2247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I am not the best at math, but I am learning! Anyways, I have been looking at different methods of interpolation for a bone animation system I want to start work on, and it seems like the most promising are Cubic Spline interpolation and Quadratic Spline interpolation. I am unfamiliar with interpolation, but have come to a couple conclusions.

Cubic interpolation is the easier of the two(least computationally expensive), but requires 4 data points to interpolate a point given t time.
Quadratic interpolation doesn't have this issue, but requires finding all of the equations and unknowns for the data set(more computationally expensive).

I still have a long ways to go to understand these 2 methods completely(obviously!), but I would kind of like some guidance on which method is best for 3d animation with a little explanation.

Thanks!

Edit: Also, given that this will be used to interpolate two points(the bone head and bone tail) at once, would it be easy enough to keep a static distance between the two points(bone length)?

Share this post


Link to post
Share on other sites
Advertisement

Cubic interpolation is the easier of the two(least computationally expensive), but requires 4 data points to interpolate a point given t time.



[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Quadratic interpolation doesn't have this issue, but requires finding all of the equations and unknowns for the data set(more computationally expensive).[/font]





What you say makes somewhat sense. Cubic needs 4 points = true(n=3). Quadratic needs 3 points(n=2). Linear needs 2(n=1). Makes sense? You should also consider where your data is coming from. If you are using motion captured animation files, than interpolation would be useless as it is usually sampled at 60/30fps depending on quality. If you are animating your self, using for example Blender 3D I would say go with Cubic, and learn the math to mimic blender.

What you want most likely is a form of splines. A spline is pieces of n-degree polynomial. For example n=3 and you got cubic curve. Piece a bunch together and you have cubic-splines,

The "n" comes from the formula "C_0 + C_1*t + C_2*t^2 ... C_n*t^n". When the C_ constants are chosen correctly as t varies from 0 to 1, you will go from your starting point, to your ending point. In 3D you will have that formula for each dimension. You pick your C's by solving series of equations, the type of equation, determines what the "data" points represent. The in cubic splines point 1 is start (t=0), point 4 is the end (t=1) and then you take the derivative and at t=0 you have slope from point1 to point2 and t=1 from point3 to point4. You can give your own definitions of what the points represent e.g. one point can be some form of intensity, aslong as you can write down an equation of how it relates, and solve.

Note:
I'm a bit confused of how blender does it cause each control point (the points in the middle which the curve does NOT pass through) seem to control 2 parameters of the curve, 1 is slope, 2 a form of intensity/strechiness which makes me think blender uses quartic (n=4) interpolation.

wiki

http://en.wikipedia....C3%A9zier_curve

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!