CHAPTER 3

image

Architectural Modeling

 

 

As is true with most all of 3D, there are several ways to accomplish a particular look or shape. In Maya, this is especially true. When you are looking at the mounds of research, you will have done before a project and are trying to plot out how to model a particular shape, there will actually be quite a few methods that will present themselves. Picking which is best for which situation is the key.

In order to efficiently pick the best method, it’s important to understand a bit about how 3D software works, and how we see what we see when looking at 3D forms.

The Polygon

Figure 3.1 is a portrait of the star of the 3D show — the polygon. The polygon is both the star, and the smallest of players — it is what all forms (that we see) are made of.

image

FIG 3.1 The polygon and its parts.

Parts

Polygons have several component parts (which we’ve referred to in the last chapter). These components are labeled in Fig. 3.1. Let’s talk about them for a minute:

Face: This is what we intuitively think of as the polygon. It’s the surface that we actually see. While it has a width and height, it has no depth — it’s infinitely thin.

Normal: A polygon’s normal is simply its front. The simplest way to think of this is that every polygon has a front and a back, and the normal (by default) runs perpendicular to the front of the face. This can be a little abstract until it’s seen in action (which we will examine in a little bit); but this becomes very important in situations like game creation because games (in order to draw things faster) don’t draw the backs of polygons. So, if the normal of a polygon is facing the wrong way, the polygon isn’t seen within a game engine. Normals can be further tough to understand because they aren’t shown by default when selecting a component and can be a little obscure to control. Not to worry though; we’ll spend some good time talking about them and especially getting them to face the direction they need to.

Edge: A face is surrounded by edges. These edges define the limitations of the polygon and the face. These edges also exist within 3D space, but actually contain no geometry of their own — they simply help describe the geometry of the polygon. When an edge is moved, rotated, or scaled, it changes the shape of the face and thus the polygon.

Vertex: Each edge has a vertex on either end of it. Vertices are one dimensional components that exist in 3D space. When a vertex is moved (one vertex cannot be scaled or rotated), it changes the length of the edges it is a part of, thus changing the shape of the polygons those edges contain. Do note, that a collection of vertices can be rotated or scaled which really is simply moving their relative location to each other.

UVs: These are really less of a “what” and more of a “where.” They are a coordinate system that allows Maya (or any 3D program) to know how to attach a texture to a collection of polygons. They are not particularly modifiable in 3D space — and really need to be handled in 2D space — most particularly in something we call “texture space.” Much, much more on this later.

Traits of Polygon

To understand what polygons are and how they work, consider this metaphor. Polygons are like very thin (but very rigidly strong) plates of metal. An individual polygon cannot bend — it is planar. However, multiple polygons can be joined along their edges, and they can indeed bend where they connect.

What this means is that if you take six polygons and attach them to each other, so that they share edges and vertices, you get a cube (Fig. 3.2). Increase the number of polygons and the number of places where the shape can bend increases; this means a form can become more and more round as the polygon count increases.

image

FIG 3.2 Increasing polygon count increases curve possibilities.

But notice that even the seemingly smooth sphere on the far right of Fig. 3.2 is still made of non-bending polygons. Check out the close-up of that sphere shown in Fig. 3.3 — see the edges of those polygons?

image

FIG 3.3 Close-up of a smooth sphere and the still non-smooth, rigid polygons.

Polycounts

So what does this mean for us? Well, polygons are not only the building blocks of shapes but also the building blocks of the data set that the computer must keep track of for any shape or scene. Especially in situations like games, this data set can be hugely important when considering framerates (the rate—frames in a second—at which the video card is able to display the information of a scene). Too many polygons and the computer simply can’t process them, and the video card can’t draw them fast enough to allow for any sort of meaningful gameplay.

Now, to be fair, polycount (the number of polygons in a scene) is rarely the most limiting factor of gameplay. Textures and dynamic shadows usually have a bigger influence on that with today’s hardware. But get too many polys and even the most robust systems can be ground to a halt in both games and inside of Maya as the scene is being manipulated.

Thus, the age old dilemma — and the craft of good 3D — is to use as many polygons as are needed to describe a form, but no more. How many is too many? The answer is tough and really a moving target. Too many for my machine as I’m writing this may be different for your machine when you read this. Not long ago, a scene with a million polys was way too many to work with and today that’s almost a trivial amount.

So the answer is: depends. I know, terribly unsatisfying, but along the way in our tutorials, we will always be keeping our eye on efficient use of polys, so that we can ensure a project that is most useful on the most machines.

Modeling Modes

“Now wait a minute,” you may be saying, “I’ve done some 3D and know that there are things like NURBS and Sub-D surfaces that are 3D forms that aren’t polygons, are they?” This can be a bit confusing — especially in Maya. Maya does have a Polygons Mode that allows for the user to create polygons directly; it also has some other modes that are involved in making shapes — particularly the Surfaces Mode which has an entirely alternate collection of tools that also create shapes. It would seem like this indicates that there are other forms besides polygonal.

But here’s the deal. When a computer draws a shape and displays it on the monitor, the only shapes it “sees” are polygons. And particularly three-sided polygons called tris. All of the modeling techniques in Maya — either polygonal or NURBS or Subdiv Surfaces — are simply ways of creating and manipulating collections of polygons — triangular polygons. The video card sees these triangular polygons (regardless of how they were arranged in Maya’s various modeling modes) and displays the form accordingly. The process of converting a model into all tris is called tessellation (Fig. 3.4).

image

FIG 3.4 All forms in 3D end up as triangular polygons at render time. The top image shows the form as modeled, and the bottom shows the tessellated version as the renderer sees it.

It’s for this reason that polygonal modeling has remained a constant reliable choice when tackling modeling challenges. Since the final product is going to end up polygons, creating the forms from easy-to-manipulate polygons often yields the most reliable results at rendering time.

But, it’s not always the best solution to finding a form. I’m a huge fan of polygonal modeling, but at the end of the day, polygonal modeling is not as direct as it may seem. Because even the polygons that polygonal modeling creates are tessellated, it still is a bit indirect, and sometimes things like NURBS simply create a better form more quickly. Often, the tessellation issues are easy to manage with other forms of modeling — and in fact, we will be using other forms of modeling throughout the book when they are the more efficient path.

But enough talk. Let’s start building stuff.

Escaping the Madness

This is our fictitious game in which you, the player, have been institutionalized because of your insistence on the guilt of a local politician in the recent disappearance of several youth in the community. Your goal is to escape the sanitarium and prove his guilt. The rub is that you actually are a little crazy and tend to see things much more dire than they really are (Fig. 3.5).

image

FIG 3.5 Finished render of the geometry we’ll create in this chapter.

Because of this, the mental hospital that you are currently held at appears to you as run down and abandoned. To you, the walls are crumbling, the rooms are abandoned, the orderlies are all brain sucking drug dealers, the doctors are monstrous sadist scientists, and your fellow patients’ inmates in a hellish prison.

Unfortunately, we aren’t going to be able to build this game — it’s well beyond the scope of this book. However, we will be building a section of the mental hospital you are trying to escape (Fig. 3.6).

image

FIG 3.6 More shots of the final output of this chapter.

In this chapter, we will be creating all of the geometry for one level of the game. Through the course of this tutorial, we will use polygonal and NURBS-based modeling techniques. Since this is a game level, polycount will be important — but this doesn’t mean that the forms will be simple. Although the walls, windows, and furniture will appear gray, we should still be able to create sophisticated shapes that help convey the terror of the space (Fig. 3.7).

image

FIG 3.7 Renders of the game level completed in this book.

Gathering Research

Abandoned sanitariums are actually pretty easy to find online. It means that there is a plethora of great research easily seen and assembled. Unfortunately, I don’t have the rights to reproduce any in this book, but do a quick Google image search and collect the images that excite or inspire you.

Sometimes, this sort of research collection can be about finding images that assist in understanding architectural structure (how wide are the hallways, what sort of doors are in the facility, what shape are the windows, etc.), but it can also help in defining texture choices (are the walls painted plaster? tile? what color?, etc.). Most importantly, this sort of research can greatly assist in establishing mood.

As I was collecting research for this tutorial, I stopped when I had assembled about 200 images. Take a particular look at image searches using “Beelitz Heilstätten”; there are some great structures in that facility and lots of really beautiful photographs captured by a wide variety of photographers. Generally, the spaces we will be creating are based on the architecture of this facility.

Tutorial 3.1 Architectural Polygonal Game Modeling: Escaping the Madness

Setting the Project

In the last chapter, we finished things up by creating a new Project called “Escaping the Madness.” This Maya Project took the form of a folder on your hard drive that included a slew of other folders that defined where certain assets would be stored. This keeps things clear for Maya, so it knows where to find what.

When first sitting down to a machine and getting ready to work on a project always make sure that you are dealing with the right project. Especially if you are a student in a lab situation, it’s easy to inherit someone else’s settings and thus inherit the project they’ve defined. If you start creating and saving assets into the wrong Project, paths and connections can be made that will haunt you much later down the line.

Step 1: Set the Project. Do this by selecting File > Set Project.

Step 2: In the dialog box that next appears, be sure to navigate to the Escaping the Madness folder, and when inside that folder (or with that folder selected), hit the Set button.

Why?

Setting the Project in this way let’s Maya know where the parent project folder is, and thus all the children folders that will enable Maya to know where the relevant files are.

Warnings and Pitfalls

Even when I’m working at home, when I sit down and launch Maya, I always set the Project before opening anything. Similarly, I never open a Maya file by simply double-clicking it in the OS. I always set the Project, and then once I’m sure Maya understands what the Project is, I use the File > Open to open the file I’m working with.

Saving a New Scene

Step 3: Create a new Maya scene via File > New Scene.

Why?

Scenes are what people usually think of as Maya files. Maya can keep one or many scenes within the Project’s “scenes” folder.

Step 4: Save the scene with File > Save Scene. This will open a dialog box similar to Fig. 3.8. Notice that the “Look in”: input field that Maya has automatically taken us to the “scenes” folder inside the “Escaping the Madness” project folder. Name the file ETM_Hallway and click the Save button.

image

FIG 3.8 Saving a file. Note that this is a chance to double-check that your Project is set correctly.

Warnings and Pitfalls

If you are not taken to the scenes folder, stop. It means that Maya does not understand the Project yet and doesn’t know where things should be stored. Go back and try setting the Project again (Steps 1 and 2). If this still doesn’t work, there may have been an error in how you created the Project — so recreate the Project (last chapter). If you save this file in some other place besides the location, Maya thinks its scene files should be your future paths of textures and other things will be absolute and thus you’ll never be able to share this file with someone else or open it on another machine without everything breaking.

 

Why?

So, why are we saving when there is nothing in the scene? First, this gives you a chance to double-check that the Project is set right. If Maya takes you to any other place but the scenes folder you know something is wrong. Second, saving often is just a fact of life when using Maya. Maya’s a great application — but crashes are not unusual and getting into the habit of saving often is critical to minimizing lost time.

Laying the Foundation

Now it’s time to start making geometry. Before we do so, it’s worthwhile to point out that we may be doing things a little differently than Maya’s default settings.

For instance, in the last chapter, we did some mini-tutorials in which we turned off Interactive Creation (Create > Interactive Creation). What this does is that instead of dragging out an object into existence (which is how Maya works by default these days), it creates an object at (0,0,0) in world space and usually at a size of 1.

Problems with Scale

Units in Maya can be a little tough to work with. By default, Maya is working in centimeters (although we’ll change this in a minute). However, it can be a little difficult seeing exactly what the size of an object is.

Here’s why. In the Channel Box, the information provided for a selected object is Translate (X, Y, & Z), Rotate (X, Y, & Z), and Scale (X, Y, & Z). Notice that it’s Scale and not size. What this is referring to is the scale of the object since it was created. This means that an object that was created as 20 feet wide by 20 feet deep by 20 feet tall will show up in the Channel Box as Scale X, Y, & Z = 1. Ironically, an object that was created as 1 foot, by 1 foot, by 1 foot, will also show up as Scale X, Y, & Z = 1. See the problem?

It’s for this reason that I like creating objects that are 1 unit in size as that matches the scale settings. Then, if the object is scaled five times as big, to 5 feet, the Scale settings in the Channel Box will also show 5. It gives us a quicker look at what the size of an object actually is.

To be fair as soon as components are altered (moving vertices or faces), the Scale setting in the Channel Box becomes completely inaccurate since at that point we are reshaping the object — not scaling it. But, for early roughs I like keeping the Channel Box as relevant as I can as long as I can — it just makes initial work go faster.

Changing Units

Step 5: Change the units to feet. Do this by selecting Window > Settings/ Preferences > Preferences. In the Categories column, select Settings. Then, in the Working Units section change the “Linear”: setting to foot. Click the Save button.

Why?

In a game model, this units setting is not all that important. Maya will export the file according to the unit setting defined in the exporter (so the absolute size could be tweaked there). However, if later you end up using any physics in Maya, the real size of objects matters (an object will appear to fall off a shelf to the floor much different if Maya thinks the shelf is 3 feet off the floor than if Maya thinks it is 3 miles off the floor). So, it’s worthwhile to keep things clean from the beginning.

Saving Incrementally

Incremental saves are absolutely one of the most beautiful and important parts of Maya’s structure. What it does is each time you save in Maya, a copy of the last saved version is placed in a folder called Incremental Save before saving and overwriting your file. This means that you have a linear history of every save you make within Maya.

Seems overly complex now, but every single semester I have taught, someone has come in with a Maya scene file that is listed as 0 KB; it’s empty — gone. We’re never quite sure what causes this or what corrupts the file. What we are sure of is that if the student has been using incremental saves, he has lost time for sure — but only the time since his last save; he doesn’t have to start over.

It just takes a second to tell Maya to incrementally save the files, but can save countless hours in the disastrous occasion of corrupted files.

Step 6: Choose File > Save Scene (Options). Click the Incremental Save option, and click the Save Scene button.

Tips and Tricks

From now on a quick Ctrl-S or Command-S will save the scene and do it incrementally. Do this often — not just when it’s called out in the tutorial. Save often. Save often. Save often.

Roughing Out the Scene

If you have drawing or painting experience, you are probably quite familiar with this idea. With very broad strokes, we are going to construct the bones of the scene. Some of these bones may be altered and even deleted later, but they help establish scale and make sure the size of walls, doors, and rooms are appropriate.

Creating Hall Floor

Step 7: Choose Create > Polygon Primitives > Plane. This will create a 1 × 1 units (feet) plane in the middle of the scene.

Why?

With the default settings, Maya would make you draw the shape; but since we have Interactive Creation turned off, it automatically creates the 1 × 1 plane.

Step 8: Adjust the Scale of the plane to yield a plane that is 8′ wide by 100′ long. To do this, with the plane selected make sure the Channels Box is visible and change the Scale X input to 8 and the Scale Z to 100.

Why?

This is going to be the size of the main hallway. It’s important to note that changing the Scale X and Scale Z values to 8 and 100, respectively, does not guarantee in all cases that an object is then 8 × 100; however, because we created this plane at 1 × 1, scaling it to 8 and 100 times, its 1 unit does indeed yield an 8′ × 100′ plane.

 

Tips and Tricks

If the Channel Box is not visible for some reason, you can toggle its visibility by clicking in the very top right corner of the Maya 2012 interface (right beneath the close button on a PC).

Step 9: Keep the polycount low by ensuring that the plane is one polygon. Do this in the Channel Box editor, by clicking on the polyPlane1 (to expand it) under the INPUTS section. Make sure the Subdivision Width and Subdivision Height both read 1 (Fig. 3.9).

image

FIG 3.9 Final Channel Box settings for the hallway polygon plane (notice the name of the object in yours will be polyPlane1).

Why?

In most cases, having the much more dense default of 10 polygons by 10 polygons would be fine. However, because this is a game model, we want to be ever mindful of keeping the data set small. Part of this effort is wrangling the polycount. If the hall is one big long plane, one polygon will do it. A total of 100 polygons will do it as well, but add lots of unnecessary information for video cards to draw.

Step 10: Rename the plane to ETM_HallwayFloor. There are several ways to do this, but my favorite is via the Outliner (Window > Outliner). There, doubleclick the pPlane1 object to rename and enter ETM_HallwayFloor.

Why?

Naming your stuff is not just vanity or anal retentiveness. 3D work usually ends up being a group effort and having well-named objects makes sure people on your team like you.

Step 11: Hit 5 on the keyboard to show the plane as a solid shape (Fig. 3.10).

image

FIG 3.10 Hallway completed.

Roughing Out the Walls

Step 12: Create a new cube that will become a wall. Do this via Create > Polygon Primitives > Cube. This will create a 1 × 1 × 1 cube sitting at 0,0,0 in the scene.

Adjusting the Manipulator

By default, the manipulator of an object is at the geometric center. This is a logical place to put it, but because the manipulator handle is the point around which the object rotates or scales, having it smack dab in the middle can cause problems in many situations.

For one example, consider a door. Most doors do not rotate around the middle of the door — but rather rotate on hinges on one of its edges. For doors, we want to definitely have the manipulator handle not in the middle of the door. Another example is the walls we are building. When we created the cube, it is sitting halfway through the floor. In order to get this cube scaled to the right size, we would need to scale it in Y, which means that it would grow up and down as it’s scaling from the manipulators location (in the middle). It would be much easier if the manipulator was at the bottom of the cube, so that as the cube was scaled, it would only grow up. Having a manipulator for the wall on the bottom will also allow for the wall to be snapped to the hallway floor.

