Finding the Polygon Count


Finding the Polygon Count

Before we begin optimizing, let's first look at how many polygons our model currently has.

Load in the last file you saved, Kila_Complete.mb. You first need to convert the geometry to triangles in order to get an accurate reading.

1.

Select everything by dragging over the entire character in the view panel; then go to Polygons > Triangulate. The model will now be built from triangular polygons only.

2.

To show the polygon count, go to Display > Heads Up Display > Poly Count. The polygon statistics (Figure 5.4) will be displayed in the upper-left corner of your view, although depending on your resolution setting these could even take up more space.

Figure 5.4. The polygon count display


In the Faces line, the far-left number is the current scene's polygon count. This includes only the polygons of objects onscreen, so make sure your entire mesh is visible. Our current polygon count is 5856. This is 1356 over our budget, which is what we expected.

Remember that we added the higher-resolution hands and ear in Chapter 4, to see if we could use them. Each hand alone is around 1010 polygons. If we replaced those with the lower version, which was 406 polygons each, we would save 1208. But we don't want to do that just yet as we first need to remove the unnecessary polygons. We will begin by looking at Kila's upper body, concentrating first on her arms before moving on to her torso, considering various places where we can cut back. Next we will look at the lower body, including waist, legs, and feet, before working on her hair, neck, and face.

After we've made some changes, we can recheck the polygon count and decide whether we need to make any additional sacrifices, such as swapping the hands for lower versions.

Optimization Methods

In this chapter I don't explain in detail how I am removing polygons. Feel free to use one of the following methods, which you have already seen used in the book so far:

  • Simply select the edge and go to Edit Polygons > Collapse. This will collapse the edge, bringing together the two vertices it shared in.

  • You can weld vertices by going to Edit Polygons > Merge Vertices. This method gives results similar to collapsing the edges, bringing together the selected vertices. In some cases you will want to retain one of the vertices' positions; to do this, snap the others to it by holding down V while moving the vertex, remembering to weld them afterwards.

  • In some instances you can simply select the edges and press Delete; this will remove the edges but the vertices will remain in the geometry. You will then have to select and delete those, too.



    Arm Optimization

    Let's begin by looking at Kila's arms. (We'll leave the hands for now, just concentrating on the arm itself.)

    Before you start, make sure to press Z/Cmd+Z to undo the triangulation you used to get a polygon count. Or you can reload the file called Kila_Complete.mb.

    With the model now back in quads, the polygon count will be lower, around 3342. Don't let this fool youMaya's quads can be made from a number of triangles, not just two, so this number is not an accurate reflection of the number of triangles in the scene. We want this amount to be around 2600. When in doubt, it's always best to do a quick triangulation to check the actual count.

    1.

    Looking from the front, you can see three sections of polygons that can be removed because they affect the shape of the arm only slightly. These areas are highlighted in Figure 5.5. The best way to remove these polygons is to collapse the edges, so go ahead and do that now.

    Figure 5.5. Remove the shallow angles from the arm.


    2.

    Move the row that is closest to the wrist down the arm (Figure 5.5, bottom). This will help when the wrist deforms.

    3.

    On the top of the arm, you can remove some of the small polygons that exist here. Collapse the edges highlighted in Figure 5.6, left.

    Figure 5.6. Collapse the edges that form small polygons on the top of the arm.


    4.

    You will have to do a bit of repair work to the areas from which you have removed the polygons and edges. The shape of the biceps and the shoulder area will need some extra work (Figure 5.7).

    Figure 5.7. Tidy up the arm area after optimizing.


    TIP

    If you end up with two adjoining triangles, try converting them into quads. Select them and go to Polygons > Quadrangulate. This helps to keep the mesh clean and tidy.

    NOTE

    When converting to quads, Maya will guess at the way the triangles should lie. This could result in concave areas like we saw on her hips in Chapter 2. In such instances, it will be necessary to keep the area triangulated.

    5.

    Optimize the back of the arm by welding the vertex in the center of the X (Figure 5.8, top) to a vertex above it.

    Figure 5.8. Remove the vertex in the center of this X by welding it to a vertex above it.


    That's about all we should do on the arm for now; if we need to, we can reduce it further later.