Blender 3D: Noob to Pro/Intro to Bezier Curves
From Wikibooks, the open-content textbooks collection
Per request, this page is currently being edited to be more "tutorial like" and user friendly.
The work can be found in its Original Version (which is currently being displayed) and the Edited Version (which could be an option to replace this page).
Contents |
[edit] Bezier curves
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). Well you wouldn't be far wrong with that interpretation, because that is effectively what a Bezier curve is!
- Try selecting the vertices and moving them as we have done previously. You should notice they behave much like a normal mesh does, but with a few important differences. Firstly, there are two types of point here, a 'control' point, and a 'handle' point. The control points define where each section of the curve has to start and finish, while the two pink handles help guide the curve between them.
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 maneuvre however, so 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.
[edit] 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:
- Extruding: Much like a mesh, you can 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.
- Note you can use CTRL+LMB to achieve the same effect.
- Subdividing: 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 existed. Now you can add more shape to this section using the new point.
[edit] 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.
- Select any part of the curve in Edit mode, and press the 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!
[edit] Handle types
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:
- 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 independantly of each other, you can form corners and sharp bends in the curve. Switch between these two modes using HKEY.
- 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. Use SHIFT+HKEY to switch to this mode. 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, so you can construct polygons. The hotkey is VKEY. If you move a vector handle, it will default to Free rotation, but the other will stay as a vector.
- Note, each handle from a control point can be assigned a separate type independantly (excluding Auto). Just select only the handle vertex instead of the control vertex.
[edit] Combining curves
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 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.
[edit] Extruding
[Noob: I find that this is much easier to do using Bezier circles instead.] You may have noticed you can only modify the curve in two dimensions, and now its 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.
[edit] Simple Extrude
If you want to make your curve 3d, the fastest way is to use the extrude slider. This simply extends your curve backwards by the specified distance to make a 3d object.
- Make a curve and fill it: Use the steps above to create something simple, and fill it in using CKEY.
- Set the extrude depth: Find the 'Curves and Surfaces' box in the Editing tab of the Buttons window. There is a slider on the right hand side 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.
[edit] Bevel
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:
[edit] Bevel Objects
[Noob: I couldn't understand what this topic was supposed to do. Could someone explain better and include images? Thanks...][2ND NOOB: I couldn't understand this either. Heck, I don't even have a typable field in 'Curve and Surface'... Help on this section would be extremely useful...]
[Noob answering: 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. Hope that helps :)]
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 ad a new bezier curve, 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).
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.
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: I had trouble cleaning up the 'useless mess' after assigning the bevel object to the extruded object. What I found was that I needed to keep the bevel object close to it's 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.
- NB: When rotating the bevel curve, you might motice that you can easily invert the bevel by rotating it by 180 degrees.
- NB: 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)
[edit] 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.
[edit] ======================================================
Below is some tip from one other user. I was afraid to remove it from my note in case, instead of creating a new note, I ended up modifying an existing one
[edit] ======================================================
- 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.
- NB: You can disable just one of the faces and leave the other intact if you like.
