Chapter 5. Modeling with NURBS, Subdivisions, and Deformers

As you saw in the previous chapter, NURBS are based on organic mathematics that allows you to create smooth curves and surfaces. NURBS models can be made of a single surface molded to fit, or they can be a collection of patches connected like a quilt. In any event, NURBS provide ample power for creating smooth surfaces for your models.

Now that you have learned the basics of creating and editing poly meshes, getting into NURBS models and more advanced modeling techniques will easily become part of your toolbox. This chapter explains how to use deformations to adjust a model, as opposed to editing the geometry directly as you did with the previous modeling methods. It also introduces subdivision surface modeling, which fully incorporates this concept.

Topics in this chapter include:

  • Making and Editing NURBS

  • Creating Polygons from NURBS

  • Patch Modeling: The Locomotive

  • Sculpting NURBS

  • Modeling Deformers

  • Animating Through a Lattice

  • Subdivision Surfaces

  • Creating a Starfish

  • Building a Teakettle

NURBS!

NURBS modeling depends on surfaces that are created using curves. Just as control vertices (CVs) are connected to form curved lines, NURBS surfaces are created by connecting (or spanning) curves. Therefore, typical NURBS modeling pipelines first involve the creation of curves that define the edges, outline, paths, and/or boundaries of surfaces.

Once a surface is created, its shape is defined and governed by its isoparms. These surface curves, or curves that reside solely on a surface, show the outline of a surface's shape much as the chicken wire in a wire mesh sculpture does. CVs on the isoparms define and govern the shape of these isoparms just as they would regular curves. So, in short, adjusting a NURBS surface involves manipulating the CVs of the object somewhat like sculpting.

You can create a NURBS surface in several ways. The easiest way is to create a NURBS primitive. You can sculpt the primitive surface by moving its CVs, but you can also cut it apart to create different surface swatches or patches to use as needed, which you will see in a Steam Pump model for the locomotive later in this chapter. A primitive need not retain its original shape, and it frequently can be shaped to fit the artist's needs. Using the surfacing tools available under the Surfaces menu set, you can detach, cut, and attach pieces into and out of a primitive to get the exact shapes you need.

You can also make surfaces in several ways without using a primitive. All these methods involve first creating or using existing NURBS curves, or curves on another surface, to define a part or parts of the surface and then use one of the methods described in the following sections to create the surfaces.

The Lofting Method

The most common surfacing method is lofting, which takes at least two curves and creates a surface span between each selected curve in the order in which they are selected. Figure 5.1 shows the result of lofting two curves together.

A simple loft created between two curves

Figure 5.1. A simple loft created between two curves

