• What is your GameDev Story?

Archived

This topic is now archived and is closed to further replies.

Bezier interpolation, 3dsMax style

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

Recommended Posts

Hello all, I have a problem determining how 3dsMax 6.0 computes bezier interpolation. For a keyframe, max stores the key time, value, in tangent, out tangent, in length and out length. Up till the tangents, things are fine for me, but with the lengths I have no clue how the computation is done. All I know is that it influences velocity in some fashion. Does anyone know how 3dsMax works with beziers ? Thanks, SuperTomate

Share on other sites
Do you know how Bezier curve computation works in general? Typically, you're given 4 points. In this case, you can get the 4 necessary points from what they give you. You should already have the start and end points. Then, from the start point, you travel along the in tangent vector by the length given you. This is your second point. Your third is offset from the last point in the same way, but using the out tangent and the out length. So now you have x0, x1, x2, x3, y0, y1, y2, y3 (and z0, z1, z2, z3 if in 3D, which I suppose it would be... either way, it's all the same).

With those values, you can now get an equation for each dimension in the form

x(t) = ax·t3 + bx·t2 + cx·t + dx

where t goes from 0 to 1. And here is how you calculate the four constants:

dx = x0
cx = 3·(x1 - x0)
bx = 3·(x2 - x1) - cx
ax = x3 - x0 - bx - cx

Do this for the yn and zn values as well, and you have equations for calculating x, y, and z at time t.

[edited by - Agony on April 13, 2004 11:00:46 AM]

Share on other sites
Thanks alot, that should help me get going !

Cheers,
SuperTomate

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 12
• 15
• 11
• 12
• Forum Statistics

• Total Topics
634153
• Total Posts
3015844
×