# Maya Journal: My 3D Modeling Career

##### ‌‌
In my last Maya Journal article, I finished up with Maya's user interface. I can confidently say I now have a much broader understanding of where tools and features of the UI are located. This helps make my emerging work flow come together faster. Now, I'm going to start actually doing some modeling on the Mech project. However, I want to first start with a discussion of NURBS surfaces--what they are and how they're different from polygons. Next, I'll look at how to import some Mech references images into Maya as image planes. Then, I'll begin building a body blank for the Mech's upper torso and use quad draw to create polygons over that blank. Finally, I'll pause briefly to discuss some good practices when selecting components before moving on to finish up the Mech's upper torso.

### Revenge of the NURBS

During the previous Maya interface sections, I worked with shapes like spheres and cubes that were polygon primitives. As I mentioned, these 3D primitive shapes are made from other 2D polygons like triangles or squares (a.k.a. "quads"). However, there is another way to build 3D objects that uses not shapes but curves. These resulting curved shapes are called NURBS. The word "N.U.R.B.S" is an acronym that stands for Non-Uniform Rational B-Splines, which doesn't help at all in understanding what they are other than to suggest they are based on curves (i.e. b-splines). One way to think of NURBS is that they aren't exactly shapes, but more like surfaces. In fact, in Maya's user interface NURBS are located in the "surfaces" tab on the shelves section. I found this distinction between polygons and NURBS a particularly difficult concept to grasp at first. Therefore, I wanted to bring up their discussion in this installment because I thought other 2D'ers might have the same confusions. Again, it's best to think of NURBS as surfaces or rather square patches that you can deform to make shapes. This is in contrast to polygons like squares or triangles that you use when building a 3D object. It might be better to think of NURBS as being like a large piece of construction paper. Now, let's say you wanted to make a cylinder out of some construction paper. That's easy enough, you just roll the paper up and attach the two ends, which creates a seam where the two ends meet. This is basically how you use NURBS to create objects. However, to understand their limitations, think of creating something like a human face with a piece of construction paper! This would require a lot more folding, bending, and manipulating to get it just right. It would probably be much easier to use polygons instead. That is you could cut the construction paper up into smaller shapes (i.e. triangles and squares) and then glue their edges together to make all of the bends and folds. NURBS and polygons are different digital materials for creating similar things; however, each can be more appropriate to use depending upon what it is you're modeling. For example, NURBS are often used to create non-organic surfaces like cars, soda cans, and other types of synthetic (metal, plastic, etc.) objects. That's because they form very nicely rounded surfaces quickly. Polygons are easy to work with and can be used to form some really complicated geometry and are used to create low-res versions of high-res images for quick computation. Now that we sort of know what NURBS are, we can turn our attention to getting our 3D work space ready for modeling by importing the images we'll be using as references to build the Mech. We'll turn to actually using NURBS when we begin building the body blank.

### Beginning the Mech's Torso

After getting the reference images all squared away, I can use them to build a basic torso blank for what will be the main Mech body. To do this I used a NURBS sphere to create the main body and a smaller NURBS sphere for the windshield. Building the main torso out of NURBS surfaces let's me form the body's basic shape quickly. And since working with NURBS is somewhat different from polygon primitives, using them will give me some much needed practice in their creation and translation. Before I create a NURBS sphere, I want to go into Create > NURBS primitives, and make sure "Interactive Creation" is UNCHECKED. Having interactive creation checked allows you to draw your shape any where on the grid, giving you control over its original shape. However, if it's unchecked, Maya will create a one unit sized object at the origin of the grid. Since we're creating the Mech at the origin anyway, it's handy to have the other objects originate there as well. So, uncheck interactive creation, turning it off. Also, it will help if you begin building in one of the orthogonal views. (Remember: you can switch from any view by hovering your cursor over that view and hitting the space bar). Next, just choose to create a sphere from the "NURBS Primitives" option. As you can see in the image below, I'm in the front view and my NURBS sphere is sitting at the origin by the Mech's feet. Now I can move it upwards and scale it out to create the egg-shape that is a rough approximation of the torso. You may want to switch to the side view first, rotate the sphere, scale it, and then resume with front view. This actually seemed to be an easier work flow for me. One way NURBS are different from polygons is in how you adjust their shape. Remember that there are vertices, edges, and faces to any polygon shape, and NURBS have similar "parts" called isoparms, surface patches, control vertices, etc. Without going too much into what these different NURBS components are (because I don't really know yet), just understand that their control vertices work in a somewhat similar way to polygon vertices. They are points that can be used to change the shape of a NURBS surface. For shaping our first NURBS sphere, we can us the hull selection mode by RMB clicking on the sphere and choosing the "Hull" option in the hotbox menu as seen in the image below. As you can see, the hull selection creates a frame work around the sphere. The hull selection mode allows you to select a group of specific control vertices or all of them at once. To model the NURBS sphere to the approximate shape of the upper torso, I can move through the frame work scaling each collection of control vertices. I can scale them up to form the shoulder section and scale them down near the tapering hips. In the image below, you can see where I'm scaling one specific group of control points inwards near the legs. Also, I'm using my reference image to get the correct proportions. I can then switch back to the side view, change to control vertex mode, and adjust the front and back of the NURBS sphere to fit my reference image. To create the windshield, I can go move through the same basic process of creating a sphere and and using object mode scaling to make it the right size and shape. The image below shows my finished main torso in the perspective view. This result took a lot of tweaking with the scaling, rotating, and moving vertex controls and individual vertices. One thing I've learned about 3D modeling is the less you can mess with a shape, the less problems you're likely to run into further on. Don't be afraid to start over with these two shapes. Repetition is key to improvement and learning here. I lost count in how many times I started over just to create this basic body shape!

### The Hidden Evil of Selecting Components

I want to pause for a moment and discuss one of the most frustrating experiences working with 3D I've had so far: selecting components. To be more specific, I mean selecting components that I did not intend to select. What happens is that I inadvertently select components (vertices, edges, faces, etc.) that are hidden behind my current view. Then I unknowingly move them along with the ones in the front. There have been many times when I'm working on one side of the Mech torso, get it just how I want it, then orbit around to the other side only to find it warped and disfigured. It's enough to cause an emotional meltdown. The image below represents a very common situation where I've inadvertently selected components on the backside of the model. You can see that I've marque selected these four quad faces in the lower section of the torso. However, what I don't know at this point is that I've also selected three others directly behind them as in the image below. This problematic situation occurs most often when I do a marquee select instead of directly clicking on an individual component. However, even direct selection can also create this problem, especially when you're dealing with a heavily populated area of vertices. However, taking the time to select each individual vertices, face, or line out of the possible hundreds is not a realistic option. It would be awesome in such catastrophic situations if you could just Ctrl+Z your way out of the disfiguration, but you can't because that would undo the progress you've made on the good side of the model as well. There's really no choice but to undo to the beginning of your initial translations or try and fix the disfigured side. Both are time wasting and blood pressure raising options. However, here are some techniques and tools you can try if you run into the same problem with inadvertently selecting and moving components:
• #### Backface Culling

One way to avoid selecting components is turning on "Backface Culling," which is located under the main menu Display > Polygons > Backface Culling. [Make sure you're in object mode before turning backface culling on]. What backface culling does is simply tell Maya not to render any of the back faces of polygons. That way you can't see those polygons, and if you can't see them, you can't select them. For example, in the before-and-after image below, you can see when I have backface culling on (left) and when I have it off (right).

Again, the idea behind backface culling is to limit your selection of components to those parts of your model that your camera is capable of seeing. In this scenario, I can more easily select faces, vertices, or edges on the front of the Mech's torso without accidentally selecting those in the back.

• #### Camera Based Selection

The same idea applies to another setting within Maya called camera based selection. It's located under Windows > Settings/Preferences > Preferences. [Note: make sure you're in object mode]. In the preferences dialogue box that opens, find the settings category and choose "Selection". In the selection preferences area, find the option to turn on "Camera based selection." Tick the box and save before exiting. With camera based selection engaged, you can now control what portions of your object's polygons are select-able by rotating or orbiting the object until all you want to select is in front of the camera. Although camera based selection still renders backfaces, it works in a similar way to backface culling: what you can see is what you can select.

• #### Switch to Wireframe Mode

Wireframe mode has the obvious advantage of letting you be able to see through to the backside of your model. Therefore, you can see which components are selected and which are not. However, as you continue to build upon your models and the numbers of vertices, faces, and edges increases, it becomes much harder to distinguish between front and back components. You can see in this wireframe image of the Mech below that the large amount of vertices easily becomes a swarm of confusing purple dots. It's hard to tell whether you're looking at the front or the back of the model. Nevertheless, wireframe mode can help you see when a component's selected that shouldn't be.