To create a loft, follow these steps:

  1. Switch to the Surfaces menu set (press F4).

  2. Draw the two curves.

  3. Select the curves in the order in which you want the surface to be generated.

  4. Choose Surfaces → Loft or click the Loft icon in the Surfaces shelf (

    A simple loft created between two curves

When you define more curves for the loft, Maya can create more complex shapes. The more CVs for each curve, the more isoparms you have and the more detail in the surface. Figure 5.2 shows how four curves can be lofted together to form a more complex surface. Indeed, you can use almost any number of curves for a lofted surface.

A loft created with four curves that are selected in order from left to right

Figure 5.2. A loft created with four curves that are selected in order from left to right

Lofting works best when curves are drawn as cross-sectional slices of the object to be modeled. Lofting is used to make a variety of surfaces, which may be as simple as tabletops or as complex as human faces.

Revolved Surface

A revolved surface requires only one curve that is turned about a point in space to create a surface, like a woodworker shaping a table leg on a lathe. First you draw a profile curve to create a profile of the desired object, and then you revolve this curve (anywhere from 0 degrees to 360 degrees) around a single point in the scene to create the surface. The profile will revolve around the object's pivot point, which is typically placed at the origin but can be moved (as seen in the Solar System exercise in Chapter 2, "Jumping in Headfirst, with Both Feet."), and sweeps a new surface along its way. Figure 5.3 shows the profile curve for a wine glass.

A profile curve is drawn in the outline of a wine glass in the Y-axis.

Figure 5.3. A profile curve is drawn in the outline of a wine glass in the Y-axis.

The curve is then revolved around the Y- axis a full 360 degrees to create the wine glass. Figure 5.4 is the complete revolved surface with the profile revolved around the Y-axis.

To create a revolved surface, draw and select your profile curve and then choose Surfaces → Revolve.

A revolved surface is useful for creating objects such as bottles, furniture legs, and baseball bats—anything that is symmetrical about an axis.

The revolved surface

Figure 5.4. The revolved surface

Extruded Surface

An extruded surface uses two curves—a profile curve and a path curve. The profile curve is drawn to create the profile shape of the desired surface. It is then swept from one end of the path curve to its other end, creating spans of a surface along its travel. The higher the CV count on each curve, the more detail the surface will have. An extruded surface can also take the profile curve and simply stretch it to a specified distance straight along one direction or axis, doing away with the profile curve. Figure 5.5 shows the profile and path curves, and Figure 5.6 shows the resulting surface once the profile is extruded along the path.

To create an extruded surface, follow these steps:

  1. Draw both curves.

  2. Select the profile curve.

  3. Shift+click the path curve.

  4. Choose Surfaces → Extrude.

An extruded surface is used to make items such as winding tunnels, coiled garden hoses, springs, or curtains.

The profile curve is drawn in the shape of an I, and the path curve comes up and bends toward the camera.

Figure 5.5. The profile curve is drawn in the shape of an I, and the path curve comes up and bends toward the camera.

Once extruded, the surface becomes a bent I-beam.

Figure 5.6. Once extruded, the surface becomes a bent I-beam.

Planar Surface

A planar surface uses one perfectly flat curve to make a two-dimensional cap in the shape of that curve. It does this by laying down a NURBS plane (a flat square NURBS primitive) and carving out the shape of the curve like a cookie cutter. The resulting surface is a perfectly flat, cutout shape, also known as a trimmed surface because the "excess" outside the shape curve is trimmed away.

To create a planar surface, draw and select the curve and then choose Surfaces → Planar.

You can also use multiple curves within each other to create a planar surface with holes in it. A simple planar surface is shown on the left side of Figure 5.7. When a second curve is added inside the original curve and both are selected, the planar surface is created with a hole. On the right side is the result when the outer curve is selected first and then the inner curve is selected before Surfaces → Planar is chosen.

A planar surface based on a single curve (left). A planar surface based on a curve within a curve to create the cutout (right).

Figure 5.7. A planar surface based on a single curve (left). A planar surface based on a curve within a curve to create the cutout (right).

A planar surface is great for flat lettering, for pieces of a marionette doll or paper cutout, or for capping the ends of a hollow extrusion. Planar surfaces are best left as flat pieces, however, as deforming them may not give the best results. In addition, it sometimes is best to create the planar surface as a polygon. You will see how to convert surfaces to polygons later in this chapter. However, the following quick exercise will give you an idea of what to look out for when creating polygons from surfacing techniques:

  1. In the Surfaces menu set, select Create → NURBS Primitives → Circle twice to create two circles.

  2. Scale the second circle to about three times its original size, as shown in Figure 5.8.

  3. Select the larger circle first, then the smaller circle, and finally select Surfaces → Planar

    A planar surface based on a single curve (left). A planar surface based on a curve within a curve to create the cutout (right).
    Scale the circle up.

    Figure 5.8. Scale the circle up.

    Choose these options.

    Figure 5.9. Choose these options.

  4. Depending on how you create the geometry as polygons, you will get different results—particularly around curves. Because Maya has to figure out where to put more faces to create a smoother outline, you will have to set the Number U and Number V settings to best fit the curves of your resulting surface. At the current settings, your planar surface will look as shown in Figure 5.10. Notice the small gaps between the original outer NURBS circle and the surface outline.

  5. Increase the Number U and Number V values and you will get tighter results at curves, although you will have more faces on your model.

Keep this exercise in mind as you continue modeling. Whenever you need to create polygons from NURBS surfaces, which should be quite often for some, try the different creation methods for the best output. No one way works best all the time.

Note

If you try creating a planar surface using a curve and notice that Maya does not allow it, verify that the curve(s) is perfectly flat. If any of the CVs are off the same plane as the others, the planar surface will not work.

Notice the gaps between the outer NURBS circle and the outline.

Figure 5.10. Notice the gaps between the outer NURBS circle and the outline.

Beveled Surface

The Bevel Surface function takes an open or a closed curve and extrudes its outline to create a side surface. It creates a bevel on one or both corners of the resulting surface to create an edge that can be made smooth or sharp (see Figure 5.11). The many options in the Bevel tool allow you to control the size of the bevel and depth of extrusion, giving you great flexibility. Once a bevel is created, you can easily cap the bevel with planar surfaces.

A curve before and after it is beveled. The beveled surface has been given a planar cap.

Figure 5.11. A curve before and after it is beveled. The beveled surface has been given a planar cap.

To create a bevel, draw and select your curve and then choose Surfaces → Bevel.

Maya also offers a Bevel Plus surface, which has more creation options for advanced bevels. A beveled surface is great for creating 3D lettering, for creating items such as bottle caps or buttons, or for rounding out an object's edges.

Boundary Surface

A boundary surface is so named because it is created within the boundaries of three or four surrounding curves. For example, two vertical curves are drawn opposite each other to define the two side edges of the surface. Two horizontal curves are then drawn to define the upper and lower edges. These curves can have depth to them; they need not be flat for the boundary surface to work, unlike the planar surface. Although you can select the curves in any order, it is best to select them in opposing pairs. In Figure 5.12, four curves are created and arranged to form the edges of a surface to be created. First select the vertical pair of curves, as they are opposing pairs, and then select the second two horizontal curves before choosing Surfaces → Boundary.

A boundary surface is useful for creating shapes such as car hoods, fenders, and other formed panels.

Combining Techniques

You can use certain surfacing techniques in combination to create intricate models. For example, whenever a curve is required for a surface, you can use an isoparm instead to create a surface between two existing surfaces.

Four curves are arranged to create the edges for a surface (left). The resulting boundary surface formed from the four curves (right).

Figure 5.12. Four curves are arranged to create the edges for a surface (left). The resulting boundary surface formed from the four curves (right).

Two lofted surfaces with two curves in between

Figure 5.13. Two lofted surfaces with two curves in between

Try This

Take a couple of lofted surfaces and connect them with a third surface. Figure 5.13 shows two surfaces with two intermediate curves in between them. (Notice that the view panel's option Shading → X-ray is turned on so you can see through the shaded surfaces.) You will select an isoparm from the first surface (on the left) and then the curve on the left, the curve on the right, and finally an isoparm on the second surface.

Two lofted surfaces with two curves in between
  1. Either create two lofted surfaces and curves as shown in Figure 5.13, or load the Chap_5_Lofting_Exercise_1.ma file from the Lofting_Exercise project on the CD.

  2. To select the first isoparm, press F8 for Component Selection mode and click the Lines Selection Filter button (

    Two lofted surfaces with two curves in between
  3. Select an isoparm close to the left edge. Press F8 to return to Object Selection mode (or you can right-click the first curve and choose Object Mode from the marking menu) and then Shift+click the first curve and then the second curve. Press F8 again or use the marking menu again for Component mode, and Shift+click an isoparm toward the left edge on the second surface, as in Figure 5.14.

  4. Choose Surfaces → Loft to create the intermediate surface between the existing lofts. Figure 5.15 shows how the new surface snakes from the first loft to the second loft by way of the two curves.

Selecting the isoparm

Figure 5.14. Selecting the isoparm

The spanning loft between the existing surfaces snakes from the first isoparm to the curves to the second isoparm.

Figure 5.15. The spanning loft between the existing surfaces snakes from the first isoparm to the curves to the second isoparm.

Surface History

In Chapter 3, "The Maya 2009 Interface," you learned that clicking the History icon (

Surface History

Leaving History on when creating NURBS surfaces allows the surface to update when any of its creation pieces change. For example, the loft you just created will update whenever the two original surfaces or curves you used to create the loft move or change shape. If you were to move the original loft on the left and rotate it back a bit, the new loft would adjust to keep its one side attached to the same isoparm. If one or more of the input curves were to change, the loft would bend to fit.

Note

You must toggle History on before you create the object(s) if you want history to be on for the object(s).

By lofting using isoparms and with History toggled on, you can keep the new surface permanently attached to the original loft, no matter how the isoparms move, as in Figure 5.16. This technique works with all surface techniques, not just with lofting, as long as history is turned on. History is useful for making adjustments and fine-tuning a surface, and it can be handy in animation if several surfaces need to deform but stay attached.

Why wouldn't you want History turned on for everything? After a long day modeling, having History on for every single object can slow down your scene file, adding unnecessary bloat to your workflow. But it is not typically a problem on most surface types unless the scene is huge, so you should leave it on while you're still modeling.

If you no longer want a surface or an object to retain its history, you can selectively delete it from the surface. Select the surface and choose Edit → Delete by Type → History. You can also rid the entire scene of history by choosing Edit → Delete All by Type → History. Just don't get them mixed up!

History will update the newly created loft to keep it attached to the isoparms and curves used to create it, even when they've been moved or altered.

Figure 5.16. History will update the newly created loft to keep it attached to the isoparms and curves used to create it, even when they've been moved or altered.

Using NURBS Surfacing to Create Polygons

You can create swatches of polygon surfaces by using NURBS surfacing tools, as you saw with the exercise on creating a planar surface.

To create a polygonal surface with any of the surfacing techniques in this chapter, open the option box for that particular NURBS tool. For example, create two simple curves. With both curves selected, choose Surfaces → Loft

Using NURBS Surfacing to Create Polygons

History for the surface will adjust the new polygonal surface. The detail of the surface will try to adjust as changes to the input curves are made. If you anticipate significant changes to the input curves, make sure to create the poly surface with a high poly count to accommodate major changes. This is probably the best way to create a single poly surface, especially if you prefer a NURBS workflow.

Try This

Draw two CV curves as you did at the beginning of this chapter, both with the same number of CVs. Open the Loft option box and click the Polygons option for the Output Geometry.

The creation options that appear at the bottom of the window affect the tessellation of the resulting surface; that is, you use them to specify the level of detail and the number of faces with which the surface is created. Generally speaking, the more faces there are, the more detail you'll need. (That doesn't mean a detailed surface can't be efficient, with areas of high tessellation placed only where needed.)

The default Tessellation Method, Standard Fit, will use the fewest faces to create the surface without compromising overall integrity. The sliders adjust the resulting number of faces in order to fit the finer curvature of the input curves.

The lower the Fractional Tolerance, the smoother the surface and the greater the number of faces you'll need.

The Chord Height Ratio determines the amount of curve in a particular region and calculates how many more faces to use to give an adequate representation of that curved area with polygons. This option would be best used with surfaces that have multiple or very intense curves.

It is not uncommon to create a surface, undo it, change slider settings, and re-create it again and again to get just the right tessellation. That's why you should click the Apply button, which keeps the window open, rather than the Loft button, which closes the window after applying the settings.

The General Tessellation Method creates a specific number of lines, evenly dividing the horizontal (U) and vertical (V) into rows of polygon faces.

The Control Points method tessellates the surface according to the number of points on the input curves. As the number of CVs and spans on the curves increases, so too does the number of divisions of polygons.

The Count method simply relies on how many faces you tell it to make—the higher the count, the higher the tessellation on the surface. Experiment with the options to get the best poly surface results.

Converting a NURBS Model to Polygons

Some people prefer to model on NURBS curves and either create poly surfaces or convert to polygons after the entire model is done with NURBS surfaces. Ultimately, you will find your own workflow preference, but it helps greatly if you are comfortable using all surfacing methods. Most modelers choose one way or another but are familiar with both methodologies. In the following section, we will convert a NURBS model to polygons.

Try This

Convert a NURBS modeled axe into a poly model like one that might be needed in a game.

Converting a NURBS Model to Polygons

Open axe_model_v1.mb in the Scenes folder of the Axe project on the CD. The toughest part of this simple process is getting the poly model to follow all the curves in the axe with fidelity, so you'll have to convert parts of the axe differently. Follow these steps:

  1. Grab the handle and choose Modify → Convert → NURBS to Polygons

    Converting a NURBS Model to Polygons
  2. Select the back part of the axe head. All those surfaces are grouped together to make selection easy. The default settings will work for this part as well, so click Apply and move the resulting model eight units to the left.

  3. The front of the axe head holds a lot of different arcs, so you'll have to create it with finer controls. Change Fractional Tolerance from 0.01 to 0.0005. This will yield more polygons, but finer curved surfaces. Figure 5.17 shows the result.

If you were following this process for a conventional game engine, you would normally be restricted to a low number of polygons and your axe design would be different to better handle a low poly count.

A faithful high-poly conversion (on the right) of the NURBS axe (on the left)

Figure 5.17. A faithful high-poly conversion (on the right) of the NURBS axe (on the left)

Editing NURBS Surfaces

As you've experienced, Maya provides numerous NURBS tools you'll find useful when editing your surfaces. Besides tools for moving CVs, some important functions and tools allow you to add realism to your model. This section gives you a quick overview of these tools—some you've already used and others you'll need to try out for yourself.

The following functions are all accessed through the Edit NURBS menu. Open and tear off the Edit NURBS menu to allow it to remain open as you follow along here. (For more on tear-off menus, see Chapter 3.)

Project Curve on Surface

The ability to project a curve onto a surface allows you to cut holes in the surface using the Trim tool (choose Edit NURBS → Trim Tool). It also allows you to create, using history, another surface that is attached, following the outline of your projected curve, as you saw in the section "Combining Techniques" earlier in this chapter.

Similar to drawing a curve on a surface, projected curves project an existing curve onto the selected surface. That curve on surface is now useful for patch modeling as well as tracing animation paths for objects to follow along a surface. For example, you can project a curve around a hilly landscape surface and assign a car to animate (drive) along that projected curve. The car will stick to the surface of the road with ease.

To use Project Curve on Surface, select the surface and the curve to project, and then choose Edit NURBS → Project Curve on Surface.

Trim and Untrim Surfaces

Trimming a surface (choose Edit NURBS → Trim Tool) creates holes in your surface using curves that are either drawn or projected onto the surface.

If you have a surface that has already been trimmed, and it's too late to reverse the function with Undo, you can use Untrim Surfaces to remove either the last trim performed or all the surface trims by choosing Edit NURBS → Untrim Surfaces.

Attach Surfaces

Attach Surfaces will do exactly that—attach two contiguous NURBS surfaces along two selected isoparms. Select an isoparm on the edge of the first surface, Shift+click an edge isoparm on a second surface, and choose Edit NURBS → Attach Surfaces to create a new surface of the two. As shown in Figure 5.18, the attach point will be along the selected isoparms.

Attach Surfaces connects surfaces along their selected isoparms.

Figure 5.18. Attach Surfaces connects surfaces along their selected isoparms.

Detach Surfaces

Detach Surfaces is a highly useful tool for generating specific areas of a NURBS surface, or patches. Select an isoparm to define the line of detachment, and choose Edit NURBS → Detach Surfaces. The surface will be cut along that isoparm to create two distinct surfaces (see Figure 5.19). You will see plenty of Detach and Attach tools later in this chapter.

Detach Surfaces cuts a surface at the selected isoparms to create a new surface.

Figure 5.19. Detach Surfaces cuts a surface at the selected isoparms to create a new surface.

Note

To select an isoparm that is not displayed on the surface, click a viewable isoparm and drag the mouse to place the isoparm selection elsewhere on the surface. Release the button to make the selection; a dashed isoparm line is now selected. This is a valid surface isoparm, but it is not one used to define the number of spans in the surface.

Inserting isoparms for a smoother deformation

Figure 5.20. Inserting isoparms for a smoother deformation

Insert Isoparms

You've already come upon a modeling assignment for which you needed extra surface definition (that is, more spans) on a NURBS object. As you've already seen, it's a matter of selecting an isoparm, and choosing Edit NURBS → Insert Isoparms. This creates an isoparm and redefines the surface to add more spans. This function is used to make extra detailed parts of a NURBS surface to allow for smoother deformations, for example, adding an isoparm or two to the elbow joint of a model to make the arm bend with a cleaner crease (see Figure 5.20). You can either create a new isoparm between two already existing ones or add isoparms to your own defined area.

Patch Modeling: A Locomotive Detail

With NURBS modeling, you frequently need to attach surfaces so that a model does not split at the seams. This process of aligning and attaching NURBS patches is called stitching; and this kind of modeling is called patch modeling.

The finished pump elements for the previous chapter's locomotive model are created in NURBS patches.

Figure 5.21. The finished pump elements for the previous chapter's locomotive model are created in NURBS patches.

In this exercise, we jump back in time to create an element for the Locomotive Modeling exercise in the previous chapter. We will create a pump for the polygonal locomotive we made in Chapter 4, "Beginning Polygonal Modeling," using patches that we will stitch together. This exercise gives you more of an idea of how patches work to pull together an organic shape using NURBS shapes. To give you an idea of what we are seeking to build, the finished model is shown in Figure 5.21.

Keep in mind that patch modeling is a fairly involved process. If you do not feel comfortable with modeling quite yet, skip this tutorial and move on to the next section in this chapter, "Using Artisan to Sculpt NURBS." You can always return to this section to bone up on your patch modeling later.

Starting the NURBS Pump

Starting the NURBS Pump

First, create a new project called Locomotive, or copy the Locomotive project from the CD to your hard drive and set it as your current project.

To start the locomotive pump, follow these steps:

  1. Create a NURBS cylinder with no caps by choosing Create → NURBS Primitives → Cylinder

    Starting the NURBS Pump
  2. Size the cylinder down to 0.72 in X and Y and to 0.9 in Z.

  3. Now we will "reset" the cylinder so that its attributes are set back to normal. With the cylinder selected, choose Modify → Freeze Transformations

    Starting the NURBS Pump
    The first NURBS cylinder, after Freeze Transforms

    Figure 5.22. The first NURBS cylinder, after Freeze Transforms

  4. Now we'll create slightly larger end pieces for the cylinder. Duplicate the cylinder once, move the copy, and scale it as shown in Figure 5.23. Repeat to create the other end piece. The end pieces are roughly 1.075 in Scale X and Y and 0.18 in Scale Z and are moved just slightly past the ends of the cylinder, leaving a slight gap as shown. You should freeze transforms on the ends to reset their scale and positions back to the default.

    Create the end pieces.

    Figure 5.23. Create the end pieces.

  5. Now we will create a second copy of this assembly that is smaller in radius but is the same length (Figure 5.24). Duplicate the three cylinders, and change their respective scales to 0.55 in X and Y, but leave Scale Z set to 1. Remember, you froze their transforms, so their starting scales should have all been at 1. Now position the three cylinders as shown in Figure 5.24, slightly to the side and above the original larger cylinders. Freeze their transforms.

    Create a smaller copy of the first cylinders and place them higher for the top of the steam pump assembly.

    Figure 5.24. Create a smaller copy of the first cylinders and place them higher for the top of the steam pump assembly.

  6. Next we will cut a couple of holes in the main cylinders. We will cut at the top two isoparms on the sides of the larger cylinder first, as shown in Figure 5.25. To select the first isoparm, right-click the cylinder, choose Isoparm from the marking menu, and click the isoparm to select it. Next Shift+click the isoparm on the other side so that both are selected.

    Select these isoparms to cut the top of the cylinder.

    Figure 5.25. Select these isoparms to cut the top of the cylinder.

  7. In the Surfaces menu set, choose Edit NURBS → Detach Surfaces. The surface between the isoparms you just selected is now its own surface and can be deleted. This will give you your first cut, as shown in Figure 5.26.

  8. We will use the same procedure to cut the smaller cylinder, but at the sides so we can remove the bottom half entirely. Select the isoparms on the sides of the smaller cylinder, and detach the surface by choosing Edit NURBS → Detach Surfaces again. Delete the bottom surface. Now your model should look like Figure 5.27.

Cutting the cylinder's top

Figure 5.26. Cutting the cylinder's top

The cut cylinders

Figure 5.27. The cut cylinders

Note

If detaching the surface does not work the first time, select the same isoparms again and detach surfaces again. This sometimes happens when you try to cut a NURBS surface at a side isoparm where the surface is beginning and ending.

End Caps

End Caps

At this point, we will cap the ends of the cylinders to close them off. You can continue with your own file or load the file NURBS_pump_v01.mb from the Locomotive project on the CD and check your work so far. The trick here will be to add four isoparms using the Insert Isoparms function you read about earlier in this chapter to create the caps.

To cap the ends, follow these steps:

  1. Select the end cylinder, right-click the geometry, and select Isoparm from the marking menu. Select four isoparms (make sure you hold down Shift while selecting the isoparms so as not to deselect them) as shown in Figure 5.28, and choose Edit NURBS → Insert Isoparms

    End Caps
    Select these four isoparms.

    Figure 5.28. Select these four isoparms.

    The default Insert Isoparm settings

    Figure 5.29. The default Insert Isoparm settings

    Make sure your settings match those in Figure 5.29. This will insert four isoparms into the end cylinder that you can use to close the end to make the cap.

  2. Select the end CVs to scale them down to close the cap. The easiest way to do this is to select the hull that controls all the edge CVs. Right-click the end cylinder, and select Hull. Select the very outermost hull, and scale it down as shown in Figure 5.30. This will close the end cap. Don't worry about leaving a small hole in the cap; you'll complete this pump when we complete the locomotive model.

    Scale down the outermost hull.

    Figure 5.30. Scale down the outermost hull.

  3. Repeat the previous procedures to close off the other three end cylinders to create caps for both ends of both objects, as shown in Figure 5.31.

    End caps for the pump pieces

    Figure 5.31. End caps for the pump pieces

  4. Next we need to connect and patch the end caps to their cylinders. To do this, we will need to line up a few new isoparms on the cylinders to allow us to stitch everything together properly. Using the previous workflow, add new isoparms to the bottom cylinder, as shown in Figure 5.32. (You may have to hide the end caps to create the isoparms on the cylinder. Select the end caps and use Display → Hide → Hide Selection. After you create the isoparms, select Display → Show → Show All.)

    Add isoparms as shown.

    Figure 5.32. Add isoparms as shown.

    Select isoparms and detach surfaces.

    Figure 5.33. Select isoparms and detach surfaces.

    Select isoparms and detach surfaces.
  5. You will now need to prep the end cap to connect to the cylinder, by cutting a pie piece out of the cap itself, to line it up with the cut cylinder. On the end cap, select two isoparms to form a V that lines up with the cut edges of the main cylinder, as shown in Figure 5.33. Then choose Edit NURBS → Detach Surfaces. This will cut the V section out of the end cap. This aligns the end cap and the cylinder geometry at the edges so we can create a smooth connection between them in the next few steps.

    Select the four end hulls and move them to line up.

    Figure 5.34. Select the four end hulls and move them to line up.

    You can load the file NURBS_pump_v02.mb from the Locomotive project to compare your work with it or, if you skipped the previous steps, you can proceed from here to attach the end cap.

  6. You need to pull the end of the cylinder to line up with the edge of the end cap. Select the end four vertical hulls as shown in Figure 5.34, and move them so that the edges of the cylinder and end cap align. Repeat this to line up the other end of the cylinder with the other cap.

  7. Now we can create the pieces to connect the caps to the cylinder using lofts. Right-click the cylinder, and choose Isoparm from the marking menu. Select the edge isoparm on the cylinder. Now right-click the end cap, and choose Isoparm from the marking menu. Shift+click the edge isoparm of the end cap as shown in Figure 5.35. Choose Surfaces → Loft

    Select the four end hulls and move them to line up.
  8. This creates a surface to bridge the cylinder and the end cap. You will notice it is rather jagged, almost a diamond shape as opposed to a smooth ring. With the loft selected, press 3 on the keyboard to see it with smooth display in the panel. Figure 5.36 shows the loft.

Shift+click the edge isoparm.

Figure 5.35. Shift+click the edge isoparm.

Lofting the end cap to the cylinder

Figure 5.36. Lofting the end cap to the cylinder

Stitching and Tangency

In the next series of steps, you'll get further into the real meat of patch modeling, which is all about creating smooth seams. Smooth seams are essential to organic modeling. The trick in making a good patch model is to make sure that all the patches line up; this is called tangency. In animation setup, it is important—for characters that have been made with NURBS patches and for textures, to name but two instances—that tangency be correct; otherwise, you may notice tearing at seams during deformations or texture maps that don't line up quite right. It is a bit of a tedious process, but here is a taste of it. To continue with the patch model of the locomotive pump, follow these steps:

  1. Start by creating a smooth piece that connects the cylinder and the end caps using the lofts created in steps 7 and 8 in the previous section and shown in Figure 5.36. Select the cylinder and the connector loft, as shown in Figure 5.37, and attach them by choosing Edit NURBS → Attach Surfaces

    Stitching and Tangency
    Attach the patches.

    Figure 5.37. Attach the patches.

  2. Now here's the funny part: We will be disconnecting them. Select the isoparm at the location where the patches originally met, and choose Edit NURBS → Detach Surfaces. Again, make sure the tool is reset to default so as not to keep the original patches. This gives you tangency across the two patches as well as a smooth transition in the model.

  3. Repeat steps 1 and 2 for the other end of the cylinder and its end cap and also for the upper cylinder and its two end caps. You should now have end caps with smooth attachments to the cylinders, as shown in Figure 5.38.

    The end caps attach to the cylinders—smooth as butter!

    Figure 5.38. The end caps attach to the cylinders—smooth as butter!

  4. Connecting the upper and lower cylinders is next. Select the edge isoparms of both cylinders and choose Surfaces → Loft

    The end caps attach to the cylinders—smooth as butter!
    Lofting the two cylinders together

    Figure 5.39. Lofting the two cylinders together

    Move back the middle and lower-middle hulls.

    Figure 5.40. Move back the middle and lower-middle hulls.

  5. Individually select the middle and then the lower middle hulls of the lofts and move them back to create a bit of curvature to surfaces, as shown in Figure 5.40. Remember, you can select hulls by right-clicking the surface and using the marking menu.

  6. Select the edge isoparms of the lofts you just created, and loft between them with two spans. Make sure to reset the settings by choosing Edit → Reset Settings in the Option box, and then set Section Spans to 2 spans before you create the loft. Repeat for the other side. Figure 5.41 shows the closed ends.

  7. Now go into CV mode and move the CVs to line up the edges of the newly formed closed ends with the bottom and top cylinders. Repeat for the other side, as shown in Figure 5.42.

  8. As we did in steps 1 and 2, attach and then detach the loft you just edited with CVs (we'll call it the side panel) and the front panel, as shown in Figure 5.43, to set up a smooth transition and a tangency. Repeat for the back panel and the other end of the cylinders to make the other side panel.

    Closing the sides

    Figure 5.41. Closing the sides

    In CV mode, line up the ends and cylinders.

    Figure 5.42. In CV mode, line up the ends and cylinders.

    Create a smooth transition between the surfaces

    Figure 5.43. Create a smooth transition between the surfaces

  9. Now we'll shift the attention to one of the end caps on the lower cylinder. In step 5 in the previous section ("End Caps"), and as shown in Figure 5.33, we detached a pizza-slice shape out of the end caps. Select the detached slice, and insert two isoparms in between the existing ones. Your model should resemble the one in Figure 5.44 with the added isoparms. This is set up for another attachment coming up. Repeat for the other end cap on the lower cylinder.

    Insert isoparms into the end cap slice.

    Figure 5.44. Insert isoparms into the end cap slice.

  10. Now select isoparms on the edges of the end cap and the side panel, and loft between them with two spans. Repeat for the other side. This will plug the hole between the end cap and the side panels. You can, if you'd like, run another attach and detach to smooth out the groove between the end caps and the side panels. Figure 5.45 shows the end result of the groove.

  11. You're getting kicked out into the cold now to run the same set of procedures on the upper cylinder and its end caps. These should be simpler, as there are fewer sections to deal with, but go ahead and finish the model from here to form the connections shown in Figure 5.46 and to form the final model shown in Figure 5.47.

The groove connecting the end cap with the side panel

Figure 5.45. The groove connecting the end cap with the side panel

Finishing the top part of the NURBS pump

Figure 5.46. Finishing the top part of the NURBS pump

As you can see, there is quite a bit of lofting, attaching, and detaching between surface patches in patch modeling. The key to becoming good at it is to be able to line up isoparms easily and cleverly and to be able to attach them again smoothly. This type of modeling is not for the faint of heart, and it takes a lot of practice to get used to this technique. You will make a lot of mistakes along the way, but that is how you will learn the most! It's easy to see how this kind of modeling will be useful for making organic shapes such as faces.

The finished pump

Figure 5.47. The finished pump

Using Artisan to Sculpt NURBS

Imagine that you can create a NURBS surface and just sculpt it using your cursor the way hands are used on wet clay to mold the surface. You can do just that with a Maya module called Artisan—and without the mess!

Try This

Artisan is basically a 3D painting system that allows you to paint directly onto a surface. By painting on the surface with the Sculpt Geometry tool, you are moving the CV points in and out, effectively molding the surface.

  1. In Shaded mode (press 5), maximize the Perspective window (press the spacebar) for a nice big view. Create a NURBS sphere and open the Attribute Editor. In the sphere's creation node (makeNurbSphere1), set Sections to 24 and set Spans to 12. The greater the surface definition there is, the more detailed the sculpting.

  2. Select the sphere and choose Edit NURBS → Sculpt Geometry Tool

    Using Artisan to Sculpt NURBS

    Your cursor will change to the Artisan brush as shown in Figure 5.48. The red circle around the brush cursor and the lettering displays the type of brush you are currently using. When the red lines point outside the circle and the lettering reads Ps, you're using the push brush that will push in the surface as you paint it. The black arrow pointing toward the sphere's center is a measurement of the Max Displacement slider in the tool settings. This sets how far each stroke will push in the surface. The lower the number, the less the brush will affect the surface.

    The Sculpt Geometry tool allows you to mold your surface by painting on it. Here the brush is set to push in the surface of the sphere as you paint.

    Figure 5.48. The Sculpt Geometry tool allows you to mold your surface by painting on it. Here the brush is set to push in the surface of the sphere as you paint.

  3. Click and drag the cursor across the surface of the sphere to get a feel for how the surface deforms under your tool. Use the Max Displacement slider to control the force of the brush, and use Radius (U) and Radius (L) to set the size of the brush.

  4. Switch your brush type to pull. Your cursor will change to read Pl, and the red lines will appear on the inside of the circle (Figure 5.49). You'll then be able to pull out the surface.

    Note

    The Opacity slider also controls the force of the brush, but it is subtler than Max Displacement to give you greater control. Because this is after all a 3D painting tool, Opacity controls how much value you paint onto the surface. The value in this case is not a color, but how far the surface is deformed. You'll see how Artisan comes back into play in other aspects of Maya later in the book.

  5. Smooth will blend the pushed in and pulled out areas of the surface together to get a smoother result. Erase will simply erase the deformations on the surface, setting it back to the way it was before.

    With a "pull" brush, your cursor changes to read "Pl."

    Figure 5.49. With a "pull" brush, your cursor changes to read "Pl."

    If you plan to sculpt a finely detailed surface, be sure to create the surface with plenty of surface spans and sections. If you only want to paint a specific area of a NURBS surface, choose Edit NURBS → Insert Isoparms to add extra detail to that area before you begin painting, although you can add isoparms after you paint. Once you begin to sculpt this way, going back into the surface's creation node to increase its sections and spans will ruin your results.

Modeling with Simple Deformers

In many ways, deformers are the Swiss Army knives of Maya animation, except you can't open a bottle with them. Deformers are handy for creating and editing modeled shapes in Maya. These tools allow you to change the shape of an object easily. Rather than using CVs or vertices to distort or bend an object manually, you can use a deformer to affect the entire object. Popular deformers, such as Bend and Flare, can be powerful tools for adjusting your models quickly and evenly, as you're about to see.

Nonlinear deformers, such as Bend and Flare, create simple shape adjustments for the attached geometry, such as bending the object. You can also use deformers in animation to create effects or deformations in your objects. We will explore this later in the book.

Modeling Using the Bend Deformer

Now let's apply the deformer. In a new Maya scene, we'll create a polygonal cylinder and bend it to get a quick idea of deformers and how they work using the following steps:

  1. Click Create → Polygon Primitives and turn on Interactive Creation. Then click Create → Polygon Primitives → Cylinder. Click and drag to create the base. Make it a few units in diameter. The exact sizing is not important here. Next, click and drag to make the height of the cylinder 7 or 8 units, as shown in Figure 5.50. Make sure your create options are set to the defaults so that they are consistent with these directions.

    Create a cylinder to bend.

    Figure 5.50. Create a cylinder to bend.

    Note

    To make sure the settings are at their defaults, open the command's Option box and click the Reset Settings button.

  2. Let's jump right in and create the Bend deformer. With the cylinder selected, switch to the Animation menu set by pressing F2 and choosing Create Deformers → Nonlinear → Bend. Your cylinder will turn magenta, and a thin line will appear at the center of the cylinder running lengthwise. Depending on your settings, your deformer may be created in a different axis than the one pictured. You can reset the deformer's options as needed. Figure 5.51 shows the deformer and its Channel box attributes. Click bend1 in the Channel box to expand the deformer's attributes shown in the figure.

    Creating the Bend deformer

    Figure 5.51. Creating the Bend deformer

  3. Click Curvature and enter a value of 1. Notice the cylinder takes on an odd shape as shown in Figure 5.52. The Bend deformer itself is bending nicely, but the geometry is not. As a matter of fact, the geometry is now offset from its original location.

    Notice the problem with this cylinder?

    Figure 5.52. Notice the problem with this cylinder?

  4. It is offset because there are not enough divisions in the geometry to allow for a smooth bend. Select the cylinder and click polyCylinder1 in the Channel box to expand the shape node's attributes. Enter a value of 12 for the Subdivisions Height attribute (Figure 5.53) and your cylinder will bend with the deformer properly, as shown in Figure 5.54.

    Increase the Subdivisions Height to 12.

    Figure 5.53. Increase the Subdivisions Height to 12.

  5. Try adjusting the Bend deformer's Low and High Bound attributes. This allows you to bend one part of the cylinder without affecting the other. Figure 5.55 shows the cylinder with the Bend deformer's High Bound set to 0.25 instead of 1. This causes the top half of the cylinder to bend only one quarter of the way up and continue straight from there.

Experiment with moving the Bend deformer and see how it affects the geometry of the cylinder. The deformer's position plays an important part in how it shapes an object's geometry.

The cylinder is bending properly now that it has the right number of divisions.

Figure 5.54. The cylinder is bending properly now that it has the right number of divisions.

Using the High Bound to change the effect of the Bend deformer

Figure 5.55. Using the High Bound to change the effect of the Bend deformer

Adjusting an Existing Axe Model

In this exercise, we will take an existing NURBS model of an axe, and fine-tune the back end of the axe head. In the existing model, the back end of the axe head is blunt, as you can see in Figure 5.56. You will need to sharpen the blunt end with a nonlinear deformer. Open the AxeHead_v01.ma file in the Scenes folder of the Axe project on the CD, and follow these steps.

The axe head is blunt.

Figure 5.56. The axe head is blunt.

Select the back of the axe head.

Figure 5.57. Select the back of the axe head.

  1. You will need to select the top group of the axe head's back end. Open the Outliner and select axeHead_Back (Figure 5.57).

  2. Click F2 to switch to the Animation menu set.

  3. Create a Flare deformer by choosing Create Deformers → Nonlinear → Flare. The Flare deformer appears as a cylindrical object (Figure 5.58).

    The Flare deformer appears as a cylinder.

    Figure 5.58. The Flare deformer appears as a cylinder.

    Rotate the deformer 90 degrees in the Z-axis.

    Figure 5.59. Rotate the deformer 90 degrees in the Z-axis.

  4. Rotate the deformer 90 degrees in the Z-axis as shown in Figure 5.59.

  5. Open the Attribute Editor (Ctrl+A), click the flare1 tab to access the Flare controls, and enter the following values:

ATTRIBUTE

VALUE

Start Flare Z

0.020

High Bound

0.50

These values will taper in the end of that part of the axe head, as shown in Figure 5.60. This is a much easier way of sharpening that blunt end than adjusting the individual CVs of the NURBS surfaces.

Sharpen the axe's back edge.

Figure 5.60. Sharpen the axe's back edge.

Deformers use history to distort the geometry to which they're attached. You can animate any of the attributes that control the deformer shapes, but in this case you're using this deformer as a means to adjust a model. Once you get the desired shape, as shown in Figure 5.61, you can discard the deformer. However, simply selecting and deleting the deformer will reset the geometry to its original blunt shape. You'll need to pick the axeHead_Back geometry group (not the deformer) and delete its history by choosing Edit → Delete by Type → History.

Another view of the back of the axe head with the Flare deformer

Figure 5.61. Another view of the back of the axe head with the Flare deformer

The Lattice Deformer

A simple deformer, such as a Bend or Flare, will get you only so far; when a model requires more intricate editing with a deformer, you will need to use a lattice.

A lattice is a scaffold that fits around your geometry. The lattice object controls the shape of the geometry. When you adjust the Lattice deformer, the geometry deforms to match. When a lattice point is moved, the lattice smoothly deforms the underlying geometry. The more lattice points, the greater control you have. The more divisions the geometry has, the more smoothly the geometry will deform, as you just saw with the bending cylinder in the previous example.

Lattices are especially useful when you need to edit a relatively complex poly mesh or NURBS surface that is too dense to edit efficiently directly with CVs or vertices. Instead, you assign a lattice and use it to create changes. This way, you don't have to move the individual surface points.

Lattices can work on any surface type, and a single lattice can affect multiple surfaces simultaneously. You can also move an object through a lattice (or vice versa) to animate a deformation effect, such as a golf ball sliding through a garden hose.

Creating an Alien Hand

Make sure you are in the Animation menu set. To adjust an existing model or surface, select the model(s) or applicable groups to deform and choose Create Deformers → Lattice. Figure 5.62 shows the detailed polygonal hand model from Chapter 4 with a default lattice applied. The top node of the hand has been selected, and the lattice applied.

A lattice is applied to the polygonal hand model.

Figure 5.62. A lattice is applied to the polygonal hand model.

To experience how this works, you will remodel the detailed poly hand using a few different lattices. Your objective is to create an alien hand by thinning and elongating the hand and each of the fingers—we all know aliens have long gawky fingers. Because it would take a lot of time and effort to achieve this by moving the vertices of the poly mesh, using lattices here is ideal.

A lattice is applied to the polygonal hand model.

To elongate and thin the entire hand, load the scene file detailed_poly_hand.ma from the Poly_Hand project on the CD and follow these steps:

  1. Select the top node of the hand (poly_hand) in the Outliner, and choose Create Deformers → Lattice. This will create a default lattice that will affect the entire hand, fingernails and all, as shown in Figure 5.62. Although you can change the lattice settings in the Options window upon creation, you will edit the lattice after it is applied to the hand.

  2. The lattice will be selected once it's created. Open the Attribute Editor, and click the ffd1LatticeShape tab. The three attributes of interest here are S Divisions, T Divisions, and U Divisions. These sliders control how many divisions the lattice uses to deform its geometry. Set S Divisions to 3, set T Divisions to 2, and set U Divisions to 3 for the result shown in Figure 5.63.

    Note

    A 3 × 2 × 3 lattice refers to the number of division lines in the lattice as opposed to the number of sections; otherwise, this would be a 2 × 1 × 2 lattice!

  3. With the lattice selected, press F8 to switch to Component mode and display the lattice's points. These points act just like the vertices on a polygonal shape. You will use them to change the overall shape of the hand without moving the vertices of the hand themselves. Select the vertices on the thumb side of the hand, and move them to squeeze in that half of the hand. Notice how only that zone of the model is affected by that part of the lattice.

    Changing the number of divisions in the lattice

    Figure 5.63. Changing the number of divisions in the lattice

  4. Toggle back to Object mode (press F8 again), and scale the entire lattice to be thinner in the Z-axis and longer in the X-axis. Now the entire hand is deformed in accordance with how the lattice is scaled (Figure 5.64).

  5. Now that you have altered the hand, you have no need for this lattice. If you delete the lattice, the hand will snap back to its original shape. You do not want this to happen. Instead, you need to delete the construction history on the hand itself to get rid of the lattice, as you did with the Axe Head exercise earlier in this chapter.

    Select the top node of the hand, and choose Edit → Delete by Type → History.

    Lengthen the hand using the deformer.

    Figure 5.64. Lengthen the hand using the deformer.

Creating Alien Fingers

The next step is to elongate the individual fingers and widen the knuckles. Let's begin with the index finger. Follow these steps:

  1. Select the top node of the hand, and create a new lattice as before. It will form around the entire hand.

    Although you can divide the lattice so that its divisions line up with the fingers, it is much easier and more interactive to scale and position the entire lattice so it fits around the index finger only.

  2. Simply moving and scaling the selected lattice will deform the hand geometry. You don't want to do this. Instead, you need to select the lattice and its base node. This will let you change the lattice without affecting the hand. In the Outliner, select both the ffd1Lattice and ffd1Base nodes (Figure 5.65).

    Select the lattice and base nodes.

    Figure 5.65. Select the lattice and base nodes.

  3. With both nodes selected; scale, rotate, and transform the lattice to fit around the index finger, as shown in Figure 5.66.

  4. Deselect the base and set the lattice S Divisions to 7, T Divisions to 2, and U Divisions to 3.

  5. Adjust the lattice to lengthen the finger by pulling the lattice points (Figure 5.67). Pick the lattice points around each of the knuckles individually, and scale them sideways to widen them.

  6. To delete the lattice and keep the changes to the finger, select the top node of the hand and delete its history. Repeat this entire procedure for the rest of the fingers to finish your alien hand. (Try to creep out your younger sister with it.)

The alien hand in Figure 5.68 was created by adjusting the polygonal hand from this exercise and using only lattices.

Position the lattice and its base to fit around the index finger.

Figure 5.66. Position the lattice and its base to fit around the index finger.

Flare out the knuckles.

Figure 5.67. Flare out the knuckles.

The human hand model is transformed into an alien hand by using lattices to deform the geometry.

Figure 5.68. The human hand model is transformed into an alien hand by using lattices to deform the geometry.

As you can see, lattices give you powerful editing capabilities without the complication of dealing with surface points directly. Lattices can help you reshape an entire complex model quickly or adjust minor details on parts of a larger whole.

In Chapter 8, "Introduction to Animation," you will animate an object using another type of deformer. You'll also learn how to deform an object through a path.

Animating Through a Lattice

Lattices don't only work on polygons; they can be used on any geometry in Maya and at any stage in your workflow to create or adjust models. You can also use lattices to create animated effects. In the next exercise, you will animate an object through a simple lattice.

In the previous example, if you moved the hand geometry through the lattice while it was still applied to one of the fingers, you should have seen an interesting effect before you deleted the last of your lattices. The parts of the geometry of the hand deformed as the hand traveled through the lattice. Think of ways you can use this warping effect in an animation. For example, you can create the effect of a balloon squeezing through a pipe by animating the balloon geometry through a lattice.

In the following exercise, you will create a NURBS sphere with eight sections and 16 spans, and an open-ended NURBS cylinder that has no end caps.

  1. Choose Create → NURBS Primitives → Cylinder

    Animating Through a Lattice
  2. Select the balloon and create a lattice for it (Figure 5.70). (From the Animation menu set, choose Create Deformers → Lattice.) Set the S, T, and U Divisions to 4, 19, and 4, respectively. This number of lattice divisions is set to create a smoother deformation when the sphere goes through the pipe.

    Arrange the balloon and pipe.

    Figure 5.69. Arrange the balloon and pipe.

    Create a lattice for the sphere

    Figure 5.70. Create a lattice for the sphere

  3. Select the lattice and its base in the Outliner (ffd1Lattice and ffd1Base nodes), and move the middle of the lattice so it fits over the length of the pipe (Figure 5.71).

  4. Deselect the lattice base, and go to Component mode for the lattice itself. Select the appropriate points and shape the lattice so the middle of the lattice fits into the cylinder (Figure 5.72).

  5. Select the sphere and move it back and forth through the pipe and lattice. Notice how it squeezes to fit through. If you look closely, you will see that the sphere starts to squeeze a little before it enters the pipe. You'll also see parts of the sphere sticking out of the very ends of the pipe. This effect, in which geometry passes through itself or another surface, is called interpenetration. You can avoid this by using a more highly segmented sphere and lattice. If you try this exercise with a lower-segmented sphere and/or lattice, you will notice the interpenetrations even more. Figure 5.73 shows the balloon squeezing through the pipe.

In a similar fashion, you can create a lattice along a curve path and have an object travel through it. We'll try this in Chapter 8.

Relocate the lattice to the cylinder.

Figure 5.71. Relocate the lattice to the cylinder.

Squeeze in the lattice points to fit the cylinder.

Figure 5.72. Squeeze in the lattice points to fit the cylinder.

Subdivision Surfaces

Subdivision surfaces combine the best features of NURBS and polygonal modeling and are useful for intricate surfaces such as faces. Using subdivision surfaces, you can model complex characters and create models from single primitives (as in polygonal modeling), but with perfectly smooth surfaces (as in NURBS modeling).

Squeezing the balloon through the pipe using a Lattice deformer

Figure 5.73. Squeezing the balloon through the pipe using a Lattice deformer

Like lattices, subdivision surfaces rely on varying levels of editing detail that allow you to adjust a surface from a global level, where large parts of the model are modified, to a micro-level, where you have control over the most dense surface points.

Typical subdivision workflow begins when you create a simple polygonal mesh of your model. The polygon is converted to a subdivision surface that you can edit using any number of subdivision detail levels. More often than not, the resulting subdivision surface is then converted back to a polygonal object for use in production. Subdivision surfaces can also be converted to NURBS patches.

The Subdivision Surfaces (or SubD, as they are called) toolset is found in the Surfaces menu set (press F4). You will find yourself switching back and forth within the Polygons menu set (press F3). Just remember these hotkeys and you'll be switching like a pro in no time.

Creating a Starfish

Now you will create a starfish model starting with polygons, like the models you created in Chapter 4. You will then convert the polygon mesh to a subdivision surface to mold it into a proper starfish. Follow these steps:

  1. Create a new scene and switch into the Polygons menu set. With Interactive Creation turned off, create a polygon cube and scale it to be 8 wide, 8 deep, and 1.2 high.

  2. Use the Split Polygon tool (Edit Mesh → Split Polygon Tool) to split one side of the box into halves (Figure 5.74). You can right-click every time you finish one of the splits without exiting the tool. When you do this, center the new edge by using the readout display in the Feedback bar (at the lower-left of the screen) to place the split at 50 percent along each edge.

    Split the sides.

    Figure 5.74. Split the sides.

    Note

    When you invoke the Split Polygon tool, Maya's view panel prompts you to select along the first edge.

  3. Reshape the box into an irregular pentagon, as shown in Figure 5.75, by selecting the polygonal edges of the box in Component mode (F8) and moving them one by one. You needn't make all five sides exactly the same size—real starfish are irregular—but be careful not to move any of the edges up or down in the Y-axis because you'll want the pentagon to be flat.

    Once the pentagon is created, split each face into two.

    Figure 5.75. Once the pentagon is created, split each face into two.

  4. Use the ever-popular Split Polygon tool again to cut all five sides in half, as shown in Figure 5.75. You will be using these edges to create a polygonal star, which you will then convert to the subdivision surface.

  5. Use the newly created edges to shape the pentagon into a star by moving the edges in toward the center (Figure 5.76). This will be the basis for your starfish subdivision surface.

  6. Save your work and compare it to the scene file Starfish_v01.ma in the Starfish project on the CD.

Once the pentagon is created, split each face into two.
Create a star shape.

Figure 5.76. Create a star shape.

Converting to a Subdivision Surface

Now that you have the basic polygonal shape for the starfish, convert it to a subdivision surface. Follow these steps:

  1. Select the star, and then choose Modify → Convert → Polygons to Subdiv. The star will turn into a smooth subdivision surface, as shown in Figure 5.77.

  2. Although you have all but lost the points of the star by converting it to smooth subdivisions, you now have far greater control. Press the 3 key to increase the display resolution of the surface. As they do with NURBS objects, the 1, 2, and 3 keys set the display resolution of a subdivision surface.

  3. With the starfish still selected, switch to the Surfaces menu set (F4) and choose Subdiv Surfaces → Polygon Proxy Mode. This will switch Maya to a low-level editing mode and restore the shape of the star as a cage around the starfish (Figure 5.78). Note that the star here is not the surface of the starfish, but a proxy that will shape the subdivision surface, much as a lattice does. Switch to Component mode (F8), and you'll see vertices on the polygon proxy (sometimes called a cage) that you can move to shape the starfish.

  4. We're going to change the display of the vertices of the subdivision surfaces before continuing. Click Windows → Setting/Preferences → Preferences and select Display → Subdivs in the Categories list on the left. Set the Component display to Numbers for this exercise.

  5. Using the polygon proxy to shape the starfish is a good way to create "broad strokes" when creating your final model. It will not yield good results by itself, however.

    Converting the star shape to a subdivision

    Figure 5.77. Converting the star shape to a subdivision

    The starfish's cage

    Figure 5.78. The starfish's cage

    Press F8 to go back to the Object Selection mode, where you can select the starfish and not its vertices, and then switch back to Standard mode (choose Subdiv Surfaces → Standard Mode). With the starfish still selected, enter Component mode to select vertices. The vertices of the starfish will appear in the same locations as the points on the polygon proxy and will be represented with zeros, as in Figure 5.79.

    The zeros represent the zero level of detail on this subdivision starfish and correspond to the vertices on its polygon proxy.

    Figure 5.79. The zeros represent the zero level of detail on this subdivision starfish and correspond to the vertices on its polygon proxy.

  6. Right-click the starfish to open a marking menu, and choose Display Level → 1. You will define the arms of the fish at this level of detail. Select the vertices (now represented with 1s, as in Figure 5.80) between each point, and pull them in toward the center of the fish. This level of detail is automatically generated when you convert a poly image to a subdivision surface. Maya also has another level of detail (Display Level → 2), which you'll use later.

    Note

    If by chance you do not see Display Level → 2 as an option and Display Level → 1 is the highest detail level you have, you can create a higher level of display by selecting all the level 1 vertices on the starfish in Component mode and choosing Subdiv Surfaces → Refine Selected Components to create level 2 vertices. You will then be able to choose Display Level → 2 when needed.

  7. Save your file and compare your work to the scene file Starfish_v02.ma in the Starfish project on the CD.

    The zeros represent the zero level of detail on this subdivision starfish and correspond to the vertices on its polygon proxy.
    Level 1 of the starfish

    Figure 5.80. Level 1 of the starfish

  8. Right-click the starfish and choose Display Level → 2. The vertices on the next higher detail level will appear and be represented by 2s. At this level of detail, you can move these vertices to give your starfish more character. Try making the areas between the points on the star smoother, as shown in Figure 5.81. Also try to flatten the bottom of the starfish using either level 1 or level 2 vertices.

  9. To achieve the appearance shown in Figure 5.81, you may need to detail your starfish further in some areas. As it stands now, the starfish can be edited up to level 2. To create another level of detail, select the areas you want to refine by selecting the level 2 vertices along the outside of each star point, as shown in Figure 5.82.

  10. With those vertices selected, right-click the selection and choose Refine Selected from the marking menu. Maya will add another level of detail to that area of the starfish with vertices marked as 2s. This allows you to make more detailed adjustments to the surface to mold it to your liking. Work the vertices at all levels to sculpt your starfish so it looks similar to the one in Figure 5.81.

    Note

    Right-clicking the starfish and choosing Refine Selected is the same as selecting the vertices and choosing Subdiv Surfaces → Refine Selected Components. Choosing vertices in an area of your model and refining them beyond a display level of 2 will create more vertices for that area only. You can continue to refine your selection as needed. At any time, you can go back to Polygon Proxy mode to access the lowest level of detail and adjust the broad strokes of the model.

    Level 1 of the starfish
  11. Save your work again, and open the scene file Starfish_v03.ma in the Starfish project on the CD to compare your work with the model.

    A molded starfish

    Figure 5.81. A molded starfish

    Select the area to be refined.

    Figure 5.82. Select the area to be refined.

    Note

    You can use these same techniques to re-create the polygon hand from Chapter 4 with subdivision surfaces.

Building a Teakettle

Now that you have experienced the mechanics of subdivision surface modeling and editing, you're ready to work on another model. The next subdivision exercise asks you to create a teakettle. You'll fashion the kettle from simple polygon shapes and then refine it using subdivisions.

Creating the Base Polygon Model

To create the base poly mesh for the kettle, follow these steps:

  1. The main body of the kettle will begin as a poly cylinder. Choose Create → Polygon Primitives → Cylinder →

    Creating the Base Polygon Model
  2. To create the lid, create another poly cylinder with eight subdivisions around the axis and 2 for the height. Scale it to fit as a lid on the first cylinder.

  3. Select the upper row of poly edges on the lid and scale them all in to create a bevel, as shown in Figure 5.83. Then select every other edge on the top surface and delete them, as shown in Figure 5.84.

    Scale the outer edges inward.

    Figure 5.83. Scale the outer edges inward.

  4. Select the poly edges of the main cylinder, and scale them out increasingly larger as you work your way down. Delete every other edge of the top surface as you did with the lid. Your kettle should look like the one in Figure 5.85.

    Delete every other edge of the top surface.

    Figure 5.84. Delete every other edge of the top surface.

    Creating the overall shape

    Figure 5.85. Creating the overall shape

  5. You are going to create a simple handle for the lid. Select the lid's top four faces. You will create the handle by extruding these faces and scaling them in. First make sure the option Edit Mesh → Keep Faces Together is enabled. This option lets you extrude these faces properly by keeping the poly faces together during the extrude operation. Now select the four faces again and choose Edit Mesh → Extrude →

    Creating the overall shape

    Note

    If instead of following these directions you chose Edit Mesh → Extrude and use the special scale handles shown in Figure 5.87, your faces may all separate.

  6. With those four faces still selected, extrude the faces again, but this time pull them up and scale them in a bit as shown in Figure 5.88.

    By default, faces will extrude separately.

    Figure 5.86. By default, faces will extrude separately.

    The Keep Faces Together command allows you to extrude the faces together.

    Figure 5.87. The Keep Faces Together command allows you to extrude the faces together.

    Pulling up the lid's handle

    Figure 5.88. Pulling up the lid's handle

  7. Select the side faces of the lid's new handle, and extrude the faces inward using the scale handle to create detail on the handle.

    Round out the handle by moving the edges.

    Figure 5.89. Round out the handle by moving the edges.

  8. Select the edges that make up the lid handle, and move them to round out the handle, as shown in Figure 5.89.

  9. Select the four faces on the top of the kettle and extrude them. Scale the faces in and pull them up to round the top of the kettle, as shown in Figure 5.90.

  10. Select the kettle and apply a lattice to it by choosing Create Deformers → Lattice (in the Animation menu set). Set S Divisions to 2, T Divisions to 3, and U Divisions to 2. Adjust the lattice to bend the kettle back to create the front. Figure 5.91 shows the lattice's final position. Once you have the proper shape, select the kettle and delete its history to delete the lattice.

    Round off the top of the kettle.

    Figure 5.90. Round off the top of the kettle.

    Use the lattice to bend the kettle.

    Figure 5.91. Use the lattice to bend the kettle.

    Use the Insert Edge Loop tool to create a straight division line across the bottom.

    Figure 5.92. Use the Insert Edge Loop tool to create a straight division line across the bottom.

  11. Just before you convert the kettle to a subdivision surface, you need to create more detail at the bottom of the kettle so that the subdivision surface won't round out and you will still have a flat bottom. In the Side or Front view panel, select the kettle. Go to the Polygons menu set (F3), choose Edit Mesh → Insert Edge Loop Tool, and use the Insert Edge Loop tool to create a new division along the bottom of the kettle, as shown in Figure 5.92.

  12. Select all the new faces along the bottom, and extrude them to create a lip that runs around the kettle's bottom as shown in Figure 5.93. Be sure that Edit Mesh → Keep Faces Together is still selected; otherwise, the faces will separate. Luckily, the Keep Faces Together option appears at the top of the Edit Mesh menu whenever you access the tools in that menu, so you can verify that it's enabled without too much bother.

    Use the Insert Edge Loop tool to create a straight division line across the bottom.
  13. Save your scene file and load the Kettle_Model_v01.ma file from the Tea_Kettle project on the CD to compare your work up to this point.

    Creating the base

    Figure 5.93. Creating the base

Converting to Subdivisions

Once you complete the base polygon model for the kettle, you can convert it to a subdivision surface to round it out and make it smooth. To convert the kettle, follow these steps:

  1. Select the kettle and choose Modify → Convert → Polygons to Subdiv. Then select the lid and convert it as well.

  2. Select the converted kettle and the lid, and press 3 to view them in High-Resolution mode. Position the lid on top of the kettle. Now your model should be similar to that in Figure 5.94.

    The subdivision kettle and lid

    Figure 5.94. The subdivision kettle and lid

  3. The only items that you still need to model are the spout and a handle. For the handle, create a subdivision torus (choose Create → Subdiv Primitives → Torus). Scale, rotate, and place the torus above and around the lid on top of the kettle.

  4. With the handle selected, choose Subdiv Surfaces → Polygon Proxy Mode in the Surfaces menu set. Using the vertices on the polygon proxy, make the handle thinner and elongate it upward, as shown in Figure 5.95.

  5. Return to Standard mode with the handle selected (choose Subdiv Surfaces → Standard Mode). To make the handle smoother, you will refine it and add more subdivisions. Switch to Component mode so that the vertices of the handle display as zeros. Right-click the handle and choose Refine Selected from the marking menu. New vertices will appear as 1s. The handle should now be much smoother. Make any modeling adjustments to your liking. Using the right mouse button and the marking menu's Display Level command, switch between level 0 and level 1 displays as needed.

    The kettle's handle

    Figure 5.95. The kettle's handle

  6. To create the spout, create a subdivision cylinder. Switch to Component mode to select the faces (not the vertices). Right-click the cylinder, and choose display level 2. Select the inside circle of faces on the top of the cylinder, as shown in Figure 5.96. Move them down into the cylinder to hollow it out, but create a thickness to the spout at the same time, as also shown in Figure 5.96.

  7. Position the spout on the kettle. Move the vertices to flare out at the bottom of the spout where it meets the kettle. Figure 5.97 shows the completed kettle. Save your file.

    Hollow out the spout.

    Figure 5.96. Hollow out the spout.

    The completed subdivision teakettle

    Figure 5.97. The completed subdivision teakettle

Converting Back to Polygons

Most models created with subdivision surfaces should be converted back to polygons once the modeling is finished and rendering setup is ready to begin. Because subdivisions are a more intricate surface type than polygons, you will probably have better performance while animating if you work with a polygonal model rather than a subdivision. Professionals frequently use subdivision tools and surfaces to create their models, but then convert back to polygons once they are finished to avoid excessive memory usage while rendering.

This is a simple procedure, similar to the earlier exercise in which you converted NURBS surfaces to polygons. Here you will convert the kettle back to polygons.

  1. Select the subdivision kettle and its handle, spout, and lid, and choose Modify → Convert → Subdiv to Polygons

    Converting Back to Polygons
    The Convert Subdiv to Polygons Option box

    Figure 5.98. The Convert Subdiv to Polygons Option box

  2. Next to Tessellation Method, select Adaptive. This usually will yield the best results.

  3. The Divisions Per Face slider controls how smoothly the object is converted to polygons.

    Note

    At a division factor of 1, your kettle will look jagged. Turn it up to 2, and you will notice a faithful conversion to polygons.

  4. For the best results, select each piece of the kettle separately and convert the pieces one by one, adjusting the Divisions Per Face value appropriately. You will find that a division value of 2 will work for everything but the handle, which requires a division value of at least 3 to remain fairly smooth.

More often than not, you will want to take a model as far as possible before you convert it to polygons, but you should always save the original subdivision version in case it needs to be modified. This way, you can revert to your subdivision file, make your changes, and reconvert to polygons to render out the changes.

Taking the Kettle Further

Try creating more detail for the kettle or experimenting with your own designs. An easy addition is a whistle cap for the spout. You can also create a matching set of teacups and saucers with subdivision surfaces. With the skills you have acquired here, you should feel confident to tackle an entire kitchen full of models.

Summary

In this chapter, we tackled NURBS modeling by going through the usual surfacing tools, from lofting and revolving to bevels and boundary surfaces. Then we explored the implications of surface history and how surfaces adjust to changes when history is enabled. We then learned about different editing methods for NURBS surfaces, such as inserting isoparms and attaching surfaces together as well as converting those surfaces to poly meshes. We then put those lessons to work on creating a NURBS patch model for a steam pump for the locomotive model. Also in this chapter, we introduced you to the Artisan tool and how to use it for sculpting a NURBS surface.

This chapter then covered various modeling techniques to help you break away from typical ways of thinking. You learned how to use a lattice to adjust the polygon hand model into an alien hand as well as how to animate a balloon pushing through a pipe. Moving on to a starfish model, you explored subdivision modeling techniques that are based on polygon modeling methods. Using polygons and subDs hand-in-hand, you first made a teakettle out of polygons and then refined the model using subdivision modeling. Finally, you learned how to convert subD models back to polygons.

Modeling is usually the first step of CG production. It is also almost always the first CG procedure at which students try to excel before moving on to other aspects of CG.

Using other tools such as a lattice to shape your model is not only a fantastic way of making gross or overall changes to a model, but it is also an excellent tool for adding fine detail in certain areas.

As you have seen in this and in the previous chapter, and as you will see in the next chapter, you can accomplish a modeling task in several ways. Different workflows give you the flexibility to choose your own modeling style. To make good choices, however, you'll need to practice. Good modelers have a strong eye for detail and a high tolerance for work that is repetitious. They also love assembling a complex object and seeing a grand result, and they are thrilled by the eventual outcome.

Keep at it; model everything you get your hands and eyes on. Try the same model a few different ways; switch between NURBS, polygons, and subdivisions to become comfortable with Maya's toolset. As you're doing that, keep on top of how you organize your nodes, and keep everything named and organized because the organization of your scenes is extremely important.

For further practice, use this chapter as a reference to create some of the following NURBS or Subdivision models.

Bathroom Sink

Snap a few digital stills of your bathroom sink, or find some on the Internet. A sink will give you a great chance to explore NURBS surfacing, making pristine curves and smooth surfaces. It may be a bit involved, but it's not overwhelming.

Couch or Love Seat

Cushy furniture is great for NURBS as well as SubDs. Use lofting to make plush cushions, or just use a primitive. It's up to you, but try it. You'll only get better with practice.

Disposable Lighter

Sounds simple, but try to get detailed with it.

Cartoon Head

Use Maya Artisan and the Sculpt Geometry tool to turn an ordinary sphere into a cartoonish head. It's fun to use Sculpt Geometry to model. Try to make the head using only Artisan.

Human Hand

Use the polygon model example in Chapter 4, but this time convert the base poly model to subdivisions and then add detail to it.

Computer Mouse

A PC or Mac mouse will make a great subD or NURBS model.

Office Chair

This will require a few different components. Start with a good ergonomic chair to reference. Then try to make the major (if not all) components out of subDs. Afterward, convert it to polygons for additional practice.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset