Skip to main content
gamedev.net
🔒 Locked 🎮 Unity

evaluate max splines

Started by supagu Apr 27, 2006 at 7:55 AM 0 replies 400+ views
Original Post
supagu
supagu
i'm wanting to add splines to my engine. Im using 3d max to generate my splines, and want to evaluate them in my engine. Now i understand the how to create them in max. what i dont know is how to use the data i have to generate a point on the curve. so i have this: a spline object has a number of knots. a knot has the following:

enum KnotType
{
	KT_Auto,
	KT_Corner,
	KT_Bezier,
	KT_BezierCorner,
};

Vector3		mIn;
Vector3		mOut;
Vector3		mPosition;
KnotType	mType;
any one know any good tutorials that explain spline evaluation?
John Schultz
John Schultz
Everything you need is in the Max SDK, including source snippets for evaluation (quads, triangles).

[google] Bezier and de Casteljau for basic information about splines.
3DS Max represents the 'inner' Bezier points as vectors (add them to the appropriate end point to get the geometric inner control points). For a single Bezier curve, you'll have 4 points. The first and last point are on the curve, the two inner points influence the curve. More complex curves are constructed by joining together the endpoints of multiple curves. In order to keep the joined curves continuous (smooth), the point before the shared point, the shared point, and the next point must be collinear. Making the 'in/out' vector lengths equal further improves 'smoothness' (continuity).

http://www.cse.unsw.edu.au/~lambert/splines/

Piecewise curves:

http://www.reed.edu/~nobles/thesis/node4.html

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.