INSIDE 3DS MAX® 7 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

INSIDE 3DS MAX® 7 [Electronic resources] - نسخه متنی

Adobe Creative Team

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











  • Building Rocky Terrain


    This tutorial will demonstrate the use of the Normal map and Render To Texture features with Displacement mapping in 3ds max 7. It will also cover other modeling features, both old and new. Important concepts like reuse and color choice will also be covered briefly. The goal is to teach a few of the new tools in 3ds max with an emphasis on putting together an entire project.

    Roughing Out the Geometry


    From our design sketch, we already have a concept of what we're going to model, so the rest becomes easier. The first thing that we're going to do is model the rock cliff in the foreground.


    1.

    Start with a fresh scene file. First, create a plane with a length of 2000 units and a height of 3000 units. Leave the length and width segments at their default settings of 4 and 4 respectively (Figure 8.2).

    Figure 8.2. Create a plane to serve as the ground.

    [View full size image]

    2.

    Go to the Modify Panel, hit the drop-down list of modifiers, and apply an Edit Poly modifier to the plane.

    3.

    Look at the cliff, and imagine what the base of it would look like. We want to make this base shape before giving the cliff height. The way to obtain this shape easily is to go into Edge sub-object mode and create new polygons attached to the original plane. This is done by selecting an edge with the Move tool and then holding down the Shift key during the process of moving the edge in the desired direction. It's a very simple and easy way to make new polygons from an existing object. You can see that several edges have been selected and moved together to create new polygons connected to each other and the original plane (Figure 8.3).

    Figure 8.3. Using the Shift key to create new polygons from edges.

    [View full size image]

    4.

    Continue to Shift-Move edges until you have the desired shape. You will also have to scale some outer edges to get the tapered edges of the cliff's border (Figure 8.4).

    Figure 8.4. The base outline of the cliff.

    [View full size image]

    We're going to give the cliff height by selecting all the polygons in the cliff object and extruding them upward. We're going to do this extrusion in four different stages so that we can create plateaus in the sides of the cliff that will break up its shape and make it more complex and interesting.

    5.

    Select all the polygons of the cliff object, and then click the Extrude button in the Edit Polygons rollout of the Edit Poly modifier. Left-drag the polygons upward. This will create the first level or plateau (Figure 8.5).

    Figure 8.5. Giving the cliff some height.

    [View full size image]

    6.

    Use the Scale transform to slightly scale the face selection so that the cliff tapers inward as it moves upward. We are using the Extrude tool with the Scale transform instead of the Bevel tool because it allows us to keep the exact border shape of the original base plane. Using the Bevel tool distorts the border shape in magnitudes relative to the bevel amount. We don't want that effect in this case.

    7.

    Deselect the two polygons shown in Figure 8.3, and then extrude upward again to the next plateau. Scale the face selection inward once more, and deselect another face on the border (Figure 8.6). Repeat the extrude-upward-and-scale operation again.

    Figure 8.6. The second extrude level.

    [View full size image]

    8.

    Deselect the two polygons shown in Figure 8.7, and extrude again to make another level. Scale this level slightly outward to make a small overhang. Then repeat this extrusion upward a very small amount. This small extrusion will make the top edge of the cliff stay sharp when we apply a smoothing modifier to it later.

    Figure 8.7. The final extrude level.

    [View full size image]

    9.

    We're also going to put an extra loop of edges beneath each of the plateau levels to ensure that the plateaus remain flat and don't curve when the object is smoothed. We'll start creating this edge loop by selecting a vertical edge beneath each plateau and then clicking the Ring button in the Selection rollout of the Edit Poly modifier. This selects the edges adjacent to the selected edges that border on four-sided polygons. In this mesh, the edge selections will propagate around the entire object because it consists exclusively of four-sided polygons (Figure 8.8).

    Figure 8.8. Selecting edge rings.

    [View full size image]

    10.

    With these edges selected, click the Connect button in the Edit Edges rollout of the Edit Poly modifier. This will connect the adjacent edges with a continuous loop of edges (Figure 8.9).

    Figure 8.9. Adding edge loops.

    [View full size image]

    11.

    In the Edit Geometry rollout of the Edit Poly modifier, select Edge from the drop-down menu of options for Constraints (Figure 8.10).

    Figure 8.10. Selecting the Edge Constraint.

    12.

    Deselect all these edges by left-clicking an empty space in the viewport. Select an edge on the new edge loop lowest on the model, and click the Loop button in the Selection rollout of the Edit Poly modifier. This selects the loop of edges that was just created. With the Edge constraint still active, we can slide this edge loop up along the vertical edges to just below the lowest plateau line (Figure 8.11).

    Figure 8.11. Moving an edge-constrained edge loop.

    [View full size image]

    13.

    Repeat this procedure for the other two edge loops so that there are two edge loops near the top of each plateau level. This will ensure that the plateaus stay flat on top when you smooth them later with a MeshSmooth or TurboSmooth modifier. At this point, it is advisable to round out and fine-tune the shape of the cliff by selecting vertices or edges and moving them around until the shape is desirable (Figure 8.12).

    Figure 8.12. The final cliff shape.

    [View full size image]


    Believe it or not, that's all the modeling we're going to do for this cliff. The rest of the detail will be added with Displacement maps. We will then derive the Normal map from the displaced mesh using the Render To Texture dialog. To have control over how the cliff is displaced with maps, we need to lay out mapping coordinates for the cliff. This leads us into the next part of the tutorial.

    Mapping the Terrain


    Mapping, the process of applying various surface textures and lighting effects to a 3D object, allows you to gain great control over the appearance of your models, whether rocky cliffs or rubber duckies. It's been said that textures and lighting generate at least half of the positive impact that we feel when we see a well-done 3D model. Mapping is that important.

    In particular, the Unwrap UVW modifier is an essential tool for controlling exactly how maps will be displayed on any 3D model, and we will be using it extensively in the following tutorial. With that said, let's start unwrapping our cliff model.


    1.

    Once the edge loops are placed under the plateaus, we need to unwrap the object. Exit sub-object mode, right-click the Edit Poly modifier in the cliff's modifier stack, and select the Collapse All option. This will convert the object to an editable polygon mesh.

    2.

    From the Modifier drop-down list, apply an Unwrap UVW modifier to the cliff. Activate the Face sub-object mode so that the polygons of the cliff can be selected within the Unwrap UVW modifier. Make sure that the Ignore Backfacing option is enabled in the Unwrap UVW modifier's Selection Parameters rollout.

    The next step is to unwrap the object into front, back, and top sections. We will then join the edges of the front and back so that we have one long polygon strip for mapping.

    3.

    In the Front viewport, marquee-select the polygons that are visible. Toggle the Selection mode to Window in the Main toolbar. Then deselect the top polygons of the cliff object that are perpendicular to the Front viewport. Control-left-click to add to the selection any polygons that were left out from the front of the cliff when the marquee selection was made. Also, Alt-left-click any polygons on the back of the cliff to deselect them (Figure 8.13).

    Figure 8.13. Selecting polygons for a planar projection.

    [View full size image]

    Note

    New to 3ds max 7 is the addition of Thick Seam Display within the Unwrap UVW modifier (Figure 8.13). Go to the Display section of the Parameters rollout, and note that Thick Seam Display is enabled by default. In the viewport, the seams are visible as thick green lines that follow the seam edges along the model surface. It is possible to make these lines thinner by choosing Thin Seam Display or to turn them off completely by choosing Show No Seams.

    4.

    With all the polygons on the front half of the cliff selected, align the planar map to the Y axis in the Sub Object Params group of the Parameter rollout and click the Planar Map button. Click the Edit button in the same rollout to bring up the Edit UVWs dialog. The planar projection of the front of the mesh is displayed in the dialog along with the overlapping polygons that haven't had planar projections applied to them yet. Move the selection of polygons from the front of the cliff away from the overlapping polygons of the rest of the cliff.

    5.

    For the rest of the cliff we can easily separate the parts. Go to the Edit drop-down menu in the Main toolbar, and choose Select Invert. This will select the remaining polygons of the cliff. Click the Planar Map button. In the Edit UVWs dialog, and move these newly planar-mapped polygons away from the center of the UVW mapping area (the blue square). Then, with the Edit UVWs dialog still open, select the top polygons of the cliff and choose the Z axis as the axis to align the planar map to. Click the Planar Map button a final time while the top polygons are selected. Now the top, front, and back groups of polygons have all been unwrapped with planar projections (Figure 8.14).

    Figure 8.14. The cliff's basic planar projections laid out.

    6.

    You'll notice that there are some overlapping edges in the back section of the cliff where there are two separate columns close to one another. The best action to take here is to manually move the vertices in the Edit UVWs dialog so that they don't overlap.

    7.

    With the cliff's polygons now properly flattened, we can stitch the front and back polygons together. Switch to Edge sub-object mode in the Edit UVWs dialog. Select all of the edges for the cliff front, and mirror them using the Mirror Horizontal tool found on the Main toolbar of the Edit UVWs dialog.

    8.

    Deselect the cliff front edges and then select the green edges of the front polygons that run down the center of the cliff. Once selected, they will turn red, and the corresponding edges on the back polygons will turn blue. In the Tools drop-down menu of the Edit UVWs dialog, select Stitch Selected. In the Stitch Selected tool dialog, deselect Align Clusters and Scale Clusters. Leave the bias at 0.5. Click OK to close the dialog. You will then have to move the edges around and get rid of overlaps until you come up with the result show below (Figure 8.15). As you can see, the objective is to unwrap the object without losing its original proportions.

    Figure 8.15. Stitching edges together.

    9.

    The last part of unwrapping the object is to pack it into the UVW mapping area (the blue box aligned to the grid in the background). To accomplish this, we will scale the objects so that they fit into the UVW mapping area. There is a tool that does this automatically, called Pack UVs, and it can be useful. However, it doesn't size the pieces according to their actual size on the object. This is a very important point, because the proportions of the unwrapped object should remain the same as their counterparts in the 3D model. If they aren't the same proportions, it will lead to ugly stretching of textures on the object.

    To do the same thing manually, select the elements and scale them down to their correct size within the UVW mapping area. After they are scaled, move them in to fit tightlybut not overlappingin the UVW mapping area. You'll also notice that in this case I've broken this rule, and that the sides of the cliff model have been horizontally scaled to fit better in the UVW mapping area and maximize the map coverage. This horizontal scale can be offset later with horizontal map tiling in the material editor. For most cases though, try to keep the UV layouts matching in proportion to the actual polygon proportions on the model (Figure 8.16).

    Figure 8.16. Packing UVs into the UVW mapping area.


    This completes the process of unwrapping the cliff object. The next step is to apply a material to the cliff object and use the Displace Mesh modifier (WSM) to displace the cliff mesh based on the material applied to it.

    Adding Complexity with Materials


    Displacement material is a material that creates the look of surface geometry without actually adding any new polygons. For the sake of simplicity, we will be using procedural maps for the rock's Displacement map and some bitmaps for the rock's Diffuse colors. (Further information on mapping types and techniques will be found in later chapters of this book.) The procedural materials that most closely resemble the patterns of rock are the Cellular and Smoke procedural maps. There are other options within the material library, like procedural Noise and Marble, so you can always experiment to get the desired effect. It is also possible to paint Displacement maps, but this is more time-consuming and is unnecessary in this instance.

    We'll be looking at Normal mapping in this section. A form of Displacement mapping, Normal mapping is a new feature of 3ds max 7 that is very useful for creating and controlling the appearance of detail without having a huge number of polygons in the scene. It uses a Color map to represent geometry data for a surface so that the surface reacts to light and shadow. Normal maps encode XYZ vector information into an RGB map, with red representing the X (horizontal) vector, green representing the Y (vertical) vector, and blue representing the Z (depth) vector. When applied to an object, these three color channels can give an object the appearance of having highly detailed geometry. Think of them as Bump maps on steroids.

    Displacement-Mapping the Cliff


    Now let's add some maps to your scene.


    1.

    After saving your progress file, open the file Landscape_CliffDisplace.max. This file contains the unwrapped high- and low-resolution cliff models. You can also keep working with your own file, if you wish, by merging the contents of this sample file into your scene and applying the material and copying the modifiers onto your cliff mesh. Remember that modifiers can be copied from one object to another by right-clicking the modifier in the stack and selecting Copy. Then select the object, right-click its name in the stack, and choose either Paste or Paste Instanced in the drop-down menu that appears.

    2.

    Take a look at the HiRes_herocliff model. After the computer thinks for bit, it will display the displaced mesh. In the Displacement Approx rollout of the Displace Mesh (WSM) modifier that has been applied to the HiRes_herocliff, Custom Settings and Subdivision Displacement are checked and the subdivision method is set to Spatial and Curvature. The Edge and Distance values are both set to 60 and the Angle value is set to 30. Without going into too much detail, the higher the numbers for all three of these values, the lower the number of polygons that will be generated by subdivision. In general, the less geometry you use to create a desired effect, the better. Also take a look at the Advanced Parameters and notice that the displacement style is set to Delaunay. This method of displacement gives the best results, but also creates very dense triangulated meshes (Figure 8.17).

    Figure 8.17. Displacement settings.

    [View full size image]

    This is a good time to explain the term "hero" as it is used for models in computer graphics. A "hero" model is an object (or character) that is usually the visual focal point of the scene or is featured most prominently. It is also the model that will receive the most attention, so it has to look really good. Hence we are using the term "herocliff" for the cliff model that is in the foreground of the scene.

    3.

    Open the Material Editor, and take a look at the HiRes_herocliff material applied to the HiRes_herocliff model. The Displacement slot is the most important, so focus on it first. Notice that there is a Mix material in the Displacement slot that contains a Cellular map mixed 50 percent with a Smoke material. Also notice the large sizes for the Cellular and Smoke maps, with numeric values of 3000 and 200 respectively. This is necessary because of the cliff model's large scale.

    Note

    Procedural maps are different from bitmaps because they are resolution-independent. In order for them to be the right size, their values must be scaled with the object. A bitmap has a fixed number of pixels and therefore has a fixed resolution, so it will become more pixelated as the scale of the object that it is applied to increases.

    Look at the Diffuse Color slot of the HiRes_herocliff material. It also contains a Mix map with Cellular and Smoke materials of the same size. The only difference is that some of the procedural colors have been changed and some bitmaps have been added to the Color slots of the Smoke map. The Displacement map has also been used in the Bump map slot because both Displacement and Bump mapping rely on the same grayscale values in maps (Figure 8.18).

    Figure 8.18. Examining the displacement slot of the HiRes_herocliff material.

    [View full size image]

    4.

    Now disable the Displace Mesh modifier by clicking the Light Bulb icon next to it in the modifier stack. Once the displacement is no longer displayed in the viewport, hold down the Shift key while clicking the cliff model with the Move tool. A Clone dialog will appear, allowing us to create a copy of the object. Name this new cliff object LoRes_herocliff. This is the model to which we will apply Normal mapping.


    Transferring Detail with Normal Mapping


    In this next sequence, we are going to use Normal mapping to transfer detail from the high-resolution cliff model to apply to the low-resolution cliff modelsort of a 3D "wealth transfer" process.


    1.

    Drag the HiRes_herocliff material to another slot in the Material Editor and rename it LoRes_herocliff. Apply the LoRes_herocliff material to the LoRes_herocliff model.

    2.

    With the two objects still aligned and the LoRes_herocliff object selected, press 0 on the keyboard to bring up the Render To Texture dialog. In the Objects To Bake rollout, go to the Projection Mapping section and click the Enabled check box. Then, next to the Projection drop-down, click the Pick button and select HiRes_herocliff. This tells the Render To Texture tool which object's textures it will be baking. (Baking, by the way, is the process of combining several layers of textures together into one texture.) A Projection modifier appears in the stack of the LoRes_herocliff. This is what will project the textures rendered from the HiRes_herocliff onto the LoRes_herocliff object. (In essence, you are "stealing" detail from the high-resolution object to apply to the low-resolution one. Clever, no?) Deselect the Sub-Object levels check box below the Pick button in the Projection Mapping section of the Render To Texture Objects to Bake rollout (Figure 8.19).

    Figure 8.19. Setting up textures to bake and transfer via Normal mapping.

    [View full size image]

    3.

    Click the Options button to see the Projection Options dialog. Choose Local XYZ as the Normal map spatial coordinate system. This will allow the map to be rendered without lighting data being baked into the Normal map. This is a good feature if you want to reuse the Normal-mapped object and rotate it into different positions in the sceneyou certainly don't want the lighting baked in that case. Once this is done, close the Projection Options dialog (Figure 8.20).

    Figure 8.20. Render To Texture options for Normal maps.

    [View full size image]

    4.

    In the Mapping Coordinates section, click the Use Existing Channel radio button. In the Output rollout, click the Add button and choose NormalsMap. Leave the size at 256 pixels for now in the Selected Element Common Settings section. In the Selected Element Unique Settings section, click the Output into Normal Bump check box. In the Baked Material rollout, click the Output into Source radio button. These last two options output the Normal map to the Bump slot of the material for the LoRes_herocliff object (Figure 8.21).

    Figure 8.21. Settings for placing a Normal map in a material.

    [View full size image]

    5.

    With the LoRes_herocliff object still selected, open the Modify panel and look at the Projection modifier that has been added to it by the Render To Texture tool.

    6.

    Notice in the Geometry Selection rollout that the HiRes_herocliff is listed at the Object level. The projection cage that surrounds the cliff object in blue is quite messy, but it can be fixed by going to the Cage rollout and clicking the Reset button. Following this, enter a Push Amount value of 300 in the same rollout to surround the HiRes_herocliff again.

    7.

    Now we can finally do a render. Before doing so, change the Output path in the General Settings rollout at the top of the Render To Texture dialog to a folder that you can store the maps. At the bottom of the Render To Texture dialog, click the Render button and let's see what we have (Figure 8.22). Check to see if it looks the same as the corresponding map include in the project files.

    Figure 8.22. Are you Rrrready to Rrrrender?!!

    [View full size image]


    Finishing the Cliff


    The red areas on the cliff render show where there are holes in the mesh or (more likely) where the projection cage intersects with the HiRes_herocliff mesh (Figure 8.23). (The Render To Texture tool will also output an unseen render of the Normal map into the Bump slot of LoRes_herocliff material as a Normal map type.) Let's fix those now and finish up our cliff.

    Figure 8.23. Checking for Render To Texture problems.

    [View full size image]

    Note

    The red color sometimes seen in the render signifies a ray miss. The ray miss color can be changed to another color in the Options dialog within the Projection Mapping section of the Objects To Bake rollout.


    1.

    To get rid of the intersections, we'll manipulate the projection cage (Figure 8.24). In the Projection modifier, click the Cage sub-object level. Within this sub-object level, we can manipulate the vertices that make up the cage. Click the check box for the Shaded option in the Display section of the Cage rollout. Any mesh that intersects the cage will appear to be outside the shaded surface of the cage. Once these problem areas are visible, manipulate the cage vertices so that the cage no longer intersects with them. After making these changes, rerender the image and see if there are any red spots on the render.

    Figure 8.24. Manipulating the Projection modifier cage.

    [View full size image]

    2.

    Change the Size of the render to 1024 in the Selected Element Common Settings section of the Output rollout. Rerender the Normal map and close the Render To Texture dialog.

    3.

    Hide the HiRes_cliff model and render the LoRes_herocliff model. The low-resolution mode will now look as if it has been displaced, like the high-resolution object in the rendered image. We can add a TurboSmooth modifier to the LoRes_herocliff object to make it look a little less blocky around the edges. The TurboSmooth modifier, new to 3ds max 7, is just a trimmed-down version of the MeshSmooth modifier and much quicker to display its results in the viewport (Figure 8.25).

    Figure 8.25. Adding a TurboSmooth modifier to the LoRes_herocliff model.

    [View full size image]

    4.

    Open the file entitled Landscape_CliffNormalMap.max to see the final result of the Normal-mapped low-resolution cliff.


    Now you've explored the basics of how displacement can be used with Normal mapping. The Displacement and Normal map workflow we used for this model will be used again when we model the ground plane. That's the next piece of the puzzle.


    • / 193