Step 13: Hit the spacebar to shift to a four-View Panel layout. With the cube still selected, move the mouse over each View Panel and hit f while in each panel to frame that cube (or my tech editor pointed out Shift-f will do the same thing).

Step 14: Switch to the Move Tool (w is the keyboard shortcut) to see where the cube’s manipulator handle is (right in the middle of the cube).

Step 15: In the front View Panel, hold the d key down on the keyboard. Notice that the manipulator changes to look something like Fig. 3.11. This shows that the manipulator handle is ready to be moved (or otherwise manipulated).

image

FIG 3.11 Holding the d key down will activate the ability to move the manipulator.

Step 16: Still holding the d key down, press and hold the v key (snap to vertex). Now grab the green line of the current manipulator and drag downward toward the bottom of the cube. The manipulator should snap to the bottom. Release both the d and v buttons.

Why?

Lots of things happening here. First, there is the finger gymnastics of holding down the two keys at once, but that is a critical step. Holding the d key down tells Maya that the manipulator is to be moved. Holding the v key tells it to snap to the nearest vertex. By dragging the green line of the manipulator, we move the manipulator down only in y — it does not slide off to the sides of the cube but remains right in the bottom middle of the cube.

Warnings and Pitfalls

There is often the tendency for new Maya users to always grab the middle of the manipulator (the yellow square) when trying to move things. This is intuitive, but it means that the object being grabbed can move in any direction. So for instance, in this case, if the manipulator (even while holding d and v down) is grabbed by the yellow square, it will snap to one of the corners of the cube and not stay in the middle — this is because the yellow square means it can move in all directions and will move in all directions toward the nearest vertex.

Scaling and Positioning the Walls with Snapping

Step 17: Snap the wall to the floor’s level using the Move Tool by holding the x key down (snap to grid) and grabbing the manipulator’s Y-axis handle (the green one which will highlight to yellow once grabbed) and drag up. The cube will snap to be sitting right on the floor (Fig. 3.12).

image

FIG 3.12 Using Snap to Grid to move the cube up to sit on the floor.

Why?

It looks like we are snapping to the floor; in actuality, holding x down simply snaps to the grid. Because the floor is sitting at Y = 0 (on the grid), by snapping to the grid, we make sure that the cube is sitting right on the floor. Alternatively, the v key could have been held down as well while moving the cube up in Y, and it would have moved up to the next level of vertices visible in the scene — which also would have been the floor. Either way would work.

Step 18: Snap the wall to the edge of the floor. Still with the Move Tool activated hold v down (to snap to vertex) and grab the X handle of the manipulator (red) and move the cube to the edge of the floor (Fig. 3.13).

Warnings and Pitfalls

My tech editor reminded me that you must have one of the corners (vertices) of the floor visible in the persp View Panel in order for snap to vertex to work. So, you may need to dolly back to make sure you can see a vertex of the floor to snap to.

 

image

FIG 3.13 Snapping the cube to the edge of the hallway floor.

Step 19: Resize the wall to be 6 inches thick (0.5′), 10 feet tall, and 100 feet long. This can either be done via the Scale Tool or in the Channel Box editor by entering .5, 10, and 100 in the Scale X, Y, and Z input fields (Fig. 3.14).

image

FIG 3.14 Results of resizing the wall with appropriately placed manipulator.

Why?

Because the axis of the cube is at the bottom center, when the scale settings are changed the wall grows up and out and fits to the floor.

Step 20: Rename the wall to ETM_HallWallEast.

Duplicating

Generally using Copy/Paste in Maya is a bad idea. The node-based structure of Maya means that there are just some goofy things that happen with Copy/Paste.

Alternatively, Maya has a Duplicate Tool (Edit > Duplicate) and a sister tool — Duplicate Special — that do some great things.

Step 21: Duplicate ETM_HallWallEast. With ETM_HallWallEast selected, hit Ctrl+d, or select Edit > Duplicate.

Why?

It will look like nothing has happened because the new duplicate wall is sitting in exactly the same place; but look at the Outliner and there is a new object — ETM_HallWallEast1.

Step 22: Snap the new wall to the other side of the hallway. Do this by making sure that ETM_HallWallEast1 is selected in the Outliner, then using the Move Tool and holding v down, move (and snap) the wall to the other side of the wall (Fig. 3.15).

image

FIG 3.15 Duplicated wall snapped to other side of the hallway.

Tips and Tricks

Remember that when snapping to the other side, only grab the X handle (red) of the manipulator.

Step 23: Rename this new wall ETM_HallWallWest.

Why?

So, why a plane for the floor, but cubes for the walls? It’s because the walls are going to have shapes cut out of them for doorways and we want to make sure that those doorways have a relief to them.

Boolean

Boolean functions can be tremendously powerful and tremendously problematic. The basic idea of Booleans is that one object can be subtracted from another (or added, or the intersections of two objects found). The powerful part about it is that it can be fairly intuitive to look at two shapes and think, “ok, so this object will be cut from that one.” The problem is that you lose control of some of the topology of the form that this Boolean creates. Boolean functions will often create polygons with many more than four sides that sometimes need some reconstruction.

However, having said this, in many situations, like cutting out doorways that are square, it can be a very handy tool that works quickly and efficiently. The idea for the next few steps will be to cut holes out of the walls we’ve just created that will lead into other rooms that we will create in the future.

Step 24: Create a cube that is 3′ feet wide, 6′9″ (6.75′) tall, and 1′ deep. Because the hallway is running in the Z direction, this means the Channel Box should read Scale X = 1, Scale Y = 6.75, and Scale Z = 3.

Step 25: Adjust the manipulator to be at the bottom center of the cube and then snap the cube up to match the floor. Finally, snap it, so that it penetrates the ETM_HallWallWest approximately as shown in Fig. 3.16.

image

FIG 3.16 Creating and placing the cube that will cut out the door. Note that both the wall and new cube are selected for illustration’s sake.

Why?

Note that the new cube completely penetrates the wall. It needs to in order to create a hole that goes completely through the wall. This is the reason why this new cube was 1′thick — so that it would indeed be deep enough to make it through the wall.

Step 26: Select ETM_HallWallWest and then Shift-select the new cube (the order is important).

Step 27: Perform the Boolean operation. Do this by selecting Polygons|Mesh > Booleans > Difference. The results should show up like Fig. 3.17.

image

FIG 3.17 Results of the Boolean Difference.

Tips and Tricks

Notice that the result of this procedure is a pretty messy Outliner. Suddenly, ETM_HallWallWest and the cube we made appear to be just empty groups and there is a new object probably called polySurface1. This is due to History being active, and the objects used to create the new polySurface1 are still around — more specifically, the nodes of those objects are still around. We will clean that up in a bit (as well as rename things), but for now don’t sweat the messy Outliner.

Step 28: Repeat this process (from Steps 24–27) to create six more doorways along what was ETM_HallWallWest (Fig. 3.18).

image

FIG 3.18 Further Boolean Difference functions to create other doorways.

Tips and Tricks

Note that to speed things up, create one cube for the door hole, and then before using it for a Boolean, duplicate it and move this new duplicate to where you want the next hole to be. Then, after working the Boolean magic on one doorway, there is no need to create the next door hole from scratch as it already exists.

Step 29: Repeat for the other side of the hallway, only this time work with door holes that are 3 feet wide and 8.5 feet tall (these will largely be open portals — no doors). We only need three; roughly place them as shown in Fig. 3.19.

image

FIG 3.19 Creating doorways for the east wall.

Step 30: Cleanup. Delete the history (Edit > Delete All by Type > History). Then, rename the walls back to ETM_HallWallWest and ETM_HallWallEast. Finally, use your newfound skills to move the manipulator to a place that makes sense for these new walls (probably bottom middle).

Why?

Why do we need to move the manipulator again? Well, when the results of Boolean operations are new objects. These new objects, by default, have their manipulator at 0,0,0 in world space. So, even though the walls were once well organized in regards to their manipulators, those walls are gone, and in their place are these new walls with holes in them; so, we have to do a bit of reorganizing again.

Component Level Editing

Thus far, most of the work we have done is on an object level. We’ve been moving and scaling entire objects, which is great as long as the only shapes in the scene are cubes, spheres, or other primitive forms.

Sooner or later, projects will need to move beyond just simple forms and require more complex (and interesting) shapes. Turns out, most any form is possible within Maya, but to get sophisticated forms (like human forms — or in this case, non-square rooms) we need to be able to manipulate the parts of the object to change not just the size but the shape.

Remember in past chapters, we talked about some of the components of 3D forms within Maya: faces, edges, vertices, and normals. In modeling, the faces, edges, and vertices will be of particular interest and use. For a refresher on swapping between objects and components, check out Chapter 2.

Building a Room

Step 31: Create a room that is 12′ wide, 12′ deep, and 10′ tall. Do this by creating a polygon cube (Create > Polygon Primitives > Cube) and in the Channel Box change the Scale X = 12, Scale Y = 10, and Scale Z = 12.

Why?

So after spending all that time creating separate walls for the hall, here we are creating a room with a box. What gives? Fair question. The reality is that either could work — especially for game levels. However, when there are multiple rooms, often building only the inside of the room — especially if that’s all the player will see can yield nice benefits. First, it spares the unneeded polygons on the back sides of the walls that would never be seen. Second, when baking lighting into the scene, the UV set can be much easier to manage and light separately if each room is independent of the walls in the next room. Ultimately, the biggest reason to do it differently this time is to show new modeling techniques. When building your own model, you can certainly choose to build rooms/walls either way.

Step 32: Move the new cube off to the side somewhere where it is easy to work with. The absolute location is unimportant.

Extruding Polygons

Extruding a polygon face is one of the most effective ways to manipulate (and grow) a form. The name of this tool is fairly indicative of what it does. When a polygon is selected and Polygons|Edit Mesh > Extrude is activated, the selected polygon can be moved out away from where it once resided on the object. Importantly, new polygons are made around the edges of the extruded polygon, so the form remains contiguous. Take a look at it in use.

Step 33: Right-click on the object and choose Face from the Hotbox that pops up. On one of the shorter ends, select a face by clicking on it. Choose Polygons|Edit Mesh > Extrude.

Why?

Notice that the manipulator immediately changes to a strange looking hither-to-fore unseen form. It actually has handles that allow this extruded face to be moved (the cones), scaled (the cubes), and rotated (the blue circle).

Step 34: Pull the new face out. With the new manipulator handles, grab the Move Z handle (the blue cone), and pull the face out to approximate Fig. 3.20.

image

FIG 3.20 Extruding out a face. Notice that there are now new faces around the edges of the extruded face that tie it back to the base shape.

Step 35: Scale the new face down. Still within the same Extrude manipulator tool, scale the face in X by click-dragging on the Scale X handle (the red cube). Just eyeball it for now to look similar to Fig. 3.21.

image

FIG 3.21 Scaling an extruded face.

Tips and Tricks

We are translating and scaling all within the same tool here and all within the Extrude function. However, do note that after a face is extruded, it can be selected at any time and moved, scaled, or rotated using the regular Move, Scale, and Rotate tools.

Step 36: Create a door frame. Select the face on the opposite side of this new extrusion. Again, choose Polygons|Edit Mesh > Extrude. This time, however, do not use the Move handles, instead use the Scale X and Scale Y handles (Fig. 3.22) to scale this new face down right in place.

image

FIG 3.22 Scaling extruded face.

Step 37: Delete the face. Hit Delete or Backspace on the keyboard to get rid of this polygon and the one below it (Fig. 3.23).

image

FIG 3.23 Deleted faces. Leaving the polygons we are interested in.

Why?

Sometimes extruding faces is a means to an end. In this case, extruding the face provides the polygons we need to sculpt the doorway. Later, we’ll use this same technique to provide the geometry needed to create window reliefs.

Step 38: Adjust the doorway geometry to look more like a door. Do this by first swapping to Vertex Mode (right-click on the object and choose Vertex from the Hotbox menu). With the Move Tool, select the two vertices shown in Fig. 3.24 and snap them down to the bottom of the room (hold v down while dragging the Y (green) handle).

image

FIG 3.24 Adjusting vertices to find shape of doorway.

Why?

Now this isn’t done of course. There is the rough version of a doorway here, but it will be important that this doorway matches the doorways of the hallway. We will do this later; for now though we’re just roughing out the geometry, we’ll need later.

Step 39: Create windows. Do this by swinging around to the other side (the three-sided wall) and select the faces shown in Fig. 3.25. Remember to this you need to swap to Faces Mode.

image

FIG 3.25 Selecting the walls that will become windows.

Step 40: Make sure the faces will extrude independently. To do this, select Polygons|Edit Mesh > Keep Faces Together (make sure it’s turned off (without the check)).

Why?

Keep Faces Together does what it says. With this checked on (which it is by default), when multiple faces are selected, it will extrude them as one mass — in this case, it would be as though we were making one big window across all three walls. But since the idea is to create three separate windows, it will be important that when these faces extrude they discretely extrude into their own shape.

Step 41: Use the Extrude Tool (and the scale handles of the Extrude manipulator) to create shapes like shown in Fig. 3.26.

image

FIG 3.26 Extruding windows.

Tips and Tricks

Note that even though there is only one manipulator handle, when this handle is manipulated, all three faces adjust.

Step 42: Give the windows depth. With these faces still selected, again choose Polygons|Edit Mesh > Extrude and pull this new extrusion back (the blue handle) a bit to give the windows a relief (Fig. 3.27).

image

FIG 3.27 Creating depth for the windows via a second extrusion of the same faces.

Tips and Tricks

Notice that this time you should be using the move handles — not the scale handles of the Extrude manipulator.

Step 43: Turn these into window holes. To do this, simply delete the faces selected (Fig. 3.28).

image

FIG 3.28 Making the window faces into holes. This is the view from inside the room.

Organizing Rooms

Step 44: Prepare to attach the room to the ETM_HallWallWest by deleting the face on the outside of the hall wall (Fig. 3.29).

image

FIG 3.29 Deleted outer face of ETM_HallWallWest.

Why?

The idea here is that this part of the wall will never be seen. The walls seen on the insides of the rooms are contained in these room objects. So, the face on the outside wall of the hall just gets in the way.

Step 45: Further prepare by maneuvering the room object’s manipulator to the middle front edge of the doorway (Fig. 3.30). Do this in steps: first snap to vertex and move the manipulator only in Y to snap to the bottom of the room. Then, snap to vertex and move only in X to snap to the front of the room.

image

FIG 3.30 Preparing to place the room by getting the manipulator into a good place.

Why?

The idea here is to have the manipulator placed in a location that facilitates snapping. Having the manipulator on the front edge of the room will allow us to snap this part to the edge of the door relief.

Step 46: Move the room into place so it snaps right up against the second doorway (Fig. 3.31). Do this by holding v down and with the Move Tool snapping to one of the bottom corners of the door relief. You may need to rotate the room into place.

image

FIG 3.31 Snapping the room to the doorway.

Why?

Notice that at this point the doorway of the room is much bigger than the doorway of the hallway (yours may be smaller). Not to worry — we knew this was going to happen as in earlier steps we were just roughing out the shape to get the geometry we needed. We’ll tweak it into place in a minute. But in this step, we have made the important step of lining up the inside wall of the room to the edge of the doorway.

 

Tips and Tricks

You can sometimes “help” the snap tools by moving the mouse to the exact vertex you are wanting your selection to snap to. Notice in Fig. 3.31 that the mouse is sitting on the bottom right corner of the hall’s door relief. Even though I’m only moving the room in X, if the mouse moves over that vertex on the doorway while I’m moving it, Maya will know, “Oh, so he wants me to snap (in X) to the level of this vertex.”

 

Tips and Tricks

Notice that sometimes it’s just easier to see what’s happening in wireframe (hit 4 on the keyboard). Alternately, sometimes the orthographic views will be the best way to understand where the object is in 3D space.

Step 47: Adjust the room’s doorway to match the hall’s. Do this in Edge Mode (right-click the room object and choose Edge from the Hotbox). Again, use Snap to Vertex (hold v) to snap each edge of the room to the corresponding edge of the hall’s doorway (Fig. 3.32).

image

FIG 3.32 Adjusting (in Edge Mode) the edges of the room to match the hallway. Be sure to snap to vertex to make this match exact.

Step 48: Duplicate and place the new room two doors down. To do this, swap to Object Mode and move the room’s manipulator handle to the bottom corner of the door. Use Edit > Duplicate and then use Snap to Vertex and move the new room down two doors, snapping to the corner of the doorway (Fig. 3.33).

image

FIG 3.33 Duplicating the old room to create a new room with smart snapping.

Why?

Yes, it’s true it would be better to have created the windows that fill the holes of this room first. And later, you may choose to actually delete this second room in favor of a completed grouped room once the windows are created and placed. But continuing with the idea of utilizing Maya’s snapping tools to place objects, it made sense to show the method here.

Step 49: Adjust the hall floor by moving the edges, so that they close the gap between the hall and the rooms (Fig. 3.34).

image

FIG 3.34 With a quick Snap to Vertex, we can clean up holes to make objects match perfectly.

Creating Non-Cubic Shaped Rooms

So with the methodology we have created so far, the cube has been the central building block. This is actually a good method for a fairly astounding number of forms; but sometimes an alternative primitive can be used to create forms much faster.

For instance, in the research of Beelitz Heilstätten, there is a very interesting “arch room” that looks to be a big gymnasium in an octagonal shape. This could definitely be hewn out of a cube, but we could much more easily build it using part of a cylinder and part of a sphere, and assembling the two together.

Step 50: Create the octagonal base of the room with a cylinder. To do this, choose Create > Polygon Primitives > Cylinder. Move the cylinder away from the middle of the scene to a place where it’s easier to evaluate. In the Channel Box, under INPUTS expand the node named polyCylinder1. There, change the Subdivisions Axis to 8 (Fig. 3.35).

image

FIG 3.35 Adjusting the parameters of a primitive cylinder to create the base of our octagonal room.

Why?

This is part of the power of those polygon primitives. The parameters of the shape can be changed, and thus, the primitive can be reshaped.

Warnings and Pitfalls

Note that being able to reshape the primitive is dependent on this polyCylinder1 node being available as part of the shape’s history. This means that when history is deleted, this node disappears and is no longer editable via its INPUT parameters.

Step 51: Remove the roof. Do this by swapping to Faces Mode and deleting the polygons that make up the top of the cylinder. This will turn the cylinder into a sort of cup (Fig. 3.36).

image

FIG 3.36 Making way for a new roof.

Step 52: Create the dome for the roof. Start by creating a polygon sphere (Create > Polygon Primitives > Sphere). Move the sphere over to near the cylinder. With the sphere selected, look in the Channel Box and under the INPUTS section, expand the polySphere1 node and change the Subdivisions Axis setting to 8 (to match the number of walls in the lower room). Now, in Faces Mode, select and delete all the faces beneath the sphere’s equator (Fig. 3.37).

image

FIG 3.37 Creating the polygon sphere (or half sphere) that will become the dome of the room’s ceiling.

Step 53: Line the dome roof up with the room. Do this by switching back out to Object Mode (right-click on the sphere and select Object Mode in the Hotbox). Swap to the Move Tool and move the manipulator (hold d) of the dome to any of the corners (remember to Snap to Vertex). Then, using the Move Tool (be sure to release d), grab the manipulator by the middle yellow square, and move the dome up to snap into place atop the cylinder (Fig. 3.38).

image

FIG 3.38 Snapping the dome into place.

Step 54: Combine the meshes into one form. Select the bottom cylinder, then shift-select the half sphere (or the other way around), and choose Polygons|Mesh > Combine.

Why?

Technically, we could leave the roof and walls separate. There are a couple of benefits to combining them. When meshes are combined, Maya thinks of them as one object. Likewise, game engines see it as one object and thus reduce the draw calls. Further, when there is one object (and especially after we get the ceiling and walls merged—more on this in a moment—), the UV mapping — deciding how texture is applied to a surface — gets a little easier.

Step 55: Merge the vertices between the walls and ceiling. Try this experiment: click on one of the vertices that are at the bottom of the sphere, but not at the top of the cylinder (don’t marquee around it — just click it). Now move it up and see that there are actually two vertices sitting atop one another — not one vertex merged from the two shapes (Fig. 3.39). To fix this, first undo the experiment, then marquee select around all the vertices along the seam of the two shapes. Now choose Polygons|Edit Mesh > Merge.

image

FIG 3.39 Simply combining meshes doesn’t actually merge vertices. To fix this use Polygons|Edit Mesh > Merge.

Step 56: Scale the room to taste and place it in the scene as seen in Fig. 3.40. Be sure to use either Modify > Center Pivot or manually move the Manipulator into a more logical location before starting in on scaling things. Note that in Fig. 3.40, the room has also been rotated 22.5° (along the Y), so that a flat wall meets up with the hallway.

image

FIG 3.40 Finished rough of large gym space.

Step 57: Name the rooms. The naming mechanism is arbitrary at this point. But naming is important to do as you go along.

Step 58: Finish the homework challenges for room shapes. In the homework of this chapter, include several finished rooms (available at the support website www.GettingStartedIn3D.com). All of these rooms use the techniques we’ve covered thus far. Give ’em a shot! The results are shown in Figs. 3.41-3.43.

image

FIG 3.41 Rooms blocked out using the currently known techniques.

image

FIG 3.42 Large chunks of architecture are quickly built with the techniques discussed above.

image

FIG 3.43 Check out close-ups of these rooms in the homework section.

Conclusion

Using simple polygonal modeling techniques, the shape of a game level (or any set design really) can begin to come into form quickly. Of course, it’s still a very boring form; it doesn’t have the level of detail that makes a game experience immersive or a TV/movie/animated short set compelling or believable — this comes later.

However, I always counsel students to rough out all their rooms first using methods similar to this. If they are creating an animated short, it gives them a quick look at whether or not they have the appropriate acting spaces created. For games, a roughed version like this provides the perfect start to a game prototype and is the version that we first put in a game engine to run around in and see if the scale and scope of the level is what was envisioned.

Tutorial 3.2 Prop Polygonal Game Modeling: Escaping the Madness

We’ve got a good start with the roughed out versions of the space. However, things are simply too blocky without necessary stuff. In this tutorial, we will expand on the techniques, we have built to begin to create beds, gurneys, chairs, and other props that will be placed around the scene to make it look like people once lived here.

Creating an End Table

Figure 3.44 shows the results of the next few steps. It might not look like it at first glance, but we are actually just extending skills we already have — particularly with regards to extruding polygons.

image

FIG 3.44 Finished table.

We are going to construct this form out of three forms actually. The first will be the drawer compartment area, the second will be the drawer, and the third will be the frame that surrounds the drawer and its compartment. After, we construct these two forms we will use the Combine technique we looked at earlier to make it one mesh and thus reduce the number of objects to keep track of and the number of draw calls if this ends up in a game engine.

Step 1: Create a new Maya scene. Save whatever scene is currently open (if there is anything in it), and then choose File > New Scene. Save it as ETM_Furniture_SmallTable.

Why?

We could build this right within the hallway scene; but this will allow us to explore working with the import functionalities of Maya.

Step 2: Create and scale a new cube to approximate Fig. 3.45. Do this in Object Mode with the Scale Tool.

image

FIG 3.45 Roughing out the general shape of the main drawer compartment.

Step 3: Start to create the drawer cavern with the Extrude Tool. Select the front face (in Face Mode) and choose Polygons|Edit Polygons > Extrude. This time, click on one of the cube handles of the Extrude Tool and notice that the middle of the manipulator turns to a light blue cube. Click and drag on that cube and the extruded face will scale in all directions at once — creating a face that pulls away evenly from its old size (Fig. 3.46).

image

FIG 3.46 Scaling in all directions at once with the Extrude Tool.

Step 4: Finish the drawer cavern with a second extrusion into the cube. Again, choose Polygons > Edit Polygons > Extrude and this time use the Extrude tools’ move handles (cones) to move this new extrusion back into the cube (Fig. 3.47).

image

FIG 3.47 Extruding into the form to create the cavern.

Step 5: Create the drawer from a new cube, using the Extrude Tool. Check out the sequence of screenshots shown in Fig. 3.48 for how I constructed it.

image
image
image

FIG 3.48 Creating the drawer.

Why?

Why make the drawer separately? Well, the idea is to make these pieces of furniture look pretty beat up…we don’t want a lot of things to look very neat — like how a drawer fits. By building it separately, we can easily plug the drawer into the compartment and very easily make it look broken or partly opened.

Step 6: Move the drawer into place. The key here is to make the drawer offset — not perfect (Fig. 3.49).

image

FIG 3.49 Drawer compartment and drawer.

Constructing the Frame

Now that we have the drawer area done we can build the frame around it. This will provide some important opportunities to look at adding geometry needed to create the forms desired.

Starting with a cube doesn’t mean that the form has to stay a cube. Already, cubes have had holes dropped out of them and new forms built off of them. Sometimes, more refined extrusions need to be made. To get these, new geometry needs to be formed to allow for new faces to be extruded.

Step 6: Create a cube and resize it to be slightly bigger than the drawer compartment. Make sure it is also fairly flat (Fig. 3.50).

image

FIG 3.50 Top of small table built from rescaled cube.

Why?

Notice that we are just “eyeballing” the forms. This is fine for our purposes here. Getting too caught up getting the exact size would just slow down the learning process. The point is to see the general tools and their application. Later, if the shape isn’t just right, you can always move vertices around to get the form closer to the desired shape or proportions.

Insert Edge Loop Tool

This is a powerful tool that allows new geometry to be inserted between loops of edges. In our case, our “loops” are pretty straight; but this tool will still be useful. Remember though that this tool is also powerful for non-linear shapes (like organic ones) where new geometry is needed to better define a shape.

Step 7: Add geometry to extend the legs from. To do this, make sure the object is selected and choose Polygons|Edit Mesh > Insert Edge Loop Tool. Click and drag on one of the edges to create a new loop of edges (and thus new polygons (Fig. 3.51)).

image

FIG 3.51 Using the Insert Edge Loop Tool to create new geometry.

Why?

So what just happened here? By “inserting an edge loop,” we have a new loop of edges. This splits the faces the edge loops cut through into two faces. These new faces can be extruded into forms that would not have otherwise been easy to accomplish with the current skill set.

Step 8: Add further geometry with additional loops. Again, activate the Insert Edge Loop Tool and create further loops parallel and perpendicular to the first edge loop (Fig. 3.52).

image

FIG 3.52 Inserting additional edge loops.

Why?

Take a look at this new shape and notice that there are now squares on each of the corners of the shape. These are the faces that we will use to extrude out the legs.

 

Tips and Tricks

Notice that the way the Insert Edge Loop Tool works is a loop is created perpendicular to the edge clicked. So to get the edges shown in Fig. 3.52, some of the edges were created along the same side, but the next two have to be created by clicking on one of the edge perpendicular to the first.

Step 9: Select the faces that will become the legs. Do this by rotating your view to below the cube. Select the faces shown in Fig. 3.53 (select one and then shift-select each of the others).

image

FIG 3.53 Selecting the faces that will be the legs.

Step 10: Extrude the legs down to the ground. Polygons|Edit Mesh > Extrude (Fig. 3.54).

image

FIG 3.54 Extruding down the legs.

Cut Faces Tool

The Insert Edge Loop Tool is one way to insert new geometry. The Cut Faces Tool also creates new geometry, but is much more linear in its approach. Think of this tool as a sort of laser that slices though the entire object. Because of this, it will be important that the tool is used in a non-perspective view.

Step 11: Create new geometry to create further cross braces. First, make sure to view the object in the Front or Side View Panel (either will work). Select the frame shape (in Object Mode). Activate the Cut Faces Tool (Polygons|Edit Mesh > Cut Faces Tool). Hold the Shift key down (to constrain the cut) and drag from left to right on the screen to approximate the cut shown in Fig. 3.55. Repeat for a second cut.

image

FIG 3.55 Using the Cut Faces Tool to add new geometry.

Why?

It’s tough to show the Cut Faces Tool in action with a screenshot. What happens when the Cut Faces Tool is used — is a flickering line (a straight line through the whole screen) will appear to show where the cut will be made. This line rotates around the place where the mouse is clicked. Holding the Shift key down will make sure it snaps to 45° increments (including flat). When the mouse is released, the “laser” cuts all the way though the object selected. This means that (unlike the Insert Edge Loop Tool), the first click is really important — as moving the mouse only rotates the cut. So click wisely.

Bridge

The Bridge Tool is a relative newcomer to Maya, but is a really handy one. What it does is allow for components to be bridged together by new polygons. In this case, it will be used to connect the new geometry made on the legs.

Step 12: Select the faces to bridge. In Face Mode, select two faces that face each other on the inside of any two legs (Fig. 3.56).

image

FIG 3.56 Selecting the faces to be bridged.

Step 13: Connect the legs with the Bridge Tool. Choose Polygons|Edit Mesh > Bridge (Options). In the Bridge Options window, change the Divisions setting to 0. Click the Bridge button (Fig. 3.57).

image

FIG 3.57 Bridging together two faces.

Why?

The default setting for Divisions for the Bridge Tool is (strangely) 5. What this would mean is that (with the default settings), the two faces would be bridged together, but there would be five edge loops around the new shape created. Obviously, there is no need for this amount of geometry, so setting the Division setting to 0 simply bridges the two selected faces by creating new faces that join the edges.

Step 14: Repeat the bridging process to connect all sides (Fig. 3.58).

image

FIG 3.58 Bridging across all the supports.

Tips and Tricks

G is the keyboard shortcut to repeat the last used tool. So, if the last thing done was to use the Bridge Tool, two new faces can be selected, g hit (the faces are bridged), then rotated around, two more faces selected, g hit, etc. Makes for quick work.

Step 15: Add other details using techniques you know. Figure 3.59 shows the results of a bit of extra tweaking including some extrusions and simple Booleans.

image

FIG 3.59 Finished table.

Step 16: Combine into one mesh. Select all the parts in Object Mode and choose Polygons|Mesh > Combine.

Step 17: Delete history. Edit > Delete All by Type > History.

Why?

In creating this form, quite a bit of history has been created. Each time, the Insert Edge Loop Tool was used a new node appeared attached to the object. Each Bridge, each Extrude, and the Combine all add nodes to the forms — and they all end up on the final combined form. By deleting history, we keep the data set related to this form small and get rid of any phantom nodes that might be floating around in the Outliner.

Step 18: Name the object ETM_Furniture_SmallTable in the Outliner.

Step 19: Move the ETM_Furniture_SmallTable’s manipulator to be at the bottom of the legs. Remember do this by holding d and v down (d to move the manipulator, v to snap to vertex) and pull the manipulator down by the green post to snap to the bottom of the legs (Fig. 3.60).

image

FIG 3.60 Manipulator moved to the bottom of the shape.

Why?

Thus far, the shape has been created by eyeballing it into shape. The absolute size of this one object could well be bigger than the entire set built in the earlier tutorials — or could be way, way too small. By moving the axis into this spot at the bottom center of the form, it is ready to be placed in the set and scaled easily.

Step 19: Save the file (File > Save).

Modeling Examination Table/Gurney

Building upon the techniques already covered, building an examination table will allow for exploration of some new techniques that will help make the models not quite so crisp and blocky. The focus here will be to get rid of those sharp edges that cubes have.

Step 20: Create a new file and immediately save it as ETM_Furniture_ExamTable.

Step 21: Using the techniques covered in the previous steps create the frame for the bed (Fig. 3.61).

image
image
image

FIG 3.61 Creating the bed frame using Insert Edge Loops, Extrudes, and Bridges.

Step 22: Create a rough mattress from a cube. Create a polygonal cube and scale it roughly as shown in Fig. 3.62.

image

FIG 3.62 Roughing out the mattress with a polygonal cube.

Bevel

The Bevel Tool can be tremendously helpful for broad stroke situations (big areas like making this cube into a softer cushion). It can also be of real help in much tighter situations like making the edges of a table not razor sharp as two big faces come together.

What the Bevel Tool does is insert additional edges and faces to a selected edge (or object), offsets these new subdivisions, and scales them. The result is a much rounder corner. In the following steps, we use it to make a much softer cushion.

Step 23: Select the edges around the top of the new mattress cube (Fig. 3.63).

image

FIG 3.63 Selected edges to be beveled.

Step 24: Bevel these edges. Do this by selecting Polygons|Edit Mesh > Bevel (Options). In the Bevel Options window, set the Width to 0.5 and the Segments to 4. Hit the Apply button. If the results are desirable (Fig. 3.64), close the Bevel Options window. If not, move the mouse over the View Panel and hit Ctrl-z to undo. Adjust the settings in the Bevel Options window and hit Apply again until happy with the results.

image

FIG 3.64 Results of the Bevel Tool.

Why?

This is a very broad bevel. Immediately though, you can see the four segments lead to four new rings of edges that are each offset to create a nice-rounded shape. For games, this is a great way to work as it gives the shape a more rounded form without dramatically increasing its polycount.

 

Tips and Tricks

The Apply button mechanism is a really nice way to tweak the sometimes esoteric results of Maya’s options windows. In the case of the Bevel Tool, if the Bevel button is clicked, the bevel is performed and the Bevel Options window is closed. Conversely, using the Apply button lets you see the results of the settings you’ve chosen, but keeps the Bevel Options window open to tweak if need be. Just be sure to move the mouse over the View Panels and undo if you plan to adjust settings.

Step 25: Duplicate this cushion and move it up to the head of the bed (Fig. 3.65).

image

FIG 3.65 Second cushion being maneuvered.

Step 26: Reshape the cushion to be shorter. Do this by selecting the vertices at the top of the form and using the Move Tool to slide them down to make a shorter cushion (Fig. 3.66).

image

FIG 3.66 Left side shows the results when the vertices are moved. The right side shows the incorrect results of scaling the form.

Warnings and Pitfalls

It seems like we should be able to simply scale the top cushion down to size. The problem is that scaling literally moves all the vertices in relationship to each other, so that they are closer together. The screenshot on the right side of Fig. 3.66 shows the results of scaling the object. See how the top and bottom edges (as if laying on the table) of the cushion have been collapsed? This is why moving the vertices to change the shape creates a form that is more desirable as it keeps the curved shape.

Step 27: Position the top cushion shape to be reclined. The easiest way to do this is to move its manipulator to the bottom front edge of the shape, then with this new axis of rotation, use the Rotate Tool to rotate the shape up (Fig. 3.67). Add further details as desired (i.e., brace to hold up cushion).

image

FIG 3.67 Finished bed.

Step 28: Combine, delete history, rename, move manipulator, and save. Select all the shapes in the scene, choose Polygons|Mesh > Combine. Then, choose Edit > Delete All by Type > History. Move the object’s manipulator to sit at the bottom center of the shape (where the feet would touch the floor). Finally, rename the new form to ETM_Furniture_ExamTable and save the file.

Conclusion

And with that we will leave architectural polygonal modeling. Of course, there are lots of other forms to be made within this game level; but with the techniques covered in the last few tutorials, most any shape that can be found in the research can be built.

This won’t be the last we see of these polygonal tools though. In the next chapter, the exploration of polygonal tools will continue as they are used to create much more sophisticated forms for organic characters.

For now though, check out the homework and see what further shapes can be built with the current techniques. Place the furniture into the scene to make the space look like people were once there.

In the next tutorial, NURBS will be the technique of exploration. NURBS is just another way of achieving forms and it happens to work very well for certain types of shapes.

Tutorial 3.3 NURBS Modeling in Architecture

NURBS stands for Non-Uniform Rational B-Splines. This is of little importance except to notice that the core building component of NURBS surfaces are splines. Splines (at its simplest) are curves. These curves can be used to create surfaces that appear solid.

The use of NURBS in modeling has risen and fallen in popularity over the years. For a while, it looked like there was going to be a serious movement to do all character modeling in NURBS. NURBS are great at creating smooth organic forms. They have a little more indirect method of manipulating the shape (more about control vertices, hulls, etc. later), and as time has gone on, the more direct methods of polygonal modeling — where a modeler is able to directly select a vertex and move it — have reemerged as the favorite of most modelers — especially game modelers.

However, having said all that, there is certainly a time and a place for NURBS modeling techniques. NURBS modeling techniques will allow for polygonal shapes to be the final output so can still be a great tool for certain forms (like the bathtub to be created and shown in Fig. 3.68).

image

FIG 3.68 Finished bathtub built using NURBS modeling techniques.

Step 1: Create a new Maya Scene and immediately save it as ETM_Furniture_Bathtub.

Curves (Splines)

So we’ve already established that NURBS are the results of splines. What this means is that creating the splines that create the NURBS surfaces is critical.

Maya allows for several ways of creating (and editing) curves. CV (Control Vertex), EP (Edit Point), and more recently Bezier Curves. In Maya books of the past, I’ve written extensively about how to work with Maya’s CV Curve Tool — which used to be my favorite. But finally, Maya has caught up with the rest of the 3D world and finally allows for the creation of curves using Bezier curves.

If you have any experience with Illustrator — or even Photoshop, you have had occasion to work with the Bezier curve paradigm. Bezier curves are defined with anchor points that have Bezier handles that control how the curve comes in and goes out of that anchor point.

There are several keys to working with Bezier points in Maya:

1. Create Bezier points in orthographic views. A curve that is flat (sharing at least one dimension) will make for lots of important possibilities.

2. When Using the Bezier Curve Tool, clicking and releasing puts a Bezier anchor down with no handles. This means the curve will come in and out of that point linearly — making sharp angles.

3. Remember that with Maya’s Bezier Curve Tool, it’s often easier to place the points needed and then go back in and refine them when the curve is done.

4. The Bezier Curve Tool curiously also acts as the Edit Bezier Curve Tool (although it isn’t called that). This is handled a bit differently than most other tools are handled in Maya.

Step 2: In the front View Panel, create a curve that begins and ends on the Y-axis. Do this by first Create > Bezier Curve Tool. With the tool activated, hold the x down (snap to grid), and click-and-release on the world’s Y-axis (indicated by the thickest vertical black line). Continue through the other points shown in Fig. 3.69 by clicking and dragging each time to produce an anchor point with Bezier handles. Do this until point 7 in Fig. 3.69. There, again hold the x key down and click release on the Y axis. Hit Enter to exit the tool.

image

FIG 3.69 Creating the curve that will become the bathtub.

Step 3: Edit the curve as needed with the Bezier Curve Tool. With the curve selected activate the Bezier Curve Tool (Create > Bezier Curve Tool (Options)). The options for the tool will appear across the left side of the interface (Fig. 3.70). Now any of the Bezier anchors or Bezier handles can be selected and adjusted as needed. Be sure to exit the tool when done by activating any other tool (like the Move Tool).

image

FIG 3.70 The Bezier Curve Tool as an editing tool.

Tips and Tricks

Maya handles the Bezier curves a little differently than most other applications. However, the basic ideas of a key combined with a mouse click is the same. For instance, Ctrl-left-click-drag will reset the handles on an anchor (add handles if the anchor has none). It takes a little bit of playing with, but ultimately, this allows for any curve to be achieved.

Surfaces

The curves that are created in Maya have no geometry of their own. This means that if we asked Maya to render or draw what has been created, the scene would show up black — empty. Curves by themselves are pretty useless.

Curves really should be thought of as construction objects; objects that can be used to create other objects. In this case, the curves will be used to create NURBS surfaces.

NURBS surfaces can be built from multiple curves (which we’ll look at in a bit), but in this case, this curve will be rotated around an axis leaving a surface in its wake.

Step 4: Create a revolved surface. Select the curve and choose Surfaces|Surfaces > Revolve. The default settings will yield a form like Fig. 3.71.

image

FIG 3.71 Results of a revolved curve.

Why?

What has happened here is that the curve has rotated 180° around its manipulator. Because we created the curve starting and stopping on the Y-axis, the manipulator of the curve happens to be on the inside edge of the curve. It doesn’t have to be though. For instance, if the desired shape had a big hole in the bottom, the curve could have been started and stopped off of the Y-axis; or before revolving, if the curve’s axis was moved away from its default setting (on the Y-axis), the outcome would have been much different.

 

Tips and Tricks

Now if you open the options of the Revolve (Surfaces|Surfaces > Revolve (Options)), you will see that there is the ability to output directly to polygons. In some cases, this is a good way to work; but in this case, we are going to hold off for a while. This will allow us to work with the new NURBS surface for a bit and see the power of NURBS forms.

Step 5: Adjust the surface via its Control Vertices. To do this, right-click on the surface and choose Control Vertex from the Hotbox. Suddenly, there will be lots of little pink squares floating just off the surface (these are Control Vertices (CVs for short)). With the Move Tool active, marquee around the CVs shown in Fig. 3.72 and move them along one axis to lengthen the shape.

image

FIG 3.72 Adjusting NURBS surface by moving its Control Vertices.

Step 6: Further sculpt the CVs to taste. Do this with the Move Tool and by marqueeing groups of CVs to find the form of the tub you are after. I ended up with Fig. 3.73.

image

FIG 3.73 Finished tub shape sans legs.

Step 7: Delete history and delete the curve.

Why?

Before deleting the history, the curve is still tied to the surface. This can be very useful if the profile of the tub needs to be adjusted. The curve itself has CVs that, if adjusted, would change the very shape of the tub. However, because the two are tied together, if the curve is deleted, the tub itself will also delete.

 

Tips and Tricks

In some cases, it’s nice to keep that curve around (or curves if working with a surface that requires multiple curves). In those cases, it’s still good to get the curves out of the way. This can be done by grouping the curves together(Ctrl-g) and hiding (Ctrl-h) the group. Or in the Layers Editor (beneath the Channel Box), new Layers can be created and their visibility turned off by clicking the V box.

Step 8: Convert the NURBS surface to polygons. Do this by selecting the tub and choosing Modify > Convert > NURBS to Polygons (Options). Change the Tessellation method: to Control Points. Hit the Tessellate button. Move the new object created off to the side (Fig. 3.74).

image

FIG 3.74 Converted NURBS surface to polygon shape.

Why?

“Now wait a minute !” you may be saying. “It looks to me like we’re moving backward. This new shape looks worse than what we just created.” And you’d be right. So why are we changing to a polygonal shape anyway?

Well, in some cases we wouldn’t want to. For instance, if this were a high-poly scene (not a game scene), there may not be any reason to swap from a NURBS surface. However, since this will eventually go in a game engine, we need to be able see what the shape will really be like in game — which will be polygonal. Further, the tubs in all the research have those very straight legs which will be more easily achievable via a polygonal shape. Thus, now is the time. Not to worry though, in the coming steps we will “up-rez” the shape to give it more polygons so we get back to the curvilinear tub shape.

Smooth

OK, so this actually isn’t a NURBS surface tool — it’s a polygonal tool but stick with me for a minute here. What Smooth does (Polygons|Mesh > Smooth) is take each polygon and subdivide it into four and bend each of those new polygons in relation to the others. It turns a cube into a sphere (or more into a sphere anyway). In this case, we can take the ultra-low poly tub and convert it into a higher polygon — but smoother shape.

