Chapter 17: Modeling with Patches and NURBS


Patches are a modeling type that exists somewhere between polygon meshes and NURBS. They are essentially polygon surfaces stretched along a closed spline. Modifying the spline alters the surface of the patch.

In many ways, patches have advantages over the more common mesh objects. They take less memory to store, are easier to edit at the edges, and are easy to join to one another.

NURBS is an acronym for Non-Uniform Rational B-Splines. They are the ideal modeling tool for creating organic characters because they are easy to work with, they give you good interactive control, they blend together seamlessly, and their surfaces remain smooth even when distorted. NURBS are superior to polygonal modeling methods when building models with smooth flowing contours such as plants, flowers, animals, and skin.

In this chapter, we explore different methods of NURBS model construction and then look at some advanced NURBS tutorials.

Introducing Patch Grids

Because patches have splines along their edges, a patch can be deformed in ways that a normal polygon cannot. For example, a polygon always needs to be coplanar, meaning that if you look at it on edge, it appears as a line. A patch doesn't have this requirement and can actually bend, which permits greater control over the surface and makes it better for modeling things like clothes and natural objects like leaves.

Another key advantage of Patch objects is that they efficiently represent the object geometry. If you examine some mesh objects, you'll notice that they contain a discrete vertex at the intersection of every edge at the corner of every face. Patch grids, on the other hand, have a vertex only at the corner of every patch.

Each patch can consist of several faces. This reduction of vertices makes patches much cleaner and less cumbersome objects to work with.

Creating a patch grid

Patches are named according to the number of vertices at their edges; for example, a Tri Patch has three vertices, a Quad Patch has four vertices, and so on. The default Quad Patch is made up of 36 visible rectangular faces, and the default Tri Patch has 72 triangular faces, as shown in Figure 17.1.

image from book
Figure 17.1: A Quad Patch and a Tri Patch

To create patches, select the Create image from book Patch Grids image from book Quad Patch or Tri Patch menu commands. This opens the Create panel. Select the Geometry category, and then select Patch Grids in the drop-down list. To create a patch grid, click in a viewport and drag to specify the dimensions of the grid.

You can also use the Keyboard Entry rollout to create patch grids with precise dimensions. To use this rollout, enter the grid's position coordinates and its dimensions and click the Create button. The X, Y, and Z coordinates define the location of the center of the grid.

The Patch Grid Parameters rollout includes Length and Width values and values for the number of Segments for each dimension (but only for the Quad Patch). A Segment value of 1 creates six rows or columns of segments, so the total number of polygons for a Quad Patch never drops below 36. Tri Patches do not have a Segments parameter. You can also select to automatically Generate Mapping Coordinates.

Newly created patches are always flat.

Tutorial: Creating a checkerboard

In this tutorial, we create a simple checkerboard. To keep the white squares separate from the black squares, we use Quad and Tri Patches.

To create a checkerboard from patch surfaces, follow these steps:

  1. Right-click the Snap button on the main toolbar; in the Grid and Snap Settings dialog box that appears, make sure that the Grid Points option is enabled. Then enable the Snap button on the main toolbar (keyboard shortcut, S).

  2. Select Create image from book Patch Grids image from book Quad Patch, and in the Top view, create a perfect square using the grid points. Click the color swatch in the Name and Color rollout, and select the color black.

  3. In the Command Panel, click the Tri Patch button and drag in the Top view to create an equally sized patch to the right of the first object. Select the Tri Patch, click its color swatch, and change its object color to white.

    Caution 

    With the Tri Patch's object color set to white, telling when it is selected can be difficult.

  4. Repeat Steps 2 and 3, alternating which color comes first until the entire 8×8 checkerboard is complete.

Tip 

An easier way to accomplish the checkerboard would be to create the first two squares and then to use the Array dialog box to create the rest Find out more about the Array dialog box in Chapter 9, "Cloning Objects and Creating Object Arrays."

Figure 17.2 shows the completed checkerboard.

image from book
Figure 17.2: A checkerboard created using patch grids




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net