Maya Journal: My 3D Modeling Career
Revenge of the NURBSDuring 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.
Importing Reference ImagesFor the Mech project I'm doing in the Introduction to Maya 2015, I'm using source images from the project files. These source images are 2D renderings that will represent the X and Y axis views for building up the Mech's 3D model. When using this method, you're basically modeling an object from two dimensional (i.e. height and weight) references. When added together, they create the third dimension (depth). Importing reference images or "image planes" is fairly straightforward, but I did run into some problems. For now, let's look at the basic procedure for importing image planes, and then some problems you might also encounter. First, you'll want to go to the panel layout view where you can see the three orthographic views (i.e. top, front, side) and the perspective view simultaneously. Next, choose either the front or side orthographic view ports and locate the "View" menu on the panel toolbar. Next, go to: Image Plane > Import Image. As an example, below I am accessing the front view panel toolbar because I'm importing the front image reference. After finding your image, click "open". Your front image plane is now linked to your front perspective camera and should appear there sitting on top of the grid. If you can't see your image, it may be too small or large. You can adjust the height and width of the image plane in the channel box. Make sure the image plane is selected so that its attributes are listed in the channel box window. You can see in the image below that I've changed the front image plane's height and width dimensions to 500. You can also see that the image plane now appears in all four views. Now, you simply repeat the process for the side reference image by importing it within the side orthogonal view and setting its dimensions the same. Remember: you'll now be using the "View" menu from the SIDE viewport for importing not the FRONT one as before. I've indicated the two different view menus with arrows in the above image. Next, move either the front or side image plane up so that the Mech's feet are "standing" on the on the Y axis. Note the value in the Translate Y field. In this example, I've set it to 158. All I need to do now is move the other image plane up the same amount of units to ensure that each plane is level with each other. This is important because you don't usually want to work with one reference that's at a different height than another. The results would be less than desirable. Also, don't forget to ensure that both images have the same width and height (500 in my example). After importing both image planes, you can finally move each one of them backwards from the origin to make space to build your model. As you build the model, you can use the space bar to switch back and forth from the side and front views to ensure the proportions of your model correspond to both image planes.
Problems with Importing Reference ImagesWhen I first imported an image for a reference, I ran into a problem where when I zoomed out to frame the image, it would just disappear. This happened with both the front and the side references. I tried tweaking my grid settings, although I don't recall why I thought the grid would have anything to do with the image plane disappearing! Eventually, I got them to stop disappearing by substantially shrinking both image's dimensions to about a quarter of their size. It worked, but it wasn't a perfect situation. Eventually, I figured out the problem: what I wasn't understanding at the time was how 3D cameras work with image planes. I had to familiarize myself with something called "clipping planes" to finally understand what was happening. I also used familiar terms like field of view and depth of field as analogies to help me comprehend why my image planes were disappearing. In cinematography and photography, your camera has both a depth of field (DOF) and a field of view (FOV). A camera lens' DOF indicates the area in front of the camera that remains in focus, while FOV indicates how much of a scene is visible within a static shot. Clipping planes act like a mixture of both. That is, you can set how near or far your 3D camera will view objects within a scene. Each of the four views, by default, has a separate camera that can be moved and adjusted in various ways. One of those adjustments is in its near and far clip planes. To adjust the clip plane for a particular viewport camera, you select the camera you want, open the attribute editor, and find the camera attributes tab as in the example below. Under the camera's attributes, there are two fields for Near Clip Plane and Far Clip Plane. The near clip settings determines how close to an object you can zoom in on until the camera no longer can see it. The far clip setting is how far way you can zoom out until the object goes beyond the camera's view or is "clipped" from the scene. What was happening to my reference images was that my far clip plane was set too shallow. When I zoomed out, my image plane was "clipped" and disappeared. To fix this problem, I simply increased the distance from 1,000 to 10,000. Try hiding from me now image plane! Another issue you may run into is that your grid may be too small to incorporate your two image planes. You can adjust your grid's size by going to display in the main menu and looking under grid options. There you can increase the grid's length and width.
Beginning the Mech's TorsoAfter 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!
Using Quad DrawQuad draw is a tool within Maya's modeling toolkit that allows you to quickly create quads (four-sided polygons) by drawing them on a surface. This method creates what is called a topology for an object. In the Introduction to Maya 2015 lesson, the work flow is to draw quads upon the NURBS surfaces we've just created for the torso. Essentially, what is being done is creating a basic shape and then using that shape as a template or blank to built a polygon surface. After you've created all of your quads, you can simply delete the NURBS surface blank and you're left with an exact replica of the same shape made from polygons. You can think of this work flow as analogous to doing papier-mâché on top of a balloon and then, after it dries, popping the balloon. What is left is the empty hull of papier-mâché that forms the exact shape of the balloon. This is just one of many work flows you could use to achieve the same result, and the quad draw feature allows you to do this fairly quickly. You can access the modeling toolkit by clicking on its icon located in the upper right part of the status bar, next to attribute editor. Next, engage the quad draw tool as in the image below. Your cursor should change to a cross to indicate you are now ready to draw quads on the NURBS surface. The quad draw tool works by allowing you to create four vertices any where you want and and automatically forming quads based on those points. However, in order to get your vertices to snap to your geometry, you have to tell Maya you intend to do so. To do this, you have to make your object "live". This can be done under the Modify menu where there is an option to "Make Live". Your object's overlay should turn to a dark green, which indicates that it's ready for quad draw. Next, you simply create four vertices on the NURBS surface, hold down the shift key, hover over those vertices with your cursor, and Maya will allow you to form a quad by simply clicking the LMB. A suggested quad is highlighted in green. Important Note: I had trouble with quad draw because I couldn't get my vertices to snap to my NURBS surfaces. Instead, they kept snapping to the grid. There is a section above the quad draw called "Transform Constraints" that allows you to select specific surfaces or objects to constrain your vertices to. However, this option would now allow me to select my NURBS spheres, only the grid. I could not make the NURBS surface live. This was very frustrating and forced me to divert from the normal path. Ultimately, I had to convert the NURBS of my Mech body blank to polygons for quad draw to work properly and snap the vertices to their surfaces. Regardless, whether you're dealing with polygons or NURBS, quad draw works the same way. So, the process of creating a topology with quad draw is actually relatively easy to do. You just start at the top of the body blank and begin covering the surface with quads, working your way downwards, around the windshield. You're only going to complete half of the body blank topology. That's because Maya can mirror the other side for you, creating an exact replica and joining the two halves, which we'll do at the end. It's a pretty awesome way to get the software to do the work for you! When drawing quads, make sure that you draw around the arms and down the back side where the jet pack will sit. You can also adjust any quad you draw by selecting its vertices and moving them where you want. The major problem with drawing quads isn't really creating them. That's easy most of the time. It's more of a planning problem. You need to make sure you keep an equal amount of quads as you move across the Mech torso. What you're aiming for is a nice, uniform grid. Don't go creating quads just any where you please or you'll end up with a patch work of offset squares that don't fit together nicely. Instead, plan your grid out carefully so there's an equal number from beginning to end. For example, if you begin with 15 quads that go around the windshield, then try and have 15 that end at the side of the Mech's body. That way your lines run straight across from one side to another. For me this was pretty tough to do correctly. Compare the differences in the quad draw mesh that was created in the two images below: It's easy to see how the topology on the right is much cleaner and more uniform than the one on the left. In the image on the right, the quad lines run straight across, while on the left the lines are interrupted and messy. The finished topology for the Mech's upper torso half should look something more of less like this:
The Hidden Evil of Selecting ComponentsI 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:
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.