3ds Max 2012 Bible - Kelly L. Murdock [339]
Figure 30.5 shows a house that uses several of these architectural materials. Notice how the shingles on the roof are consistent.
FIGURE 30.5
Architectural materials make adding textures to a building easy.
Using the DirectX and MetaSL Shader Material
The Material Editor includes support for DirectX 9 and 10 shaders using the DirectX Shader material. These shaders are saved as .fx files and are available only if the Direct3D display driver is enabled. FX files are text files created using the Higher-Level Shader Language (HLSL). The DirectX Shader also can load in NVidia CgFX files and mental image's MetaSL shaders, saved with the .XMSL extension.
Note
The DirectX Shader material is available only if you are using the DirectX display driver. •
In the maps/fx directory where Max is installed are several example DirectX shaders. You can load these example shaders using the button in the DirectX Shader rollout. The available parameters are different for each shader. Figure 30.6 shows several rifles with various FX shaders applied.
FIGURE 30.6
The Direct X Shader material lets you view game assets in the viewport.
FX shaders are commonly used in games, and applying an FX shader to an object displays the shader in the viewport. This display looks the same as if the object were rendered in the game engine. However, if you render an object with an FX shader applied, it will appear as default gray unless you specify a material to appear using the Software Render Style rollout.
If the Quicksilver Hardware or mental ray renderers are enabled, you can also make MetaSL shader tree materials visible in the viewports. The Material/Map Browser includes several MetaSL shaders in the Maps/MetaSL rollout. Because these shaders are represented as maps in the Material Editor, you need to use the Map to Material Conversion material node to make the shaders visible in the viewports. You also need to enable hardware shading to view these shaders in the viewport. MetaSL materials also can be exported using the Material⇒Export As XMSL File menu command in the Slate Material Editor.
Note
MetaSL shaders can be created using mental mill, Artist Edition, which is available for download on the Autodesk site. •
Using mental ray Materials and Shaders
If the mental ray, iray, or the Quicksilver Hardware renderer is enabled, you can open the Material/Map Browser in the Material Editor and be greeted with many additional material and map types and also the Autodesk Material Library, which includes hundreds of preset materials organized by category, as shown in Figure 30.7. The mental ray rendered can be enabled in the Assign Renderer rollout located at the bottom of the Common panel of the Render Scene dialog box.
Note
If you enable the Show Incompatible option in the Material/Map Browser pop-up menu, then you can view the list of mental ray materials even if the mental ray renderer isn't enabled. •
Cross-Reference
You can learn more about enabling the mental ray renderer in Chapter 47, “Rendering with mental ray and iray.” •
FIGURE 30.7
The Material/Map Browser includes many additional mental ray materials from the Autodesk Material Library.
Understanding shaders
A shader is an algorithm that defines the surface color for all pixels in the scene. Surface Shaders come to this conclusion by factoring in such details as texture files, reflection, refraction, and atmospheric effects. Atmospheric Shaders change the light properties as they move through a volume. Shaders can be programmed and applied to objects and scenes, and renderers like mental ray render the scene based on these shaders.
Accessing mental ray materials and shaders
With the mental ray (or Quicksilver) renderer selected, all non–mental ray materials include an additional rollout labeled mental ray Connection. This rollout, shown in Figure 30.8, is available only if the mental ray extensions are enabled in the mental ray panel of the Preference Settings dialog box. They let