Step 9: Smooth the polygonal mesh. Select Polygons|Mesh > Smooth (Options). Change the Divisions setting to 2. Hit the Smooth button (Fig. 3.75).

image

FIG 3.75 The results of the Smooth function.

Why?

So the number of divisions refers to how many times it’s going to subdivide each polygon in the shape. This means that this can quickly get out of hand and suddenly you could end up with a mesh that is so dense it’s impossible to edit. Further, the mesh that the Smooth function creates often has very inefficient polygons (more than needed to describe the shape). So, while the Smooth Tool seems to be a magical make-everything-sexy-and-curvilinear-tool, it can also be the diabolical make-a-mesh-too-dense-to-use-especially-in-games-tool.

Step 10: Optimize by deleting unneeded edge loops. To do this, select an edge and ctrl-right-click-hold and select Edge Loop Utilities > To Edge Loop and Delete (Fig. 3.76). Look for areas where there are many loops defining a collection of geometry that could be defined with fewer. My final solution can be seen in Fig. 3.77. Yours may vary.

image

FIG 3.76 Deleting unnecessary geometry with the To Edge Loop and Delete.

image

FIG 3.77 Results of deleting unnecessary edge loops.

Why?

The idea here is that there are too many divisions — a problem with the Smooth Tool. There are a lot of equally distanced edge loops, but not all of them are needed. By taking a minute to optimize, the form will be easier to manipulate now during modeling and make other things like UV mapping easier.

 

Tips and Tricks

The key here is to delete edges and see if the resulting shape is acceptable. Sometimes you will pick an edge to delete that changes the shape of the form in the wrong ways. Undo and pick another.

Step 11: Use polygonal modeling tools (i.e., Extrude) to extrude out legs and otherwise adjust the form.

Step 12: Cleanup. Delete all history. Delete the NURBS tub, move the manipulator of the tub to the bottom floor. Rename the object to ETM_Furniture_Bathtub. Save.

NURBS for Trim

So using NURBS can be a great way to start creating shapes with a rounded form (bathtubs, toilets, vases, wine glasses, etc.); but it ironically can also be used to make some very interesting linear elements too. One of my favorite uses of NURBS processes is for trim pieces — door trim, floor boards, crown molding, picture frames, etc.

The process is a little different than the previous steps. It starts with a curve that is the profile of the trim, but then that curve is placed in each corner to define the path that the NURBS Loft surface will take. The results are some very beautiful trim pieces.

Step 13: Create a new file and save it as ETM_Hallway_DoorTrim.

Step 14: Create a cross section of door trim. Using the Bezier Curve Tool and in the top View Panel, draw a curve that represents what you would see if you cut a piece of trim and looked directly at its profile (Fig. 3.78). Think of this as curve #1.

image

FIG 3.78 Trim Curve.

Why?

Why the top View Panel? It doesn’t really matter actually — as long as it is one of the orthographic View Panels that the curve is drawn in.

 

Tips and Tricks

If you have ever shopped for trim at Home Depot or Lowes you have seen these sorts of curves. They are how the stores differentiate the trim on the signs at the bottom of the bins that hold pieces of trim. If you are unfamiliar with what these curves look like, just copy Fig. 3.78 or Google “door trim profile.”

Warnings and Pitfalls

It’s best to make sure this curve is closed. There are two ways to do this: First, when using the Bezier Curve Tool and after placing the last anchor, hold Cntrl-Shift-Left-Click on the first anchor point. Or, after the last anchor is placed, hit Enter to leave the tool and choose Surfaces|Edit Curves > Open/Close Curve.

Step 15: Move the curve’s manipulator to the inside corner of the curve — the corner that will be against the wall and on the door side.

Step 16: Rotate the curve 45°, so that it roughly matches Fig. 3.79.

Remember you can do this in the Channel Box by changing the Rotate Z to 45 (or −45 either will work) or by swapping to the Rotate Tool and holding the j key down (to snap to 15° increments).

image

FIG 3.79 Rotated curve.

Why?

Eventually, there will be four of these curves — one for each corner of the doorway. If the curves remain flat, the trim will loft into a shape that has flat (as in flat as a piece of paper) parts as the surface attempts to go from a curve with no height (the curve is flat) to another with no height. Rotating by 45° will ensure that the lofted surface has a constant width.

Step 17: Duplicate (Ctrl-d) curve #1 and move the new curve #2 straight up in Y (Fig. 3.80).

image

FIG 3.80 Duplicated and moved curve.

Tips and Tricks

If, when moving the curve up in Y, the x key is held down, the curve’s new location will be snapped to the grid. This can make lining all the curves up a bit easier.

Step 18: Duplicate curve #2, slide it (curve #3) over and rotate another 90°, so that it mirrors curve #2 (Fig. 3.81).

image

FIG 3.81 Duplicated and moved curve #3.

Step 19: Duplicate curve #3 and move it (curve #4) straight down, so that it is at the same level as curve #1 (Fig. 3.82).

image

FIG 3.82 Last curve in place.

Step 20: Loft the curves into a polygonal shape. Do this by first selecting the curves in order (select curve #1, Shift-select curve #2, Shift-select curve #3, and Shift-select curve #4). Then, choose Surfaces|Surfaces > Loft (Options). Change the Surface Degree: to Linear. Change the Output Geometry: to Polygons. Change the Tessellation Method: to Control Points. Hit Loft (Fig. 3.83).

image

FIG 3.83 Lofted surface — note the results are a polygon form.

Why?

Lots of things to talk about here. First, the order things are selected in is important to Maya. It tells it in what order to run as it lofts the shape. Surface Degree: Linear means that Maya takes the shortest path between curves. Output Geometry: Polygons means we get a polygonal shape (not a NURBS surface) as a result of the process — this makes editing things like the bottom of the trim easier. Tessellation Method: Control Points mean that a polygonal vertex is placed at each place that a NURBS Control Vertex would have been. This creates the leanest and cleanest geometry (all quads).

Step 21: Delete the history (Edit > Delete All by Type > History). Delete the curves.

Why?

We want to separate the lofted form from the curves to be able to quickly and efficiently manipulate the form without getting entangled in the curves. We can still do all the editing, we are going to need to do with just the polygonal shape.

Step 22: Flatten the bottom of the trim. This can be done several ways; for now, select all the vertices that are on the bottom of the door and in the very top of the interface, toward the right side look for three input fields titled X, Y, and Z. These represent “Absolute Values.” Enter 0 and hit Enter in the Y input field (Fig. 3.84).

image

FIG 3.84 Using the Absolute Values to flatten the vertices at the bottom of the trim.

Step 23: Cleanup. Delete all history. Move the manipulator to the bottom of the trim object. Name it ETM_Hallway_DoorTrim. Save.

Import

Thus far, we have been creating assets in separate Maya scene files. This has the benefit of keeping the scene clean as each form is built. But there comes a time when these assets need to be consolidated. Maya makes this pretty easy with the File > Import; however, there is a bit of cleanup that has to happen along the way.

Step 24: Open ETM_Hallway.

Step 25: Choose File > Import.

Step 26: In the Import window, choose any of the assets created in other scenes. I am going to choose the ETM_Hallway_DoorTrim file. Click the Import button.

Step 27: Rename the newly imported asset in the Outliner. Note that when it comes in, the name becomes really long — unnecessarily long as it shows the name of the file the object came from and the object itself (Fig. 3.85). In this case, shorten the name of the object to ETM_Hallway_DoorTrim.

image

FIG 3.85 Results of Import — a name that’s way, way too long.

Step 28: Resize or reshape as appropriate. In my case, I needed to move the trim, so that it actually was at a door to start. Then, I needed to move the vertices (of the corners), so that the trim matched the doorway. Notice I didn’t scale; I moved the vertices to match the shape of the door (Fig. 3.86).

image

FIG 3.86 Placed and adjusted door trim.

Step 29: Repeat with other assets modeled (Fig. 3.87).

image

FIG 3.87 Additional placed assets.

Conclusion

There is certainly more to model and populate before this game level is done. Be sure to check out the Homework section for new challenges or pick shapes in the research that you want to place in the spaces created to help tell the story that took place here.

The key is that now you have the tools to create most any shape you would see in the research. Part of the final modeling mastery is deciding what technique to use where. Don’t be afraid to abandon a technique if it isn’t producing the form you’re after and trying another. These failed experiments can be invaluable learning experiences.

In the next chapter, we will take the modeling techniques further — much further and create much more complicated, interesting, and sophisticated organic shapes.

Homework

1. Populate the rest of the rooms with props and furniture found in your research.

2. Give windows a shot. Could they come from the same techniques as the doors?

3. Try vases, glasses, light fixtures, etc… How could you use the techniques used in the bath tub to build these?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset