Blender 3D: Noob to Pro/Intro to Bezier Curves
|Applicable Blender version: 2.49.|
Bezier curve basics
You wanted curved lines? Well here is how to get them, using Bezier curves.
- First start a new Blender project, and delete the default cube.
- Press: 'SPACE -> Add -> Curve -> Bezier Curve' to create a new curve.
As you can see, there is a black, curvy curve on your screen, inside what looks like a normal mesh (purple).
There are 2 parts you can move on a bezier curve.
- Control Point - Define where each section of the curve starts and finishes.
- Handle Point - Tells the curve how to bend and turn before getting to the destination.
By now you should have discovered you can drag the points around using the GKEY, and that the handles are fixed in position relative to their control point. This is not the only thing you can do.
Here is a list of things you can do to the curve to modify it:
- Grabbing: You can drag the points around separately or in groups.
- Rotating: Using the RKEY, you can rotate a control point around with your mouse. This is different from a mesh, as rotating the control point will move its handles too.
- Scaling: Using the SKEY, you can scale either an individual handle, or a whole control point at once. This changes how strongly a handle influences the curve's shape, not its direction.
Whatever you do to the defining points, Blender calculates the curve so it flows smoothly from one end to the other. When you leave Edit mode, only the black curve will remain visible, so don't worry about your control points getting cluttered!
Noob note: At any time you can convert a Bezier curve into a mesh by entering object mode (tab if in edit mode), hitting ALT-CKEY and selecting 'mesh' from the menu. You may then operate on the mesh like you would any other. This is great for creating a smooth Bezeir curve, converting it to a mesh, and spinning it around an axis.
Extending your curve
So far your curve has only two control points, but in order to build up more complex shapes you will need to add many more! There are quite a few ways to do this, but lets start with the basics:
Much like a mesh, you could use EKEY to extrude one end of your curve with a new control point. Select an end control point (not a handle, this will cause you a few problems) and press EKEY, then LMB when it is in the correct location. The new point will have an exact copy of the handles of your old point, so you will have to rotate and adjust it accordingly.
Noob note: you can use CTRL+LMB to achieve the same effect.
Instead of adding onto the end of you curve, you can also split up sections of it into more control points, and here's how:
- Select two adjacent control points using RMB.
- Press the WKEY, and select Subdivide from the popup menu.
- The segment should now have a new control point mid-way between the first two, that sits exactly on the curve that already exists. Now you can add more shape to this section using the new point.
Filling your curve
So far we have been working with a continuous curve, with a definite beginning and end. But what you can do is turn this wiggly line into a wiggly shape.
- Convert the shape from 3D to 2D in the Object Data panel (near Material). Older versions of Blender defaulted to 2D.
- Select any part of the curve in Edit mode, and press the ALT + CKEY. This will connect your last control point back to the first, and fill in the shape.
- If you cannot see any fill, you are probably in wire-frame mode. Press the ZKEY to recover.
- If you have weird results, say fill leaking out from the curve or empty sections, you have probably got a couple of parts of the curve crossing themselves. Curve sections should never cross if you are making them into a filled shape!
Thus far with curves, whenever you move a handle around, its partner will move too to make the curve flow smoothly through the control point. This is not the only way to do things however, so here is a list of the different things you can set them to do:
- Aligned / Linked rotation (Pink handles): Both handles always point in opposite directions. This leads to a smooth curve.
- Free rotation (Black handles): The handles can be moved independently of each other, you can form corners and sharp bends in the curve.
- Automatic (Yellow handles): The handles are linked in rotation, and automatically rotate and scale to form the nicest (mathematically speaking) smooth curve through your points. If you try to move a handle, both will default back to Linked rotation.
- Vector (Green handles): The handles act as vectors, with each pointing directly towards the next control point. This leads to completely straight edges (assuming the next control point is also a vector), so you can construct polygons. If you move a vector handle, it will default to Free rotation, but the other will stay as a vector.
- Note, that the hotkey for handle type is VKEY, the specific window should occur, then chose from the list.
- Note, each handle from a control point can be assigned a separate type independently (excluding Auto). Just select only the handle vertex instead of the control vertex.
As well as having one single filling curve in your object, you can combine several unconnected curves to create more complex shapes.
- Firstly create a filled shape, as described earlier.
- Now, stay in Edit mode and 'SPACE - Add - Curve - Bezier Curve' to create a new curve on top of your existing one.
- Manipulate the new curve so it fits inside the larger shape somehow, this will not work if the lines intersect.
- Making sure only the new curve is selected, fill it with ALT+CKEY.
You should see that the space enclosed by the inner curve is no longer filled. You can continue by adding more curves inside a larger one, or even a larger one around them all.
Extruding from 2d to 3d
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 Bezier 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 Bezier and NURBS curves.
Make a simple face of bezier curves
- Make a curve and fill it: Use the steps above to create something simple, and fill it in using ALT+CKEY.
Noob note: you may find it easier to use Bezier circles, instead of filling discrete curves.
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:
Using a bevel object
Noob note: After you finish making the filled shape exit to object mode. Then add a curve and rename it to bevel or anything under the Link and Materials tap or just use the given name of the new curve. Then deselect the new curve and select your filled shape. With the filled shape selected type in the name of the new curve that you have just created in the BevOb: box. It is under the Curve and Surface tap at the lower right corner.
This technique allows for much more sophisticated extending of our curves into 3d. Basically, we can create a new curve which will be extruded all the way around our main shape.
- Create a curve: Once again, make a filled shape like our friend the smiley. Noob Translation: In Object Mode, Add a bezier curve, go to edit mode and make a smiley.
- Create a bevel object: Add a new curve and return to Edit mode, leaving it as the default shape. Noob Translation: Go back to object mode and add a new bezier curve (preferably a closed curve using CKEY), then go to edit mode.
- Assign the bevel to the curve: Type the name of the second curve (Default is Curve.001, or just Curve if you used a circle before) into the relevant box in the 'Curve and Surface' menu. Noob Translation: In edit mode (editing the second bezier curve) under the links and materials tab, on the OB: text field, change the name of the curve to bevel (the name doesn't matter though, it just makes it easy to remember. Go back to object mode and select the smiley and go to edit mode. Under the Curve and surface tab on the BevOb: text field write bevel (or the name you chose for the bevel line).
Noob note: DON'T PANIC if you end up with a useless mess! This is expected, as we have yet to understand how the bevel object works.
Noob Note Took me the better part of a morning to work this out. Here is a video tutorial to help anyone else finding it hard to understand http://www.youtube.com/watch?v=m5b43M62Hq4&feature=plcp Hope it helps.
Basically, the curve we created as a Bevel object is used to define the shape of the edge around our filled shape.
- The height of each part of the Bevel object above or below the local X axis is how far in front or behind the filled shape to extrude from the flat curve.
- The distance to the left or right on the local Y axis is how far towards or away from the center of the shape to pull each bit of the curve.
For our purposes, we want very little variation in the width of the bevel. This will hopefully solve the problem of all sorts of bits of the shape overlapping each other.
The default curve also starts and stops on the x-axis, we want to move the start and end points so one is higher than the other. (Preferably either side of the x-axis too, we don't want the extruded shape too far away from its curve).
Assuming you have kept the default new curve for your bevel object:
- Move the left-most point down a whole large grid-square, and right until it is two or three small squares from the main axes.
- Move the other point up a whole grid square, and left until it is roughly on the blue center-line.
- Modify the control handles if you feel it's necessary.
This should leave your shape looking nice and neat, extruded quite a long way with a smooth curving edge. Experiment with the shape, see what works and what doesn't!
Noob note: if you have trouble cleaning up the 'useless mess' after assigning the bevel object to the extruded object, then keep the bevel object close to its central point (not sure what this is actually called, but it is the pink dot that you see when you select the curve). The following steps helped me resolve the 'useless mess'.
- If you are in object mode, change to edit mode, then type A to select the entire curve (you may need to type A twice to first deselect, and then select the curve).
- Now type G to grab and move the curve, move the selected curve over the pink dot that you see, and you should start seeing your extruded object look more like it was before it became the 'useless mess'.
- It may still need some work, so rotate (R) and scale (S) the bevel curve until the edges of your extruded curve match the shape of the bevel curve.
Noob note: When rotating the bevel curve, you might notice that you can easily invert the bevel by rotating it by 180 degrees.
Noob note: The sliders for Extrude, Bevel depth and Bevel resolution are not used once a bevel object is in place.
(To come: Closed shape Bevel Objects)
Front and Back
I would use wood working analogies to communicate what I expected to see and what I saw instead. Using a bevel object I assumed would be very much like using a Router with an Edge molding bit attached. When you run your wood piece thru your router its edge gets shaped/hollowed out. All those nice decorative edge effects, we see on furniture, and joinery aids, we may not even know exist, are generated by routers.
With that hope in mind I created a bevel curve object making sure it was smaller than the Extrusion depth (about 1/5th of it), it was an L looking curve, hoping it will hollow out my Smiley's edges. What I am seeing instead is quite surprising: The buttom 4/5th of my first filled extruded curve (my Smiley equivalent) is removed, top 1/5th remains. As if only the top surface has remained after all that work.
Create a filled, extruded shape
Follow the process above, for speed just use an extrude depth.
Disable Front and Back: Click both 'Front' and 'Back' in the 'Curve and Surface' menu to disable them.
Now you should be able to see right through the curve! Cool isn't it.
Noob note: You can disable just one of the faces and leave the other intact if you like.