This blog contains the scripts for my Blender 3D YouTube videos. They're published as follows:
Buy The Blender 3D Cookbook as a book!
Buy the Blender 3D Cookbook for your iPad!
Buy the Blender 3D Cookbook for your Kindle!
Thursday, October 1, 2009
Halloween Mask
Modeling with curves is a powerful Blender feature. Few objects in life are pure straight lines. Life continues to throw curves at us. As an example, we're going to make a Halloween mask with Bezier curves.
Blender itself uses Bezier curves extensively. The curves in the IPO window, as an example, are Bezier curves. So if you're going to be animating your scene, you can do a lot more if you understand how to manipulate Bezier curves. There are also some great modeling tools, such as loft modeling and beveling, which rely on Bezier curves. Knowing how to deal with Bezier curves is a fundamental Blender skill.
Start with the default Blender scene and delete the default cube by right clicking it, pressing the delete key, and confirming the delete. We'll work first with a special case of the Bezier curve, the Bezier circle. A Bezier circle is a Bezier curve that just happens to be a circle as well. Like all Bezier curves, and also like mesh objects, the Bezier circle can be moved, scaled, and rotated.
How does the Bezier circle differ from the mesh circle? A mesh circle is defined with a certain number of vertices. The more vertices, the closer the circle looks like a circle. Of course, it's never a perfect circle. You pay a price for more geometry in terms of rendering time and modeling complexity.
A Bezier circle is a true circle, as opposed to a circle mesh, which never can be an exact circle because it's composed of straight edges. We can increase the number of vertices, do smoothing, and other tricks to make it render close to a circle, but it's never an exact circle. Also, mesh circles have modeling problems such as dark edges where normals are inside the mesh, instead of outside the mesh, where the edge can render with light.
Delete the Bezier circle. We'll look at the more general case of Bezier curves. Our goal is to create a mask using Bezier curves, and then to convert it to a mesh.
Start with adding the Bezier curve, with Space-Add-Curve-Bezier Curve. A Bezier curve is a curved line called a spline. At either end are control vertices, which you can select, grab, and move around. In addition to the control vertices, one at either end, there are lines that extend out, which are called control handles. You can select a handle, move it in or out. You control the shape of the curve by controlling the handle. The handle on the left controls the shape of the spline coming in. The handle on the right controls the shape of the spline coming out.
You can add vertices by pressing the Control key while left clicking with your mouse. We'll add a few vertices to start the face. The handles on either side of the control vertices are purple lines. The handles by default are align handles. The other handle aligns with the one you select. You can change from Align to Free by pressing the H key. The handles turn black and you can turn each one individually. One handle controls how the curve moves into the control vertex, the other controls how the curve move out of the control vertex.
For creating a simple outline, the easiest choice is Auto, which you turn on with Shift-H. Auto automatically smooths out the curve coming in and out of the spline. So we'll turn on Auto with Shift H.
Control-Left Click creates an additional control vertex, so you can make a shape from an outline. We'll make the face part of the mask first. Then we'll cut out the eyes and the mouth. We'll add more splines to the curve. You can use the handles to control the shape of the curve. You can select a vertex, in which case the handles are selected as well. You can control the curve path through the handles as well.
When you're done with the outline, and you want to close the curve, select a vertex and press the C key. The curve then closes.
You can create straight line handles easily. Select two adjacent vertices and press the V key. V is for Vector. This makes the curve become a straight line. Press Ctrl-Z to undo this because our mask doesn't have straight lines. Frequently, you will have to model an object, such as a wineglass, that is a mixture of straight lines and curves.
You can still edit the face and add more depth to it.
By default, you control the curve in 2D space. You can't move it in 3D space unless you go to the Curve and Surfaces panel and switch on the 3D button. Then you can grab one of the control vertices and move it in 3D space.
We can also make the mask 3D. Turn on the 3D button and you will see perpendicular lines, like a porcupine, jutting out of the curve. You can extend the curve into 3D if you want.
Now we'll add two eyes, which will be Bezier circles. Do Space-Add-Curve-Bezier Circle. Scale down the circle and press the G key to move it to where the left eye should be. Note that there's a hole cut out of the face for the eye. Press Shift-D to duplicate the circle. Press the G key and position the second circle to where the right eye should be.
Let's make the mouth using another Bezier curve. Do Space, Add-Curve-Bezier Curve. Press Shift-H to go into Auto mode. Add vertices - CTRL-Left Click - until the shape of the mouth looks right. Then press C to close the curve. Select the vertices of the inner circle, press the S key to scale the mouth. Go into object mode.
The Bezier patch is 2D. Let's extrude the mask to give it some depth. As you increase the Extrude value, the mask gets thicker. You can also bevel the mask to round out the edges. The mask can still be edited as you go.
It's time to turn our mask into a mesh object. To do this, tab out of edit mode, and to convert it, do Alt-C to convert to a mesh. From there, all the mesh functions are available. We'll smooth it and add a subsurf modifier. We can do a lot more, in fact, such as changing to face mode and extruding some faces to create a nose, or grabbing some faces and moving them.
To sum up, working with curves is a powerful addition to your modeling arsenal. If you can visualize your object from a curved outline, using curves, including Bezier curves, is a powerful way to create a Blender object from your outline.