Animating Real- Time Game Characters-P2 doc

30 203 0
Animating Real- Time Game Characters-P2 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

16 Animating Real-Time Game Characters is adjusted further with edge divides, and with turns and vertices moved. The shape is thus optimized and completed (C). FIGURE 1.14 Primitives can be shaped into the basic form and then adjusted as needed. Extruding Shapes Or Faces Using extrusions are another common method for modeling your charac- ter. Figure 1.15 shows how extruding a shape and extruding faces are the quickest ways to build a shoulder pad for Betty Bad. The pad is started by creating an outline of a shape that approximates a cross section (A). Then an Extrude modifier with three segments is applied to it, and the shape is extruded outward to give it depth (B). Next, an Edit Mesh modifier is ap- plied to align the vertices and select the faces at the top of the shoulder (C). The selected faces are then extruded upward to match the desired shape via the sub-object Extrude button (D). Finally the shape is ad- justed, optimized, and slid into place (E). Using Booleans The use of Booleans is another useful way to model. The technique in- volves joining, subtracting, or taking the result of the intersection of two Chapter 1 Built to Move 17 FIGURE 1.15 Extruding both outline shapes and faces are great ways to model. objects in order to arrive at the desired shape. It is a useful method for sit- uations such as merging limbs with a torso or joining legs to a pelvis. The only drawback to using Booleans is that they create excess geometry that has to be cleaned up. For example, look at Figure f .16. Once Betty's hips and legs are built and completely closed (A), they're positioned so they intersect one another (B). After they're joined together using a "union" Boolean, there's an unnecessary geometry created (C). Cleaning up the geometry, adjusting the shape, then mirroring the proper faces gives Betty her legs (D). Whenever performing Booleans, make sure all your geometry is closed beforehand. Use the Cap Holes modifier or manually build faces to close any openings. If you don't close these open areas, the Boolean may not work, or the results may not be quite what you expected. High Resolution Mesh Template If you have access to higher resolution models, you might try using one as a template. They're much too high in polygon count to use in a real- time character situation, and the work it would take to optimize them is too crazy to even consider. But what if you could trace a low-poly mesh on top of the high-resolution model, as if you were tracing a photograph onto onionskin? This really just takes the concept of using reference to its logical conclusion. That is, if you had the ability to take a person or action 18 Animating Real-Time Game Characters FIGURE 1.16 Booleansare messy to clean up but a fast way to join geometry. ON THE CD figure/maquette and shove it into your 3ds max scene to use as a guide to build a model, you would. Think about it—it would be the perfect reference! Of course, building a mesh in this way requires a high-res mesh. Go to the Chapterl directory on the CD-ROM that comes with this book, and load Boot.max to see the process firsthand (Figure 1.17). The trick to modeling, as illustrated by our boot sample, is to first iso- late the proper vertices integral to the boot's shape. A good rule of thumb to remember is that the number of vertices that make up a mesh are ap- proximately half the number of faces. Once you have a target range of how many faces you want to spend on the new lower resolution model, just keep the isolated vertices down to half that number (1,000 faces = 500 vertices). On the Sub-Object panel there is a counter for selected sub-objects such as vertices, edges, and faces (Figure 1.18). Chapter 1 Built to Move 19 FIGURE 1.17 Using a high-res mesh to build a lower-res mesh is a very fast way to model. FIGURE 1.18 The Sub-Object panel gives you a convenient count of any selected sub-objects. 20 Animating Real-Time Game Characters Using a high-res mesh to build a low-res mesh can be considered an optimization technique, technically, but really involves more building than reducing. ON THE CD Patch Modeling With Surface Tools Another approach worth mentioning (although it's not really a polygonal modeling method) is the use of Surface tools. This is a spline-based, patch modeling technique in 3ds max, which is ideal for making hair and other organic geometry because the mesh is created using adjustable splines. Load Hair.max from the Chapterl directory on the book's CD-ROM (Fig- ure 1.19). FIGURE 1.19 Surface Tools is a great way to make organic geometry like hair. The Surface modifier allows you to turn a spline cage or referenced spline cage into a parametric mesh. In the Hair.max file, move the ver- tices of the splines on the right and watch how the geometry of the mesh to the left is affected. This use of a referenced object is key to the utility of Surface. Chapter 1 Built to Move 21 When working with spline cages, turn the Weld threshold down to 0 instead of the default I; this prevents you from receiving the annoying "Weld Coincident End- points? " message that pops up if you move any segments or splines (Figure 1.20). FIGURE 1.20 Lower the Weld threshold to avoid an annoying message prompt. The 3ds max software comes with an excellent tutorial that shows the application of the Surface modifier. Experiment with this powerful modeling tool and you'll quickly find yourself using splines to make hair, or even a character. The ability to dial in different resolutions may even result in the target triangle count you need for your character. Surface Issues After a model is built, and even during the building phase, it's a good idea to examine the surface, or faces, of the mesh for flaws that can be fixed. Paying attention to issues relating to the surface of a mesh helps attain the goal of good form. The first issue to address is bad edges. If there's a "dent" in the mesh where there shouldn't be, turn the edges necessary to complete the illusion of mass. Otherwise, the surface will have a slight (or severe) imperfection. It's easier to identify bad concave edges if you view your model in a flat-shaded in- stead of smooth-shaded viewing mode. Just right-click on the name of the view- port in the upper left-hand corner, and select Facets (Figure 1.21). Load Edge.max from the Chapterf directory on this book's CD-ROM (Figure 1.22). 22 Animating Real-Time Game Characters FIGURE 1.21 Right-click on the viewport name to change the shading mode in 3ds max. FIGURE 1.22 Turning edges is an important part of keeping a model's surface integrity. Go to a flat-shaded viewing mode and examine the Edge.max model in a Perspective viewport. Toggle the Edit Mesh modifier (renamed to "edge turn") on and off to see the difference the turned edges make. Chapter 1 Built to Move 23 Turning them results in a surface that looks smoother and more uniform, which achieves a more effective sense of solidity. The default 3ds max lighting works fine when seeking out surface imperfections in your mesh. Just use Arc Rotate (Ctrl-R) to catch highlights and shadows, rotating your view around the mesh to see any edges that need turning. Applying a Smooth modifier to a model is the quickest way to remove its smooth- ing groups and give it a faceted look as well. That way, even if you 're in a smooth- shaded viewing mode, the model will always \ookflat-shaded (Figure 1.23). FIGURE 1.23 Applying a Smooth modifier to a mesh results in stripping its smoothing groups (at first). Speaking of smoothing groups, most real-time game engines have no way of recognizing different smoothing groups in a mesh unless the ver- tices that make up a triangle are detached. This is an unfortunate yet eas- ily remedied shortcoming of the technology. Load Betty0l.max from the Chapterl directory on this book's CD-ROM (Figure 1.24). In BettyOl.max, select the mesh, toggle the Edit Mesh modifier on and off to see the effects that merging the geometry at the rear has in re- gards to the smoothing, and then delete the modifier. Betty's mesh avoids problems with over-smoothing by having geometry that intersects each other and forms a crease where the faces meet, creating a more realistic look without the vertices being merged together. This technique works particularly well for cleavage on female characters. 24 Animating Real-Time Game Characters .9k FIGURE 1.24 Smoothing groups are occasionally a pain in the behind. A more popular way to overcome the automatic assigning of one smoothing group to all the faces of a mesh by a game engine is to manu- ally detach the faces and reattach them only at certain points. This gives a selective smoothing group effect that works within the constraints im- posed by the real-time game engine. Load Betty02.max from the Chap- ter 1 directory on the book's CD-ROM (Figure 1.25). Fix Betty's face in Betty02.max by detaching and re-attaching certain polygons. Switch to wireframe viewing mode, then select and apply De- tach to Element to the faces shown in Figure 1.26. Hitting the F2 key will make selected faces appear solid and more visible. Hit F2 again to go back to normal selection mode. By default, the command panel on the right is a single column in which you can pan up and down. Another way to display it, however, is to make it into two columns. Do this by putting your cursor over the right edge of the viewport window (the left edge of the panel) until you see the horizontal window re-size arrow. Then click on the edge and drag left (Figure 1.27). Chapter 1 Built to Move 25 FIGURE 1.25 One smoothing group applied to Betty's face doesn't look too hot. FIGURE 1.26 Select these faces on the head to detach and then re-attach. [...]... are rare on real -time game characters They're usually in the shape of "mitts" that can be textured to look like fingers (Figure f 43) FIGURE 1.43 Mitts are the rage with most real -time game characters However, when you can add fingers, you must also add knuckles to accommodate animation, in the same way that elbows and knees need extra faces at the joint (Figure 1.44) 38 Animating Real -Time Game Characters... the game (such as weapons, effects, environment) even more triangles to use This keeps the quality level and speed of the game as high as possible MODELING: FUNCTION If the aspects of form dictate the shape of the real -time character, function applies to the shape as it deforms during animation Function is a very important area to consider when building your character model After all, real -time game. .. mesh indicate that the vertices are detached 27 28 Animating Real -Time Game Characters FIGURE 1.30 Detach the triangles of the upper lip to their own Element FIGURE 1.31 With the smoothing broken up manually, the surface of the face looks better Chapter 1 Built to Move 29 Again, the reason for this "detach and reattach" process is because most real -time engines ignore the smoothing groups you assign... technological constraints imposed by the game engine Most important, however, the mesh needs to accommodate animation geometrically and be correctly aligned to a Biped in character studio™ during the rigging and weighting phase Model Breakdown In a real -time game environment, it's a good general rule to make the characters as consolidated a mesh as is possible, allowing the game engine to process fewer pieces... object (B); the hips, abs, and right leg are one object (C); finally, the gun tip (D) is one object (Figure 1.34) 32 Animating Real -Time Game Characters FIGURE 1.34 A mesh needs to be comprised of the least number of objects as possible Betty's mesh is broken up the way it is for two reasons: game design and ease of access during weighting Originally, the end of Betty's gun was supposed to switch between... have to deform too much with the head atop it, but sometimes the uppermost vertices can deform slightly as the head turns You don't have to put a lot of work into this unless the character has a long flexible neck (Figure 1.36) FIGURE 1.36 The head and neck bend easily without your having to add too much additional geometry 34 Animating Real -Time Game Characters Shoulders The shoulder of an animated... 1.40) Hips and Rear The hips and rear areas are sometimes just as problematic as the shoulder area and need to support a full range of motion for the legs The main area you need to worry about is the rear area; make sure that as the upper leg moves forward and backward, the shape of the gluteus maximus stays solid (Figure 1.41) 36 Animating Real -Time Game Characters FIGURE 1.40 Make sure the waist has... basic optimizing situations, it's better in most cases to optimize manually It's a little slower than simply pressing a button, but it gives you ultimate control over the (sometimes) painful reduction process 30 Animating Real -Time Game Characters FIGURE 1.32 The Polygon Counter tool can help you stay within your face count budget FIGURE 1.33 Optimizing a mesh ensures the target face count is maintained... resolution you want 44 Animating Real -Time Game Characters FIGURE 1.52 The mesh is ready to receive mapping assignment When rendering a mesh that has a wireframe material applied to it, the edges need to be selected and made visible (Figure 1.53) FIGURE 1.53 Make an edge visible in order to see it when rendering in wireframe With the mesh splayed out like a Mercator projection of Earth, it's time to apply a... coverage and the quality of the texture UVW Coverage Mapping coordinates correlate to three spatial mapping axes that are known as UVW (They could have been given any series of letters, but are 40 Animating Real -Time Game Characters FIGURE 1.46 Slight tweaks to the geometry near the joints are occasionally necessary to ensure the mesh deforms correctly so named to precede XYZ in the alphabet X, Y, and Z, . press- ing a button, but it gives you ultimate control over the (sometimes) painful reduction process. 30 Animating Real -Time Game Characters FIGURE 1.32 The Polygon Counter tool can help . the real -time character, func- tion applies to the shape as it deforms during animation. Function is a very important area to consider when building your character model. After all, real -time game. The Sub-Object panel gives you a convenient count of any selected sub-objects. 20 Animating Real -Time Game Characters Using a high-res mesh to build a low-res mesh can be considered an optimization

Ngày đăng: 01/07/2014, 17:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan