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

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

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

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

Adobe Creative Team

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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











  • Procedural Mapping


    Now that you've taken a quick look at Planar mapping and Render Bounding Box/Selected, let's investigate some of 3ds max 7's most useful map types: Noise and Falloff. These procedural maps are extremely versatile and can be applied in many situations to solve difficult texturing problems and to create quick and eye-catching texture effects.

    Noise Mapping


    Noise maps, which apply random marks to a surface, among the most widely used of procedural materials. Typically employed to reduce unwanted smoothness and add grain and grunge to a surface, Noise is also useful for creating lightning, fire, and water effects. Caustic patterns, the lighting effects caused by internal reflections and refractions in a body of water, can be made with a Noise map by loading it as a projector map in a spotlight or projector light. A Noise map employed as a Diffusion map in the 3ds max 7 Raytrace material is effective for "dirtying up" underlying textures. And Noise can break up tiled bitmap patterns that look too regular.

    Falloff maps, which set 3D gradients, are also quite versatile, especially when you need unusual effects. Use Falloff maps to make reflection maps more realistic; to add iridescence and pearlescence to a surface; and to create X-ray effects and what I call the "retro computer graphics" look.

    Using Noise Maps


    The following steps show some quick examples of Noise maps in action:


    1.

    Load the file Noise Tiling Mask.max from the DVD. You'll see a very simple scene: a Quad Patch object representing the ground, with a targeted camera looking at it and a spotlight shining down (Figure 11.5).

    Figure 11.5. A simple test scene to demonstrate texture tiling and masking with the Noise map.

    [View full size image]

    2.

    Activate your Camera01 viewport and render this test scene. The rendering shows a cracked mud texture on the Quad Patch object representing the ground (Figure 11.6). I created this texture by retouching a scanned photo of a real cracked mud surface and made it seamlessly tileable by using Adobe Photoshop's Filter: Offset > Wrap Around feature.

    Figure 11.6. A cracked mud bitmap texture applied to the Quad Patch object.

    3.

    Open the Material Editor, and you'll see that the Cracked Mud material applied to the Quad Patch is in Slot #1. Click the Diffuse Color map slot to open it, and take a look at the Cracked Mud A.jpg bitmap settings. Tiling is currently set to 1.0 on both U and V, so change these settings from 1.0 to 3.0 and render the scene again.

    4.

    With that change, the map now tiles seamlessly across the surface of the Quad Patch. In other words, you can't see obvious edges. However, the overall pattern in the mud texture noticeably repeats. There are bothersome dark areas that repeat diagonally across the surface (Figure 11.7).

    Figure 11.7. The cracked mud bitmap texture tiled 3 by 3 across the surface.

    An excellent way to fix visible tiling artifacts like this one is to mix the existing bitmap with another bitmap, with each tiled differently, then blend them with a completely non-repeating procedural map (such as Noise!).

    5.

    Return to the Material Editor, make sure you're in the Diffuse Color map slot, and click the Bitmap button. When the Material/Map Browser appears, make sure New is checked in the Browse From section, double-click Mix, and choose "Keep old map as sub-map" when the Replace Map dialog appears. You now have a new Mix map, with the Cracked Mud A.jpg bitmap loaded into the Color #1 (top) slot.

    6.

    Click-hold and drag this map from the Color #1 slot to the Color #2 slot, choose Copy (not Instance) when the Copy Instance Map dialog appears, then click OK.

    7.

    Open this new map slot and change both the U and the V tiling from 3.0 to 7.0. Under Angle, leave the U and V values at 0.0, but change W from 0.0 to 90.0. This will rotate the existing map 90 degrees.

    8.

    Click the Go To Parent button to return to the Mix map level, then click the Map button next to the Mix Amount spinner. When the Material/Map Browser appears, pick Noise from the list.

    9.

    Activate your Camera01 viewport again and render the scene (Figure 11.8).

    Figure 11.8. Two differently tiled bitmap textures blended with a Noise map.


    What you've done is to blend two differently tiled bitmap textures together with a grayscale Noise procedural map. Since the Noise procedural map is a mathematically random texture, it camouflages the appearance of unwanted repeating textures.

    To take further advantage of this Noise mapping technique, try the following:

    • Load different bitmaps in each Mix map slot.

    • Change the Noise Threshold settings to make the transitions between the two bitmaps more distinct.

    • Use other procedural maps, such as Dent, Marble, Smoke, Stucco, and so on, to blend the bitmaps.


    Fun with Falloff


    As mentioned earlier, the Falloff map is also one of the most useful of the 3ds max 7 procedural maps. Once you master it, you will find reasons to use it often.

    Understanding the use of Falloff maps can save you time and effort in producing effects such as reflections. For example, I use Falloff frequently in the Reflection map slot of a Standard material to fix problems in the rendering of highly reflective objects.

    Often, you don't need to render physically correct reflections (raytraced reflections, for example) for your scene; a simple Reflection map can suffice, and it will render much faster than a raytraced reflection. However, the default Reflection mapping often produces reflective objects that look self-illuminated, especially in 3D scenes with dim lighting. Although we tend to think of reflective objects such as chrome-plated car bumpers as "bright," they actually don't have the high ambient value of brightly colored or self-illuminated objectsthey simply reflect their surroundings. So a self-illuminated appearance for such objects usually looks wrong.

    One way to fix this is to knock down the levels of apparent illumination along the edges of the reflective object, reducing the strength and brightness of the reflection in those areas. The Falloff map is perfectly suited for this effect.

    Modifying a Reflection with a Falloff Map


    The following steps show how to use a Falloff map to tone down a reflection:


    1.

    From the DVD, load the file Reflection Falloff Example.max. Once again you'll see a very simple scene: a Sphere primitive sitting inside a large Box primitive, with multiple spotlights shining on the sphere (Figure 11.9). (Show Map in viewport should be turned off for the Reflection Map Example" material in the .max file, to make the Camera01 viewport in the scene look like the viewport in Figure 11.9.)

    Figure 11.9. The example scene for Reflection Falloff testing.

    [View full size image]

    2.

    Open the Material Editor, and look at the materials used in the scene. The Reflection Map Example material is applied to the sphere; it consists of a "copper" texture bitmap (Copper Sheet Scratches Dark.jpg) loaded in the Reflection map slot. Environmental: Spherical Environment mapping coordinates are used. The Room Interior texture uses the same copper image, but this time as a simple Diffuse Color and Bump map, with no reflection component.

    3.

    Activate your Camera01 viewport and render the scene (Figure 11.10).

    Figure 11.10. A "copper" bitmap texture applied as a Reflection map on the sphere and as a Diffuse Color and Bump map on the walls of the surrounding box.

    4.

    Note that the sphere appears to reflect the scratchy copper texture in the room, but the sphere itself is a bit too brightthe reflection makes it look self-illuminated. We will address this problem by adjusting the look of the reflection with the Falloff map.

    5.

    Return to the Material Editor, click the Reflection map slot of the first material to open it, and then click the Bitmap button. When the Material/Map Browser appears, make sure New is checked in the Browse From section, double-click Falloff, and choose "Keep old map as sub-map" when the Replace Map dialog appears. The copper bitmap loads into the Front (top) slot of the Perpendicular/Parallel Falloff type (the default).

    6.

    Activate your Camera01 viewport and render the scene again.

    Hmm, this isn't very goodthe white "outer" color makes the sphere look not just self-illuminated, but also translucent in the center, which isn't the effect we want. Let's fix this now.

    7.

    Return to the Material Editor. Click-hold and drag the Black (front) color swatch down to the White (side) slot to make it black as well. Or you can choose Copy in the Copy or Swap Colors dialog. Now rerender the sphere.

    8.

    Result: The sphere reflection shades off into a darker color along the edges of the sphere, relative to the camera (Figure 11.11).

    Figure 11.11. The modified Perpendicular/Parallel Falloff type reflection.

    9.

    Return to the Material Editor, click the Swap Colors/Maps button on the right-hand side of the Falloff Parameters rollout, then render the Camera01 viewport again. The sphere retains most of its Diffuse color, but the reflection now appears more along the edges of the object.

    10.

    Return to the Material Editor. Under Falloff Type, change the type from Perpendicular/Parallel to Fresnel, then render the Camera01 viewport again. The Fresnel falloff type restricts the reflection to the very outer edges of the sphere, relative to the Camera01 viewpoint.

    11.

    Return to the Material Editor once more. Under Falloff Type, change the type from Perpendicular/Parallel to Shadow/Light, then render the Camera01 viewport again. You can see the difference in the reflection effect (Figure 11.12). The "glow" is gone.

    Figure 11.12. The Shadow/Light Falloff type used in the Reflection map slot.


    As its name implies, the Shadow/Light Falloff type restricts whatever procedural map or bitmap type has been applied to the areas that are either illuminated by the lights in your scene or else fall into shadow. This is perhaps the most useful setting for ensuring that your reflection maps don't make your object appear to be self-illuminated.

    Note

    You can also reverse this concept to impart an edge-lit look to your objects.

    Using Falloff for Iridescent Effects


    For the next Falloff example, we'll create some iridescent effects using the Falloff map to mix two very different material colors.

    Iridescence in nature is the rainbow effect seen on the surface of a soap bubble, oil slick, or other surface with special refractive properties. Iridescence can depend on the angle at which you view the surface of an object (as with a beetle's carapace, scratched aluminum, or stainless steel) or the nature of chemical reactions occurring on the surface (as with the aforementioned soap bubble and oil slick).

    First we'll create a simple iridescent material:


    1.

    From the DVD, load the file Human Skull.max (Figure 11.13). This high-resolution human skull model is perfect for demonstrating some of the properties of Falloff.

    Figure 11.13. A high-resolution human skull model.

    [View full size image]

    2.

    Activate your Camera01 viewport and render the image (Figure 11.14).

    Figure 11.14. The skull model with its existing moldy texture.

    Now let's discard the existing skull texture and create an iridescent effect.

    3.

    Open the Material Editor, select an unused material slot, and change the Material Type from Standard to Blend. (You can discard the existing material if you want.) Click the Material 1 (the button calls it "#0") slot, and when it opens, change its Diffuse Color values to RGB coordinates (0, 0, 128), dark blue. Change the Specular color to RGB (255, 255, 255), pure white, the Specular Level to 100, and Glossiness to 25. Change the material name to Blue and click the Go To Parent button.

    4.

    Open Material 2 and change the Diffuse Color values to RGB (0, 255, 0), pure bright green). Change the Specular color to RGB (255, 255, 255), or pure white, the Specular Level to 100, and Glossiness to 25. Change this material name to Green, click the Go To Parent icon again, and name the Blend material Iridescent Blue-Green.

    5.

    Click the Mask button, and when the Material/Map Browser appears, make sure New is selected. Select Falloff, and when it appears in the Material Editor, you'll see the sample sphere (or box) in the Material Editor change to a dark blue with a bright green halo around its edges.

    6.

    Next, select the skull geometry (either from your viewports or from the Select Objects dialog), and assign the Iridescent Blue-Green material to it.

    7.

    When you're finished, activate your Camera01 viewport and render the scene (Figure 11.15). (The shading effects will be obviously more noticeable on your screen, in color, than in this black-and-white illustration.)

    Figure 11.15. The Falloff map blends two different material colors and creates unusual shading effects across the surface of this model.


    The end result looks a bit like an old 1960s blacklight poster. As you can see on your screen, the bright green material appears on the outer edges of the geometry, roughly parallel to your Camera01 viewpoint. The green material then blends into the dark blue material, which appears predominantly on the surfaces that are more perpendicular to your viewpoint. This iridescent effect can be quite striking when applied to complex geometry and enhanced with different Diffuse Color, Bump, or Reflection maps.

    Again, as with the earlier Falloff Reflection map examples, you can return to the Material Editor, change the Falloff type to Fresnel or other settings, and rerender to check the results.

    Creating a "Retro CG" or X-Ray Material


    Continuing our exploration of Falloff map effects, here's a simple way to modify the material you've just created to produce an X-ray effect or a "retro computer graphics" look:


    1.

    Go to the Material Editor and drag-copy the Iridescent Blue-Green Blend material to another material slot. Change this new material's name to X-Ray Green, select the Skull model (if it's not already selected), and apply the X-Ray material to it.

    2.

    Open the existing Green material component (Material #2) of the X-Ray Green material. Make sure the Diffuse Color is RGB (0, 255, 0), bright green. Change Glossiness to 40 and Specular Level to 30, then change the Self-Illumination value to 100.

    3.

    Open the Extended Parameters section. Verify that Falloff is set to In, set the Amount to 100, and change Falloff Type to Additive.

    4.

    Click the Go To Parent button, drag the Green Material #2 up to the (current) Blue Material #1 slot, make it a Copy (not an Instance), and then open this new material. Change its name from Green to Inner, and then make the Diffuse Color pure black, or RGB (0, 0, 0). Change Self-Illumination to 0.

    5.

    Now activate your Camera01 viewport, and render a test image (Figure 11.16).

    Figure 11.16. The new X-Ray Green material creates an old-fashioned computer graphics look.


    You've undoubtedly seen this computer graphics look in older movies and TV shows, where wireframe or edge-lit computer graphics were employed to illustrate technical data. It's still a useful technique for depicting the inner workings of mechanical devices for industrial or illustrative work.

    So, how else can we use this material? It would be particularly effective used in medical graphics, as for example on a complex human skeleton mesh (especially if that mesh were itself inside another, properly proportioned human mesh object). By changing the green outer color to a bluish-white and adjusting the Glossiness and Specular Level values, you could simulate the Martian spaceport "full-body X-ray scanner" scene in the movie Total Recall.

    More Falloff Map Suggestions


    Here are some additional Falloff mapping tricks you can try:

    • Change the Material Effects channel of Material 1 (the "outer" material) to 1 or above, and then apply a Lens Effects Glow to it. With a careful choice of material color gradients (such as blue-white or purple, shading off to black) and Glow, you can simulate an eerie ultraviolet or black-light look.

    • Apply an automatic (Raytrace) Reflection map to just one of the materials. This would work best on an object surrounded by other geometry and an Environment map.

    • Use a Raytrace map for one of the materials.


    Diffuse Shading


    Now let's take a look at how 3ds max 7's various shader types allow you to alter the appearance of light across a 3D surface. Here, we'll look at "dry rock" settings, then modify them to produce the illusion of wet, shiny rock. By animating certain material parameters, we can even simulate the appearance of water cascading down the rock face.

    Diffuse shaders, which use a map to spread out (diffuse) the play of light across an object, are the key to these effects. Of 3ds max 7's available diffuse shader types (see below), the Oren-Nayar-Blinn type is especially well suited for rough, dry surfaces such as rock, stucco, brick, and the like. Such substances tend to absorb and scatter light with little falloff across their surface. For many rough, matte, or satin materials, an Oren-Nayar-Blinn look is more realistic than those created by the standard Phong- or Blinn-shaded materials, even if you've cranked down the specular highlights on the material. Overall, altering the shader types of your materials to better match their real-world physical lighting responses can dramatically improve the overall realism of your renderings.

    Creating a Dry Rock Surface


    Let's investigate how Oren-Nayar-Blinn diffuse shading can be made to produce a dry rock effect.


    1.

    From the DVD, load the file Dry Rock Example.max (Figure 11.17).

    Figure 11.17. The Dry Rock Example test scene.

    [View full size image]

    The Dry Rock Example.max scene consists of a high-res Quad Patch object sitting in the middle of your 3ds max 7 desktop, with several shadow-casting spotlights pointing at it. (One spotlight is off at the moment; ignore it for now.) If you click the Quad Patch object and go to the Modify panel, you'll see that the Quad Patch grid has a Displace modifier applied to it below the UVW Map modifier. A bitmap called Dry Rock.jpg is used to distort the patch geometry.

    2.

    Open the Material Editor and take a look at the material in Slot #1. This material, called Dry Rock, consists of a Blinn-shaded material with the Dry Rock bitmap loaded in both the Diffuse Color and Bump map slots.

    3.

    Open the Diffuse Color map slot and View the Dry Rock.jpg image (Figure 11.18).

    Figure 11.18. A mossy stone wall texture.

    This seamlessly tileable bitmap is of a stone wall with light tan and brown rough-hewn rocks; the rocks are covered in various mosses and lichens, which give them a further mottled appearance.

    4.

    Close the Diffuse Color map, choose Go to Parent, activate the Camera01 viewport, and render the scene (Figure 11.19).

    Figure 11.19. The Dry Rock.jpg texture used on the Displaced Quad Patch objects.

    As your rendering shows, the Dry Rock.jpg bitmap, coupled with the intense multiple spotlights in the scene, produces a bright rock face.

    5.

    Return to the Material Editor, and change the shader type of the Dry Rock material from Blinn to Oren-Nayar-Blinn. (You may need to Go To Parent to see this.) As you do, you'll notice that the sample sphere in Material Slot #1 becomes darker.

    6.

    Now render the scene again, and notice the differences between this rendering and the previous one with the Blinn shader type. I suggest using the Clone Rendered Frame Window tool to compare these.


    Creating a Wet Rock Surface


    Now that you've seen the differences between Blinn and Oren-Nayar-Blinn shader types for the dry rock, what about creating the illusion of wet rock? In the next example, you'll modify the textures used on this rock face to create the illusion of wet, shiny rock. You'll even see how using an animated Noise map in the Glossiness slot produces the effect of sheets of water cascading down the rock face.

    To create a wet rock surface, follow these steps:


    1.

    Return to the Material Editor, and click Material Slot #2. Change the name of this material to Wet Rock 1, and then change the Diffuse Color to RGB (137, 50, 50). Make Specular pure white, or RGB (255, 255, 255). Keep this material's shader type set to Blinn.

    2.

    Under Specular Highlights, change the Specular Level to 200 and Glossiness to 50.

    3.

    Go to the Maps rollout, and open the Diffuse Color slot. When the Material/Map Browser appears, double-click the RGB Multiply map to load it. In the RGB Multiply map, click the name slot for Color #1, and select Bitmap from the Material/Map Browser. Next, from the Select Bitmap Image File menu, select the image Dry Rock.jpg from the DVD. When you return to the Material Editor, change UV Tiling to U 1.0, V 2.0, then click the Go To Parent button.

    4.

    Drag-copy the Dry Rock.jpg bitmap from the Color #1 slot down to Color #2. Make it a Copy, not an Instance. Then click the Go To Parent button again. Drag-copy the entire RGB Multiply map from the Diffuse map slot down to the Bump map slot, but make this an Instance. (You want any changes you make to the Diffuse component to be updated for the Bump map.)

    5.

    Click the Glossiness slot, and from the Material/Map Browser, select Noise. Change the Noise type to Fractal, and under Noise Parameters, change Size from 25 to 1. Then click the Go To Parent button to return to the top-level rollout of the Material Editor.

    6.

    Now select the Quad Patch object in your scene, apply this new Wet Rock 1 material to it, then activate the Camera01 viewport and render the scene (Figure 11.20).

    Figure 11.20. The duplicated Dry Rock.jpg image used in both slots of an RGB Multiply material darkens the overall image.

    The rock face no longer looks completely dry, but the rock surface still needs to look wetter and more saturated.

    7.

    Press the H key to bring up the Select Objects dialog, and select the (inactive) Spot03 spotlight. As your viewports indicate, the Spot03 spotlight is a duplicate of Spot01, which has been moved down slightly along its local Z axis. This produces a "doubled-up" light that greatly enhances the apparent illumination provided by the spotlight on the upper left side of the rock face.

    Now, you may be asking yourself, "Why duplicate the Spot01 light at all? Why not simply increase the existing Spot01 Multiplier from 1.5 to an even higher setting?" The reason you're doing this is so you have greater control over the lighting on both the Diffuse and Specular components of the Quad Patch object, as you'll see in a second.

    8.

    With Spot03 selected, go to the Modify panel and check the Spot03 Light's On box. Then, under the Advanced Effects rollout's Affect Surfaces area, uncheck Diffuse, but leave Specular checked. Now the Spot03 light will affect only the specular highlights of the Quad Patch object; it won't add light to the Diffuse component of the material.

    9.

    Return to the Material Editor and make the following changes to the Wet Rock 1 material. Go to the Diffuse Color map slot and open the RGB Multiply material. Click the Color #2 slot, click the Bitmap button (under Bitmap Parameters), and from the DVD, load the file Wet Rock.jpg.

    The Wet Rock.jpg image is a darker, more saturated version of the original Dry Rock.jpg image. I created this image by loading the "dry" version into Adobe Photoshop and using the Multiply feature to layer it several times on top of itself. I then increased the brightness and contrast of the image to produce the final result.

    10.

    Click the Go To Parent button twice to return to the top level of the Material Editor, activate your Camera01 viewport, and render another test image (Figure 11.21).

    Figure 11.21. The darker Wet Rock.jpg image, when used in the second RGB Multiply slot, creates an even more saturated rock face.


    Now we're starting to get closer to our ideal wet rock surface. The combination of multiple spotlightsincluding Spot03, which affects only the Rock Face's specular componentand the dark, saturated, and very shiny material creates the illusion of a wet, mossy green surface.

    Animating the Water Effect


    Animating the wet rock effect so that the water appears to be flowing down over the rock surface involves building on the mapping effects we've already created. You can do this in a number of different ways.

    One obvious approach would be to apply a particle emitter (or several) to the rock face geometry. By adding a particle system with a high particle count, then applying Object Space Deflectors, Wind Space Warps, Gravity Space Warps, or a combination of these, you could suggest sparkling water droplets bouncing down the surface. However, if you want to produce a more subtle effect, you can still suggest flowing water without using a particle system at all. The trick is to animate the coordinates of the Noise map used in the Wet Rock 1 Glossiness slot.

    To do this, select the Animate Auto Key button and go to the last frame (number 300) of the scene used in the wet rock tutorial. Then return to the Material Editor and open the Glossiness/Noise slot of the Wet Rock 1 material. Under XYZ Coordinates, change the Y Offset value from 0 to 300, turn off the Auto Key button, and drag the Time Slider back to frame 0. As you do, you'll see the specular highlight on the sample sphere in Slot #2 change as the Noise coordinates animate.

    A rendered version of this sequence is available as Wet Rock.avi on the DVD. As the file plays, you'll see that the animated Noise texture, when used in the Glossiness slot, creates the impression that a thin sheet of water is flowing down the surface of the rock.

    Note

    The relevant files are included on the DVD as Wet Rock Example 1.max and Wet Rock Example 2.max.


    • / 193