• #### Adding-Subtracting Selection Technique

This is a pretty effective marquee selection technique that I've tried to incorporate into my overall approach to selecting objects in general. The technique uses the addition selection (Shift+LMB) along with the subtraction selection (Ctrl+LMB) to help eliminate unwanted selections. Remember that to marquee select you click and draw the box around an object or specific components. To add more to your selection, you hold down the shift key and continue selecting. But to subtract a selection, you hold down the Ctrl button.

To use this technique effectively, you can do an additive marquee select of an area you want, then do a subtracting one around the perimeter of that area. Any components that were mistakenly selected, would then be un-selected through this process.

These techniques and tools, used alone or in conjunction, are only a few of the ways that you can help select only those components you want. They are just the one's I've found most helpful so far. If nothing else, to help avoid selection mistakes, you should make it a habit to orbit around your model and make sure nothing on the backside is selected before you begin changing anything.

### Mech-on-the-Half-Shell

Now that I've got one half of my Mech's upper body, I can clean it up and get it ready to create a mirror image to form the entire torso. Mirroring an object saves you exactly half the time it would  take to build the entire thing. That's because you only need to build half of it, and Maya will create a mirror image, connecting the two halves. Before mirroring any part of a model, however, you need to make sure your half looks good, with straight edges and nicely spaced lines. Mirroring is great, but if you start with half of a crappy model and then duplicate it, you now have one whole crappy model. So, make sure its right before you mirror it. For example, your Mech half should have straight inside edges. These inside edges are the lines that will be joined with the mirrored half. In a sense these lines are like the mold line of a plastic toy or something equivalent. It should be obvious that if my mold line is crooked, and if I join it with another crooked crooked line, that the formed line will have gaps. So to avoid this, these mold lines should be straight. Thankfully, this is pretty easy to ensure by using the X and Y axises and Maya's snapping feature. You can use the Y-axis (vertical line) as a straight edge for aligning your torso edges. To do this, first go to the front view  and see how close your edges are off to this vertical line. For example, you can see below that my "mold line" is pretty far off from being straight with and parallel to the Y-axis. From here I could select every vertices along the line and move them to line up with the Y-axis; however, this would take some time and would only result in a somewhat straight line. Instead, I can select all of the vertices that make up the mold line and snap them to the Y-axis. Below you can see I've selected all of the vertices that make up the mold line. After I activate the move tool, I can hold down the X button while moving all of the vertices to the left. As I move them, they should snap to the Y-axis, automatically placing themselves in a straight line. Bam! Now, I can do the same thing for the bottom of the Mech torso. However, I only want to snap to the Y-axis to straighten the edge line. After that, I can move the entire thing to match where the armor stops as seen below.

### Mirroring the Other Half

Using the mirror function is pretty easy after you understand which way in space you want to create the other Mech half. Below is a perspective view looking from slightly above at the one half of the torso. You can see that the X-axis is moving left and right, and I've added a minus and plus sign to indicate its directional values (i.e. left is negative, right positive). These directions are important to know when mirroring because you have to tell Maya which way you want to mirror your selected object. In this case. our existing half is making up the right or +X side, so we need to set our mirror options to add to the -X side (left). To do this go to the Mesh > Mirror Geometry > and click the options square on the right. This will open up the Mirror Options dialogue box. There are several settings in the mirror options box which help tell Maya how to mirror an object. Since I want to create the half in the -X-axis, I'll make sure I've clicked that radio button in the "Mirror Direction". Then I make sure "merge vertices" is engaged because I want the two edges of the half to be joined together permanently, forming one object. Then I hit apply and mirror. . .Bam!...Maya made an exactly mirrored copy of the Mech torso half and merged with with the existing one.

### Conclusion

In this Maya Journal installment, I've looked at importing reference images (i.e. image planes) for creating a 3D model. Also, I've begun building the main torso of the Mech by using a NURBS surface to construct a basic shape and then quad draw to create a polygon on top of that. Although I haven't gotten very far in this article with actually modeling the Mech, I do feel that I've gained some important skills that let me avoid pit falls and problems with the modeling process. These skills include strategies for using quad draw, making effective selections of components, and learning to snap components to the X, Y, or Z axis. Mastering these skills has gone a long way in helping me understand how to maneuver within a 3D space. Next time, I'll be moving on with the modeling by learning to extrude edges that will help give the torso some thickness and help form the back thrusters and shoulder pieces.