NURBS is based on organic mathematics, which means you can 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 provides ample power for creating smooth surfaces for your models.
Now that you’ve learned the basics of creating and editing poly meshes, you’ll get into creating some organic surfaces using NURBS techniques. This chapter also explains how to use deformers to adjust a model, as opposed to editing the geometry directly as you did with the previous modeling methods.
NURBS is an acronym for Non-Uniform Rational B-Spline. That’s good to know for cocktail parties. NURBS modeling excels at creating curved shapes and lines, so it’s most often used for organic forms such as animals and people, as well as highly detailed cars. These organic shapes are typically created with a quilt of NURBS surfaces, called patches. Patch modeling can be powerful for creating complex shapes such as characters, but it can also be quite difficult and will not be covered in this book. I will, however, touch on the basics of NURBS surface modeling in this chapter.
In essence, Bézier curves are created with a starting and ending control vertex (CV) and usually two or more CVs in between that provide a smooth curvature. As each CV is laid down, the curve or spline tries to go from the previous CV to the next one in the smoothest possible manner.
As shown in Figure 5-1, CVs control the curvature. The hulls connect the CVs and are useful for selecting multiple rows of CVs at a time. The starting CV appears in the Autodesk® Maya® software as a closed box. The second CV, which defines the curve’s direction, is an open box, so you can easily see the direction in which a curve has been created. The curve ends, of course, on the endpoint CV. The start and end CVs are the only CVs that are always actually on the curve itself.
NURBS surfaces are defined by curves called isoparms, which are created with CVs. The surface is created between these isoparms to form spans that follow the surface curvature defined by the isoparms, as in Figure 5-2. The more spans, the greater the detail and control over the surface.
It’s easier to get a smooth deformation on a NURBS surface with few CVs than on a polygon. Achieving the same smooth look on a polygon would take much more surface detail. As you can see in Figure 5-3, NURBS modeling yields a smoother deformation, whereas polygons can become jagged at the edges.
You can convert NURBS to polygons at any time, but converting polygons back to NURBS can be tricky.
NURBS surfaces are created by connecting (or spanning) curves. Typical NURBS modeling pipelines first involve creating curves that define the edges, outline, paths, and/or boundaries of surfaces.
A surface’s shape is defined by its isoparms. These surface curves, or curves that reside solely on a surface, show the outline of a shape much as the chicken wire does in a wire mesh sculpture. CVs on the isoparms define and govern the shape of these isoparms just as they would regular curves. Adjusting a NURBS surface involves manipulating the CVs of the object.
NURBS is a type of surface in Maya that lets you adjust its detail level at any time to become more or less defined as needed. Pressing 1, 2, or 3 toggles between detail levels for any selected NURBS object from low quality at 1 to high quality at 3.
The easiest way to create a NURBS surface is to create a NURBS primitive, and then you can sculpt the primitive surface by moving its CVs. But you can also make surfaces in several ways without using a primitive. All these methods involve using NURBS curves to define a boundary, shape, or path of the surface and then using one of the methods described in the following sections to create the surfaces.
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’re selected. Figure 5-4 shows the result of lofting a few curves together.
To create the loft in Figure 5-4, follow these steps:
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. 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.
A revolved surface requires only one curve that is turned around 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 sweep a surface.
The profile revolves around the object’s pivot point, which is typically placed at the origin but can be easily moved. Figure 5-5 (left) shows the profile curve for a wine glass. The curve is then revolved around the Y-axis a full 360 degrees to create the wine glass. Figure 5-5 (right) 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 around an axis.
An extruded surface uses two curves: a profile curve and a path curve. First you draw the profile curve to create the profile shape of the desired surface. Then you sweep the curve 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-6 shows the profile and path curves, and Figure 5-7 shows the resulting surface after the profile is extruded along the path.
To create an extruded surface, follow these steps:
An extruded surface is used to make items such as winding tunnels, coiled garden hoses, springs, and curtains.
A planar surface uses one perfectly flat curve to make a two-dimensional cap in the shape of that curve. You do 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.
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-8. 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 choosing Surfaces ⇒ Planar.
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. It’s usually best to create the planar surface as a polygon mesh, a technique you’ll see later in this chapter in the “Using NURBS Surfacing to Create Polygons” section.
With the Bevel Surface function you take an open or closed curve and extrude 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-9). The many options in the Bevel tool allow you to control the size of the bevel and depth of extrusion, giving you great flexibility. When a bevel is created, you can easily cap the bevel with planar surfaces.
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, and for rounding out an object’s edges.
A boundary surface is so named because it’s created within the boundaries of three or four surrounding curves. For example, you draw two vertical curves opposite each other to define the two side edges of the surface. Then you draw two horizontal curves to define the upper and lower edges. These curves can have depth; they need not be flat for the boundary surface to work, unlike a planar surface. Although you can select the curves in any order, it’s best to select them in opposing pairs. In Figure 5-10, four curves are created and arranged to form the edges of a surface. First, you would select the vertical pair of curves because they’re opposing pairs; then, you would 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, especially when created as polygon mesh.
You can easily create swatches of polygon surfaces instead of NURBS surfaces by using any of these NURBS surfacing tools. To create a polygonal surface instead of a NURBS surface, open the option box for any particular NURBS tool.
The creation options that appear at the bottom of the option 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.
The Standard Fit Tessellation method uses 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, particularly Chord Height Ratio and 3D delta.
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. Values approaching 1.0 create more faces and better detail with surfaces that have multiple or very intense curves. Lower 3D Delta values will fit smaller faces around tight curves and lower the Fractional Tolerance settings, giving you a smoother surface and a greater number of faces.
History has to do with how objects react to change. Leaving History on when creating objects allows you to adjust the original parameters that created that object. For example, the loft you just created will update whenever the curves you used to create the loft move or change shape.
In the status line, the History icon () toggles History on and off. Why wouldn’t you want History turned on for everything? After a long day of modeling, having History on for every single object can slow down your scene file, adding unnecessary bloat to your workflow. But it isn’t 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!
Standard Fit will probably do the best job in most situations; however, here are the other tessellation methods you can use:
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’ll find your own workflow preference, but it helps greatly if you’re comfortable using all surfacing methods. In the following section, you’ll convert a NURBS model to polygons.
Open axe_model_v1.mb
in the Scenes folder of the Axe project from the companion web page. 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:
Imagine that you can create a NURBS surface and sculpt it using your cursor the way hands mold the surface of wet clay. As you saw with the Sculpt Geometry tool in Chapter 4, you can push and pull vertices easily by virtually painting on the surface. You can sculpt NURBS surfaces much the same way by accessing Surfaces ⇒ Sculpt Geometry Tool ❏.
If you plan to sculpt a more detailed surface, be sure to create the surface with plenty of surface spans and sections. You’ll try this tool a little bit in the next section.
Let’s put some of this information to good use and build a pair of glass candle jars. You will use these glass jars in Chapters 7, 10, and 11 to create shaders (materials), light them, and render them. Copy the project folder candleHolder
from the book’s companion web page, www.sybex.com/go/introducingmaya2016, and set your project to it.
You’ll start with a profile curve for a Revolve surface:
Continue laying down CVs to match the shape shown in Figure 5-13. This will be the profile curve for the body of the jar.
You can edit the shape of any of these curves you’ve created, and because of History, the surfaces you created with Revolve will adjust to match the new profiles. To turn the glass profile curve (glassProfile) back on, select it in the Outliner and press Shift+H. You can easily edit the shape of the object to your liking now. Once you are done, simply delete the profile curves if you don’t need them anymore.
Once you delete the profile curves, name the objects. Group the lid objects together (name it jarLid) and group the glass jar and candle together (name it jarCandle), as shown in Figure 5-23. Finally, in the front view panel, select Show ⇒ Polygons (in the view panel’s menu bar) to turn on the display of polygons in that view panel.
You can find the candle jar in candleModel_v01.mb
in the scenes
folder of the candleHolder project. This file still retains the original profile curves for you. candleModel_v02.mb
has the completed jar without the original profile curves and with the objects properly named and grouped. This file uses the smoother geometry called for in step 3 (with a Chord Height Ratio value of 0.97) and therefore is also a larger file than if you created the jar with a lower Chord Height Ratio value.
Now let’s add a little detail to the candle inside the jar using the Sculpt geometry tool. Continue with your own file, or open candleModel_v02.mb
in the scenes
folder of the candleHolder project.
In the Sculpt Tool options, set Brush Size to 0.25. Your cursor changes to the Artisan brush, a gray circle, as shown in Figure 5-24.
Sculpt the top of the candle slightly to create an uneven surface. Figure 5-24 shows the resulting uneven candle top. Try not to sculpt the sides of the candle; this may cause the sides to bulge out and then penetrate the glass jar. Try working only on the top of the candle for a melted look.
You can check your work against the file candleModel_v02.mb
in the scenes
folder of the candleHolder project. With the glass candle jar holder complete, you’ll be able to use it later to create a glass and candle wax shader in Chapter 7 and then render the object with reflections and refractions in Chapter 11. Nice job! Go grab a cookie.
In many ways, deformers are the Swiss Army knives of Maya animation, except that 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. You’ll explore this later in the book.
First, let’s try using the Soft Modification tool. Choose Modify ⇒ Transformation Tools ⇒ Soft Modification Tool, and its icon () appears below the Tool Box. This tool allows you to select an area on a surface or model and make any adjustments in an interesting way. These adjustments taper off away from the initial place of selection, giving you an easy way to soft-modify an area of a model, much like lifting up a tablecloth from the middle.
To try the Soft Modification tool, follow these steps:
You can go back to any soft selection by selecting the S on the surface for later editing. You can place as many soft selections as you need on a surface. Figure 5-29 shows the soft modification adjusting the plane.
Let’s apply a deformer. In a new Maya scene, you’ll create a polygonal cylinder and bend it to get a quick idea of how deformers work. Follow these steps:
Experiment with moving the Bend deformer and seeing how doing so affects the geometry of the cylinder. The deformer’s position plays an important role in how it shapes an object’s geometry.
In this exercise, you’ll take a 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-34. You’ll need to sharpen the blunt end with a nonlinear deformer. Open the AxeHead_v01.ma
file in the scenes
folder of the Axe project from the companion web page, and follow these steps:
axeHead_Back
(see Figure 5-35).Attribute | Value |
Start Flare Z | 0.020 |
High Bound | 0.50 |
These values taper in the end of that part of the axe head, as shown in Figure 5-38. This is a much easier way of sharpening the blunt end than adjusting the individual CVs of the NURBS surfaces.
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 the deformer as a means to adjust a model. When you get the desired shape, you can discard the deformer. However, simply selecting and deleting the deformer will reset the geometry to its original blunt shape. You need to pick the axeHead_Back
geometry group (not the deformer) and delete its History by choosing Edit ⇒ Delete By Type ⇒ History.
When a model requires more intricate editing with a deformer, you’ll 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 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.
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. With a lattice, 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.
Make sure you’re in the Modeling menu set. To adjust an existing model or surface, select the models or applicable groups to deform, and choose Deform ⇒ Lattice, under the Create section. Figure 5-39 shows a polygonal hand model with a default lattice applied. The top node of the hand has been selected and the lattice applied.
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 itself, using lattices here is ideal.
To elongate and thin the entire hand, load the scene file detailed_poly_hand.ma
from the Poly_Hand project from the companion web page, and follow these steps:
poly_hand
) in the Outliner and choose Deform ⇒ Lattice, under the Create section. Doing so creates a default lattice that affects the entire hand, fingernails and all. Although you can change the lattice settings in the option box upon creation, you’ll edit the lattice after it’s applied to the hand.Now that you’ve 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 need to delete the construction history on the hand to get rid of the lattice, as you did with the axe head exercise earlier in this chapter.
The next step is to elongate the individual fingers and widen the knuckles. Let’s begin with the index finger. Follow these steps:
Although you can divide the lattice so that its divisions line up with the fingers, it’s much easier and more interactive to scale and position the entire lattice so it fits around the index finger only.
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 lets you change the lattice without affecting the hand.
The alien hand in Figure 5-45 was created by adjusting the polygonal hand from this exercise using only lattices.
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’ll animate an object using another type of deformer. You’ll also learn how to deform an object along a path.
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. 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’ll create a NURBS sphere with 8 sections and 16 spans and an open-ended NURBS cylinder that has no end caps:
In a similar fashion, you can create a lattice along a curve path and have an object travel through it. You’ll try this in Chapter 8.
In this chapter, you tackled NURBS modeling by going through the usual surfacing tools, from lofting to revolving. Then you explored the implications of surface History and how surfaces adjust to changes when History is enabled. You then put those lessons to work on creating a pair of glass candle holders.
This chapter also covered various modeling techniques to help you break away from typical ways of thinking. You learned how to use a lattice to adjust a polygon hand model into an alien hand, as well as how to animate a balloon pushing through a pipe. Different workflows give you the flexibility to choose your own modeling style. To make good choices, however, you’ll need to practice.
Keep at it; model everything you can get your hands and eyes on. As you’re doing that, stay on top of how you organize your nodes and keep everything named and organized.
For further practice, use this chapter as a reference to create some of the following models using NURBS surfaces and lattices to aid in shaping polygons: