计算机房安全管理制度:用Multi-Layer方式研究汽车漆材质

来源:百度文库 编辑:九乡新闻网 时间:2024/05/01 16:04:32

Multi-Layer Materials

Another useful type of material shading in 3ds max 7 is the Multi-Layer material. This material can be used to create shiny materials that have depth, such as lacquered paint surfaces. Although similar to a standard Phong or Blinn shader type, the Multi-Layer material gives you the ability to define multiple specular highlights. The blending between these multiple layers is additive, which produces an extremely glossy appearance.

Creating a Lacquered Surface

Here's how to create a shiny "car lacquer" surface using Multi-Layer materials:

1. From the DVD, load the file Lacquer Paint.max. You'll see a simple sphere sitting in the middle of a room with several spotlights illuminating the scene (Figure 11.22). An omni light provides additional illumination for the walls.

Figure 11.22. The simple test scene used to demonstrate the "car lacquer" example.

[View full size image]

 

 


2. Open the Material Editor and select the first sample slot, or Material #1. You'll alter this material to create the "red car paint." First, change the name to Red Lacquer Paint 1, then click the Shading drop-down and change the default shader type from Blinn to Multi-Layer.

3. Next, go down to the Multi-Layer Basic Parameters rollout, and take a look at the settings. You'll see the standard color swatches for Ambient and Diffuse, but you'll also see a spinner box for Diffuse Level and separate sections for two different Specular Layer sections. You'll also see spinners for Anisotropy, which allows you to create nonuniform specular highlights on the surface of your objects.

4. If you open the Maps section of the rollout, you'll see several new map slots, including Diffuse Level and Diffuse Roughness, and separate maps for Specular Color, Specular Levels 1 and 2, Glossiness 1 and 2, Anisotropy 1 and 2, and Orientation 1 and 2 (which affect anisotropy). Each enables you to adjust the settings for the underlying "base" coat of the material and the overlaying "lacquer" coating.

5. Return to the Multi-Layer Basic Parameters rollout, and make the following changes. If the Ambient and Diffuse Color swatches are locked, unlock them, then change Ambient to RGB (0, 0, 0), pure black. Change Diffuse to RGB (128, 0, 0), dark red. Change Diffuse Level to 40this mixes the primary red Diffuse color with the black Ambient, making it darker and more rich.

6. Change the Specular Layer 1 color to pure white, or RGB (255, 255, 255). Then change the Level value to 150 and the Glossiness value to 75. You'll see a bright, hot specular highlight appear on the sample sphere in Material Slot #1.

7. Next, go down to the Specular Layer 2 section, and change its Color to RGB (255, 0, 0), bright red. Then change the Level value to 75 and the Glossiness value to 35.

8. Select the Sphere01 object in your scene, apply the Red Lacquer Paint 1 material to it, activate your Camera01 viewport, and render a test image (Figure 11.23).

Figure 11.23. The red lacquer paint example.

 


The effect is subtle, but noticeable. What you should see is how the second specular layer spreads out underneath the hot-white specular highlight produced by the Specular Layer 1 settings. The image looks extremely glossyalmost wetand simulates the effect of a lacquer car paint. These types of paint finishes produce multiple specular highlights, with underlying specular highlights that are softer and more diffused; the clear gloss coating on top of the surface then provides a sharper, additive highlight on the surface.

Creating a "Candy Apple" Finish

Let's dress up this effect a little more. What if we add a map to the second Glossiness slot to spread out and further diffuse the softer specular highlight? The effect we're striving for is similar to a "candy apple" or metal-flake car finish, where tiny bits of metal suspended in the paint emulsion generate iridescent sparkles on the underlying layer(s).

To create a candy apple finish, follow these steps:

1. Return to the Material Editor and go down to the Maps rollout. Double-click the Name button for Specular Level 2, and when the Material/Map Browser appears, click Noise.

2. Under Noise Parameters, change Noise Type from Regular to Fractal and then change Size from 25.0 to 0.25you want the overall size to be fairly small. Change the name of this map to Noise Specular 2 (you're going to reuse this map in the next example).

3. Click the Go To Parent button to return to the main Material Editor level, activate your Camera01 viewport again, and render another test image (Figure 11.24).

Figure 11.24. A close-up of the second specular highlight on the sphere, after a Noise map is added to the Specular Level 2 slot. Note the speckled appearance.

 


Refining with Reflections

This Multi-Layer lacquer effect is capable of yet more developmentwe can add appropriate reflections.

The painted sphere is extremely shiny, so it would definitely reflect its surroundings. So let's add a Reflection map. However, instead of simply using a Reflection map alone, we will combine it with a Falloff map to better control the final effect.

1. Go back to the Material Editor, and if necessary, click the Go To Parent button to return to the top map level of the Red Lacquer Paint 1 material. Then click the Reflection map slot. When the Material/Map Browser appears, select our old friend Falloff. Leave the settings at their defaultsfor example, Falloff Type set to Perpendicular/Parallel and Falloff Direction set to the Viewing Direction (Camera Z-Axis.)

2. Click the None button next to the White (Color #2) side spinner swatch, and from the Material/Map Browser, select RGB Tint. When the RGB Tint Parameters rollout appears, click the Green color swatch and set it to pure black, or RGB (0, 0, 0). Do the same for the Blue color swatchyou're going to want the final reflection map to be tinted pure red, the same base color as the overall material.

3. Next, click the Map Name button in the RGB Tint slot, and from the Material/Map Browser, select Reflect/Refract. When it loads, make the following changes. Under Source, select From File. Change Size to 256 and Blur Offset to 0.01.

4. Go down to the bottom of the rollout. Under the Render Cubic Map Files section, click the To File button, and save a file as Red_.jpg. Set Image Quality to the highest setting (100). Click the Save button, and you'll see the initial Cubic Reflection map created as Red_UP.jpg.

5. Now click the Pick Object and Render Maps buttons. Then, either click the Sphere01 model or use the Pick Object dialog to select it from the list. When you do, you'll see a small Rendered Frame window appear as 3ds max 7 renders the 256-by-256-pixel Cubic maps, one right after the other. After a few moments, all the maps will finish rendering, and you'll see the Red Lacquer Paint 1 sample sphere update with the new Reflect/Refract map tree.

6. Activate your Camera01 viewport and render another test image (Figure 11.25).

Figure 11.25. The Red Lacquer Paint 1 material with a tinted Reflect/Refract Cubic environment map.

 


By using the Falloff map to mask the Cubic environment map, you're clamping the reflection more toward the outer edges of the sphere. In addition, the RGB Tint material changes the overall color of the reflection maps to better match the existing red paint color.

7. To further see the effects of the Falloff material on this sphere, return to the Material Editor, and click the Go To Parent button twice to return to the main Falloff level of this Reflection material. Under Falloff Type, change from Perpendicular/Parallel to Fresnel, then rerender the scene. As the rendered image indicates, the Fresnel falloff setting darkens the overall Reflection map and restricts it further to the outer edges of the sphere, based on the viewing angle of the camera.