Blender 3D: Noob to Pro/Intro to Bézier Curves
- 1 Bézier Curves
- 2 NURBS Curves
- 3 Which Curves To Use?
- 4 Extruding from 2D to 3D
|Applicable Blender version: 2.67.|
- First start a new Blender project, and delete the default cube.
- Press: + → Curve → Bezier to create a new curve. Switch to top view for a clearer look. You may want to zoom in a bit as well. into Edit mode.
The black line with the extra angled lines like centipede legs coming off it is the Bézier curve. The white or orange dots are the control points, with the ones in the middles of the pink handle lines defining the endpoints of the curve segment.
Pressto deselect the selection, so that all the control points turn black, and the lines connecting them turn red. You can on any point to select it; however, selecting a curve endpoint selects the entire handle line passing through it.
You can move a selected point in the usual way, with: note how moving an endpoint causes the curve to bend so it always connects to the endpoint. Moving just a point at the end of a control handle affects the inner part of the curve, making it bend more or less sharply away from the endpoint: try moving one of these points around, and note how the handle gets longer or shorter, and automatically rotates as necessary to remain a single straight line.
Alternatively, you can select an endpoint (which selects the entire control handle, remember) and useto rotate the handle, and to make it longer or shorter.
In the Curve Context in the Properties window, further down you will see the Active Spline panel. (This is only visible in Edit mode.) Note the editable field next to the label “Resolution:”, probably showing “U: 12”. That number governs the number of straight-line segments that the curve is converted into for rendering purposes; the more of these, the smoother the result, but it will add a bit to the render time.
That’s right. As embarrassing as it may sound, Blender cannot actually render curves. It has to approximate each curve by a series of straight-line segments before rendering.
This resolution setting is also used when converting the curve to a mesh (+ ).
Extending Your Curve
So far your Bézier curve only has one segment. You can add segments in several different ways:
- on an endpoint at either end of the whole curve, and use to extend a new curve segment connected to the same endpoint. (We won’t say “extrude”, to avoid confusion with a different extrusion function discussed further down.)
- on an endpoint at either end of the whole curve, and + where the endpoint of the new segment will go; the new segment will immediately be added between the previous endpoint and the new one.
- Select the endpoints of a single curve segment, press and choose “Subdivide” from the menu. This splits the curve segment into two new connected segments.
Note that if you+ when the selection is not precisely one endpoint of the whole curve, it will add a new handle that is not connected to any part of the existing curve. You can extend from this handle to create a whole set of new curve segments that are still part of the same curve object, even though there are no lines running between this piece of curve and the previous one. You can join two separate pieces of the curve with a new segment by selecting an endpoint of each and pressing .
You can also add new pieces with+ in Edit mode.
Curves cannot have branches. However, depending on your purposes, you could simulate the appearance of a branch by overlapping the end of one piece on top of another one.
Removing Points and Segments
You can delete any control points by selecting them and using the familiaror . The menu that pops up asks you if you want to remove the “Selected” points, the “Segment”, or “All”.
- “Selected” removes all points that are part of the same handle(s) as the selected point(s). Removing an endpoint of a curve piece removes the connected segment. Removing an interior endpoint causes the replacement of the curve segments on either side of it with a new one running directly between their remaining endpoints. Thus, the curve piece of which that segment was a part remains a single curve piece afterwards.
- “Segment” removes a segment between two connected endpoints. If neither endpoint was an endpoint of the curve piece, then the remainder of that piece of the curve becomes two disconnected pieces.
- “All” removes all of the control points, leaving an empty curve object!
So far, all the handles on your curve have been aligned. This means that adjacent curve segments are guaranteed to join smoothly. If you select a control point and press, you will get a menu allowing you to set other types for the handle:
- Free means the two parts of the handle on either side of the endpoint are free to rotate independently, so the two curve segments can now meet at a corner.
- Vector means the selected part of the handle points at the other endpoint of the same curve segment, and will keep pointing that way even if you move either endpoint. If you set the part of the handle from the other endpoint pointing back this way to “Vector” as well, then the curve segment becomes a straight line. However, as soon as you explicitly move the handle itself, it reverts to being “free”.
- Automatic is like “aligned”, except Blender will automatically adjust the orientation of the handles as you move the endpoints, to try to keep the curve smooth. Moving either end of the handle will change it back to “aligned” type.
2D Versus 3D
At the top of the Shape panel in the Curve Context in the Properties window, you will see buttons labelled “2D” and “3D”. “2D” means the points of the curve are constrained to lie in a single plane, while “3D” means they are free to be located anywhere in 3D space relative to each other. Initially “3D” should be selected.
Try moving one point along the Z axis. Now click the “2D” button, and you should see all the points you moved snap back into the same plane as the rest. Also the “centipede legs” along the curve should have disappeared (their presence indicates a 3D curve). You can alter the orientation of this plane bybing into Object mode and then rotating the whole curve about any desired axis.
Closing, Filling and Extruding
Each curve piece can be individually closed, meaning that an extra curve segment is automatically added between the two endpoints of the piece. This is governed by the “Cyclic: U” checkbox in the Active Spline panel in the Curve Context . Each closed piece of a 2D curve is automatically filled to form a flat surface.
What happens if two filled pieces of a 2D curve cross? If you try this, you will see that the overlapping parts are subtracted from the filled areas, leaving holes. Those familiar with the various options for filling Bézier curves in 2D drawing programs will recognize this as the even-odd fill rule.
The curve can also be extruded into the third dimension, effectively turning it into a ribbon-like shape. Look for the “Extrude:” editable field in the Geometry panel, and put a nonzero value into that to specify the extrude width.
If you extrude a 2D closed curve, the flat surface becomes a solid object, and the result is a prism—a solid shape with a uniform, but arbitrarily complicated, cross-section.
Scaling and Tilting
Turn your curve into a ribbon by specifying a nonzero Extrude value. Change your view so it is not exactly from the top or bottom, but at some angle. Notice how the ribbon is of constant width and always perpendicular to the plane of your curve.
Select an endpoint, and press+ . As you move the mouse, you are changing the radius of the endpoint from its default 1.0 value, and this causes a corresponding scale factor to be applied to the width of the ribbon at that point. You can see (and also edit) this radius value in the Properties Shelf , in the Transform panel at the top.
With an endpoint selected, now try+ (Note: This only has an effect with 3D curves, not 2D ones). Now as you move the mouse, you are applying a tilt angle, which correspondingly alters the angle of the ribbon at that point. This value is also accessible in the Transform panel in the Properties Shelf.
The scale radius and tilt become particularly useful when you apply a bevel shape to the curve—then you will start to get much more complicated shapes than simple ribbons.
Start a new Blender document, and get rid of the default cube.
This time, do+ → Curve → Nurbs Curve, and into Edit mode. The result looks a bit similar to a Bézier, except there are no control handles, only the segment endpoints. Instead of dragging handles, you can adjust a weighting assigned to each control point. Bring up the Properties Shelf with if it is not already visible. If you have a single point selected, in the Transform panel at the top, you should see four editable fields under the heading “Control Point:”, labelled “X:”, “Y:”, “Z:”, and “W:”. The first three are of course the position of the point; the “W” value is like a gravitational field strength that attracts the curve to the point. Try adjusting this, and see how it influences the shape of the curve near that point.
Ignore the “Weight:” field further down. That has a different purpose we won’t discuss here.
You can move endpoints in the usual way, but there are no handles to rotate. All the other options for add and deleting endpoints apply as for Bézier curves:+ or xtend, →Subdivide, eting Select/Segment/All. The curve can be 2D/3D, extruded and cyclic, and each endpoint has a + cale radius and a + ilt angle. In the “Active Spline” panel in Object Properties, there is an additional “Endpoint: U” checkbox which forces the curve to pass through the endpoints (this is ignored if Cyclic is enabled).
You can mix Bézier and NURBS curve pieces in the same curve object. Just use+ to start a new piece of the desired type in Edit mode.
+ →Curve→Nurbs Circle inserts a NURBS curve with eight control points arranged in a square, “Cyclic: U” enabled, and the weights of the corner points adjusted so the curve is an exact circle.
+ →Curve→Path inserts a NURBS curve with five control points in a straight line, and the “Endpoint: U” option already checked.
Which Curves To Use?
As mentioned earlier, NURBS curves are heavily used in CAD applications, while Béziers are popular in 2D drawing applications. If you are importing data from these applications, then you won’t have any choice about which one you end up with.
But if you are creating your own curves, then you have a choice. If you have done drawing with Bézier curves a lot, then you should feel at home with them. If you just want simple curves to deform a shape or guide an animation, NURBS curves could very well do the trick—you could even leave the W values at the default, and just add, delete and position points to get a suitable curve.
Extruding from 2D to 3D
|Applicable Blender version: 2.49.|
You may have noticed you can only modify the curve in two dimensions, and now it's time to explore the third dimension! Extruding is where you define a two dimensional 'profile' shape, and it is 'swept' through space to create a volume.
Noob note Bézier circles are not true circles, they are approximations. For artistic purposes, this may not really matter, but for precision modelling only NURBS circles should be used. This is due to the math used to describe the Bézier and NURBS curves.
Make a Simple Face of Bézier Curves
- Make a curve and fill it: Being sure you are in 2D mode, Use the steps above to create something simple, and fill it in using + .
Noob note: you may find it easier to use Bézier circles, instead of filling discrete curves.
Note that the eyes and mouth of the face above are parts of the same curve object. Blender can only identify holes in a filled curve if the holes are part of the same object as the outer curve. If you had created four separate curves then filling the outer curve would have covered the eyes and mouth. To create a detached section of a curve, be in edit mode and deselect all the points (). Then create new points (you will need two or three) with + . Alternatively you can create the pieces as separate curve objects and join them later with + in object mode. You might prefer the alternative way if you don't want a lot of control handles and "centipede legs" to distract you.
Extrude the Simple Face
Set the extrude depth: Click on the Object Data button and find the Geometry panel. (Older versions: find the 'Curve and Surface' box in the Editing tab of the Buttons window.) There is a slider called Extrude. Set the Extrude depth to something other than 0, and probably less than 1.
Behold, your 2d curve has transformed into a neat 3d structure. The great thing is, you can still edit the curve as if it were just 2d, and the changes will update in real time.
Bevel the Simple Face
Now you have an extruded shape, you should start playing around with some of the other curve settings on offer, so here is a description of how the Bevel depth and Bevel resolution sliders work.
Try setting the Bevel depth to a small value, say 0.02. This will cut off all of the sharp edges, and give a bevelled effect all around the shape.
As you may guess, Bevel resolution decides how many times the algorithm divides up an edge. Higher values than 0 result in smooth curves rather than sharp edges, but dramatically increase the number of vertices in the shape.
Try setting the resolution to 3 or 4, you should see an effect like this: