# Subdivision Modeling Exercise

Creating a polygon mesh by hand typically results in a crude and blocky model, unfit for production. To actually generate every polygon at the size required for production would be tedious and so we will use subdivision surfaces. The basic idea of a subdivision surface is that the user provides the "outline" of a model in the form of an input polygon mesh and then the computer subdivides or "smoothes" the input mesh to create a much higher resolution mesh.

Note: There is a type of object in Maya called a Subdiv Surface, which is an adaptive type of subdivision surface. We will not be using Subdiv Surfaces in this class for various reasons. When we refer to subdivision surfaces, we will always be referring to a polygon mesh created by the Smooth command.

There are two types of subdivision surfaces, interpolating and approximating. In the first case, the subdivision surface will pass through the points specified in the input mesh. In the second case, the input mesh informs, but does not completely constrain the shape of the subdivision surface. Maya uses an approximating subdivision method and so it is good to keep in mind that your smoothed mesh will not always resemble your input mesh. See the cube below for a demonstration of this.

The 1, 2, and 3 keys provide different modes of viewing a subdivision surface. The 1 key will show only the input mesh, the 2 key will show a wireframe of the input mesh and the subdivision surface, and the 3 key will show only the subdivision surface. Try creating various polygon primitives and seeing what they look like in the different smoothing modes.

It should be noted that the different smoothing modes have no effect on the underlying geometry itself. They only provide a preview of what the subdivided surface will look like. This will become rapidly apparent when you try to render your model and only see the input mesh. To actually subdivide the mesh, you will need to use Smooth (Mesh → Smooth).

How smooth the subdivided surface is depends on how many times it is subdivided. You can specify this in Smooth (Options), or if have already applied Smooth, then you can edit the Divisions attribute of the polySmoothFace node in the Channel Box.

As a rule of thumb, you should only need to subdivide a mesh twice to produce a render-ready mesh. If you can still make out individual polygons in the silhouette of the subdivided mesh, you probably need to add more detail to your input mesh. You can change the number of divisions you see when in the 2 and 3 smoothing modes by hitting Page Up and Page Down. To set the division level in the preview to two, hit Page Down until the mesh is no longer subdivided, then hit Page Up twice.

As you probably have noticed, subdividing a mesh tends to smooth out all the hard edges. A smoothed cube practically looks like a sphere. While this is usually the desired behavior, sometimes we want to keep a hard edge in the subdivided surface. There are two primary ways of maintaining hard edges: Adding more edge loops or using the Crease Tool.

The simplest method to reinforce your edges is to add more edge loops. The shape of a subdivision surface is dependent on the local geometry features of an area. By adding more edges, you are making the geometry denser and thus shrinking the influence of the subdivision surface. Typically, having an extra edge loop on either side is enough to create a sufficiently hard edge. Try hardening various edges by adding edge loops to a cube.

One quick way to add extra edges is to use the Bevel command (Edit Mesh → Bevel). This will create a nicely curved edge with as many additional edges as you choose. Depending on what edges you use Bevel on, it may create a few triangles, so be careful when using it.

Adding extra edge loops is a simple method that is easy to use and understand. However, it is slightly inefficient since it requires adding complexity to the mesh that doesn't contribute much information. Normally this isn't a problem since geometry is cheap to render, but if you want to minimize the amount of geometry you have or harden a very specific edge use the Crease Tool (Edit Mesh → Crease Tool).

To harden an edge, select the desired edges with the Crease Tool active. Once the edges are selected, middle click and drag the mouse left and right to adjust the hardness of the edges. You should avoid creasing an edge too strongly, as it will usually result in improper normals along the crease. Try the Crease Tool on various edges now.

There is something subtly wrong with the plane in the image below. It looks fine when not subdivided, but when it is, the center face acts strangely. Selecting the object and turning on Face Normals reveals the problem (Display → Polygons → Face Normals). The normals of the center face are not pointing the same direction as the rest of the faces, which is causing some strange behavior. Before we address how to fix this problem, let's briefly touch on what a normal is.

A normal is a vector that is typically orthogonal to a polygon's plane. It is used in lighting and subdivision, but intuitively you can think of it as describing which direction on the mesh is "outward". All polygons have two sides, so there are two ways each normal can point. Most of the meshes you will be dealing with are "watertight", that is to say that they form one continuous closed surface. A sphere and a cube are examples of watertight models, a single plane is not. For watertight meshes, if a polygon is seen by a camera, then the normal should be pointing roughly towards the camera, not inwards toward the enclosed area.

If you have modeled your mesh correctly, then fixing normal problems is easy. The fastest way is to select your mesh and Conform the normals (Normals → Conform). This will make all the normals point in a consistent fashion. This doesn't mean they are correct, just consistent. If conform picks the wrong direction, you can reverse them by using Reverse (Normals → Reverse). If you need to adjust the size which normals are displayed in Maya, you can use Display → Polygons → Normals Size....

When creating a complex subdivision surface such as a face, small variations in the position of vertices can cause unseemly distortions in the subdivision surface. One tool to deal with this problem is the Sculpt Geometry Tool (Mesh → Sculpt Geometry Tool). Instead of acting on one vertex at a time, this tool affects an area of vertices according to the set operation. In the Tool Settings are various operations such as Push, Pull, Smooth, Relax, and Erase. Smooth and Relax are good for fixing the problems caused by uneven vertices, however Smooth tends to flatten a surface, so Relax is a better choice for curved surfaces. Push and Pull's actions are fairly obvious. Erase will remove deformations from previous sculpting.

When doing subdivision surface modeling make sure that the underlying mesh does not vary dramatically from the subdivided surface. Having a good correspondence between the two meshes will lead to better deformations when animating. The subdivision preview can hide mistakes in the underlying model so be sure to constantly switch between the subdivision modes to make sure that nothing is amiss. Also be sure to model in quads, as they generally subdivide in a cleaner and more consistent way.

You now know all about the different aspects of subdivision modeling. Continue on to the other exercises to learn more about the basics of Maya.

Back to Exercises