onno van braam
computer graphics, webdevelopment


Introduction to Splines

Welcome to this introductory tutorial about splines! Splines are a powerful modeling tool, which has it's pro's and con's, but for me until now, I have found mainly pro's. Modeling with splines is very different from box/polymodeling, but in the end the results will be much alike.

The Basics

I'll start right away with showing you the absolute basics, that will come back all the time when you start using splines. So fire up 3D Max, go to the Create Panel > Shapes > Splines > Line. Click the Line button. You now get some options in the panel: Rendering, Interpolation, Creation Method and Keyboard Entry. If everything is ok, then Creation Method should be rolled out. Set Inital and Drag type both to corner.

Now go the front viewport and draw a hexagon (a six sided 'circle'), by clicking where you want each point, and connect the last (the 6th with the first again) and when the pop-up with 'Close Spline' comes, click Yes. Your result should look something like so, it doesn't matter if yours isn't exactly the same as long as it resembles it and has six points:

Alrighty, now go to the modify panel. You see it's called Line01 and that the object is of the type 'Line', and has a small 'add sign' before it, this means that it has multiple sub-objects (just as with editable polies, they have Vertex, Edge, Face, Poly and Element sub-object...). Click the 'add sign' before Line and see that Splines have the following sub-objects: Vertex, Segment and Spline.
Click Vertex to go into the vertex sub-object, you see a small button lights up in the modify panel (under Selection), this button is the exact same thing as the one you clicked just now, these let you go in to specific sub-objects. You also see that the vertices of your hexagon are shown, with one square one. That's your initial vertex, the one where you started drawing the hexagon. Move some vertices around and you'll see that it behaves normally, the lines that go from vertex to vertex move along, so nothing spectacular.
Click the second sub-object (Segment) and you see that your vertices changed from small crosses to different small crosses! ;) You can still recognize the initial vertex, is has again a small square around it. The segment sub-object and one step 'larger' than vertex. It can be compared with the edge sub-object in editable polies. When vertices have dimension 0, edges/segments have dimension 1. Select a segment and move it around, you see that again it behaves natural.
The last sub-object, is Spline, go in it (nothing changes in comparison to the Segment sub-object (maybe your selection is gone), again the same diagonal crosses for vertices) and select something, you see that the entire hexagon is selected. So this is the largest sub-object, entire splines can be selected, nothing smaller. You'll see later on, why this can be handy. For now go back to the vertex sub-object.

PS: Tip: To go in and out of the sub-object of an object (Spline or Editable Mesh/Poly) use Ctrl + B, to cycle through the different sub-objects, use Insert.

Now pan down the modifier panel to the 'Geometry' roll-out. The options here are all essential to spline modeling, stuff like Create Line, Attach, Weld and Refine are used ALL the time. We'll start with Create Line.
Click Create Line (make sure you're in the vertex sub-object), and now you can draw new lines, but that are part of the original spline, so you still have one object. So for instace, draw a rectangle inside the hexagon. It may be that it doesn't become entirely square when you click 'Close Spline > Yes' again, but we won't worry about that until later. But what if you don't want to close the spline all the time? What if you wanted to make a U-shaped line? Ah, yes, that's easy, just right-click when you want to end drawing a (new) line. Try to make one, this time inside the rectangle.

Right click to go out of the 'Create Line' mode, go into Spline sub-object, and select the hexagon, then the rectangle and then the U-shape, you see how it works? You have created three new splines, but they are part of the same object (Line01). Now remove the last two mentioned, by selecting the rectangle and the U-shape and hitting delete.
Back in the vertex sub-object, click Refine and move over a segment of your hexagon, you see that the cursor changes from the original arrow to a cross with two lines above it, one with an extra dot. Refine adds vertices to existing segments! So try to break the top and bottom segment (in VERTEX sub-object!!) into two parts, by adding a vertex in each of them.

This is very handy for adding detail to an existing spline model and something you'll be useing intensely once grabbed by the power of spline modeling. Right click to go out of the Refine-mode.
I'll explain something new one, that you may not have thought was important, but it is! If you already undertsand how it works, then you can skip this part: Snap. Snap let's the cursor snap to something you want, for instance vertices or grid points. This may be handy when you want to draw/make something that certain measures, or when you want something to line up with an existing object. Press 's' to turn snap on (you should see a button turn on and off somewhere in the UI (user interface) when you press it). As default it snaps to grid points, but we don't want that, so right click the snap button to bring up the Grid and Snap Settings, click the Vertex radio button to turn it ON and click the Grid Points radio button, to turn that one OFF. Move your cursor over the vertices and see how it 'snaps' to those points and a small cross turns up when you are around one.
Okay, now click 'Create Line' again, and draw a line between the two vertices you just created, with snap turned on. If snapped isn't turned on, then you won't draw a line that goes from one vertex to another (which is required later on), but a line that is in the vincinity of those two. And in three dimensions it is absolutely imperative to use snap, or otherwise it's impossible to draw a line from one vertex to another... Believe me.
Okay, now refine the newly created segment and draw a line from the most left vertex to the middle of the new segment (where you just made a new vertex) and on to the most right vertex. We are taking this up another notch! :)

As said, snap is important. The new vertices that you draw will come at the EXACT same spot as the ones you are trying to snap them to. This does not mean that you can't distinguish them anymore, you can still select them both, but they need to be at the same place to form a whole.

Vertex Types

Up until now, we have only used Corner vertices (we set that in the complete beginning, remember?). But this way only very square objects could be created. So naturally there's more, there are three other types:

Smooth: Non-adjustable vertices that create smooth continuous curves. The curvature at a smooth vertex is determined by the spacing of adjacent vertices.
Corner: Non-adjustable vertices that create sharp corners.
Bezier: Adjustable vertex with locked continuous tangent handles that create a smooth curve. The curvature at the vertex is set by the direction and magnitude of the tangent handles.
Bezier Corner: Adjustable vertex with discontinuous tangent handles that create a sharp corner. The curvature of the segment as it leaves the corner is set by the direction and magnitude of the tangent handles.

One of the things that probably isn't clear when you read this are 'tangent handles'. These are helpers that you can move around to set the angle of the corner around a vertex. I'll explain some more, with the spline we have made until now.

Go into the vertex sub-object, select the upper left and upper right vertices, hover over one with your mouse until it becomes a cross (the one for moving or selecting, it doesn't matter, as long as you're on one of them) then right click to bring up the Quad Menu. In the upper left corner you see the four different Vertex Types, click 'Smooth'. You can see how your spline has changed, it's smooth around the two vertices you are selecting! Move them down a bit to smooth out the line some more, so that it goes through the middle vertex without a discontinuity of the derivative.

Now select the lower left and lower right vertices, right click one of them, set Vertex Type to Bezier. Now try to move the bezier handles (the orange lines with squares at the end), by moving the squares and see how your splines reacts to it, it tries to keep it smooth no matter what you do: in the vertex the derivative is continuous. This is exactly what it said in the description: 'continuous tangent'.
See if you can make something similar to the shape I made below, it's not hard, but if you can make it match this, then you could make it match (almost) any shape you want.

Select the most right vertices (there are two, but you can only see one, because they're snapped) and set the type to 'Bezier Corner'. This time the bezier handles are there again, but the shape hasn't changed and it's not continuous either. Once more exactly as in the description of this type of vertex: 'discontinuous tangents'. Move each of the three handles around and see what it does with the shape of the spline. This type of vertex I use the most: you can create smooth surfaces that end in a 'square' form, you are in control most with this type of vertex, you could even make it continuous if you wanted it, but also square, this one has it all. It takes effort to get exactly how you want it, but at the end this ones the most powerfull. Yet still, sometimes you don't even need it, for instance when making very smooth objects...

Now that you know the basics and the vertex types, try to fool around, make some trial spline cages, see how it reacts when you make all the vertices of the Smooth or Bezier type, try to understand why it behaves the way it does, because if you do, then and only will you be in control to make whatever you can imagine!
I haven't mentioned the surface modifier yet, but I'll shortly go into what it does and how to use it. The surface modifier is your tool to make something out of you spline cage. Once you have the cage, then apply the modifier and voila, one surface! But there are rules that you have to attend to, to make the surface modifier work the way it should: 'Make sure that the Spline vertices form valid three-sided or four-sided polygons. Vertices on splines that cross one another should be coincident'. Look in the help file that ships with 3D Max under 'surface modifier', you'll find all the information you need there. Again, fool around with different settings for the Surface Modifier, try different Patch Topology Steps, maybe add an additional MeshSmooth... Trial and error is the way.

That's it, this is all I have to say for the time being, maybe you should try to apply the newly acquired knowledge in the next tutorial: Spline Car Modeling.


Great introduction into splines. Much appreciated.

Very clear and Very Helpful !
finally someone has put the answer of 'where is the splines button:P'

anyways...thx for the basics..

ive seen many techniques of modelin a car, the common one was using the splines....
nways...thx again:)
Thats nice! Now I ve understood how this stuff works! Thank you!
Thx for this tutorial. Very clear,and instructive well done.
De snap toggles zien er in 3Dsmax 9 anders uit.
But how do I make it 3d now?!
Wow, thank you, finally someone has put this in english hehe. I have been wanting to learn splines, and I think this really complements the included tutorial. Thank you
Runner Ducati
excellent tutorial for beginers like also...
thanks you to much again...

Very helpful to me as an absolute beginer! Thank you very very much!!