Титульная страница
ISO 9000 ISO 14000
GMP Consulting
 
Mastering 3D Studio MAX R3

Previous Table of Contents Next


PART IV
Materials and Lighting

CHAPTER 8
Basic Materials

FEATURING

  Understanding CG Shading
  Applying Mapping Coordinates
  Mastering the Material Editor
  Understanding Common Material Types
  Learning Map Types

This chapter will provide examples and guidance in creating materials as well as an overview of the Material Editor and a quick start guide to using it. Materials make your scene come to life; they can make a plain, boring scene into a interesting, lifelike scene. Take video games as an example. Video games are typically very low-polygon-count (“low-poly”) models, meaning there is not a lot of detail in the models. What makes them so believable and interesting are the materials that are placed on the meshes—materials like brick, stone, and wood, just to name a few.

Until now, we have taken for granted the fact that we can see surfaces in shaded viewports and in the final render. You will discover in this chapter that there are almost limitless possibilities for coloring and texturing these surfaces within MAX using materials in the Material Editor. But first we’re going to back up a little and consider what a surface really is in computer graphics (CG), and how MAX interprets the coloring, or shading, of a surface.

Understanding CG Shading

A CG surface is defined by polygons. (Even patch and NURBS surfaces are converted to polygons for viewport and final rendering; thus we have the surface step and tessellation controls to determine how the conversion to polygons should be calculated.) A polygon is defined by its vertices. The order in which the vertices are named determines its surface normal, the vector that determines which side of the polygon is the front. Unless you apply a special material that shades both sides, only the front of the polygon is shaded. Keep in mind, though, that a surface in a wireframe viewport is still a surface. The difference between seeing nothing between the edges of a polygon and seeing what we interpret as a surface comes entirely from how the polygon is shaded. Let’s explore this a little.

Create a sphere and uncheck Smooth in the Parameters rollout. You see an object that looks like the one shown below, faceted rather than smooth. You can see every segment of your sphere.

The oldest type of CG shading, available as “Facets” in the viewport renderer settings, is similar to this, except it lacks highlights. If we turn Smooth back on, our sphere still has the same number of segments, but it now appears smooth. This is because the viewport renderer (when set to Smooth or Smooth+Highlights) calculates the shading to simulate a smooth surface. The sphere is still faceted, but the colors of the corresponding pixels are interpolated between the vertices, blending across the polygon to make it appear rounded and smooth. This was the advancement from faceted shading made by Henri Gouraud.

The next advancement in shading was the specular highlight. Bui-Tuong Phong came up with the idea of interpolating the vertex normal between vertices, so that the value of each pixel could be calculated independently, thus allowing for specular highlights and reflections.

A version of Gouraud shading is still used in the viewport, and Phong shading is still available in the Material Editor. We will look at other shading algorithms (called shaders in MAX), as well as how these are applied by MAX’s materials, later in this chapter.


NOTE What MAX calls a material, some other 3D programs call a “shader.” You can get around the confusion by simply remembering what a material is doing: determining how an object will be shaded. In MAX, a shader is the algorithm employed by the material.

Applying Mapping Coordinates

We don’t always want our polygons to be shaded to look like smooth surfaces of a single color, however. We want to be able tell MAX to superimpose other arrangements of colors onto the shading that makes the polygon look smooth—arrangements of colors that we can define. The next step in shading geometry, therefore, is applying these arrangements, called maps. Maps are projected onto geometry, using mapping coordinates that tell MAX how to assign the map. Primitives are assigned default mapping coordinates. Lofts can be assigned mapping coordinates in their Surface Parameters rollout by checking Apply Mapping.

You can tell whether an object is missing mapping coordinates in two ways: 1) You go to a map level of your material and check the Show End Result button, but still don’t see the map in the viewport. 2) When you render, you get the Missing Map Coordinates warning. If you need to change how mapping is applied, you must use the UVW Map or Unwrap UVW modifiers. The actual application of maps through materials in the Material Editor is covered later in this chapter.


TIP Detailed mapping work is crucial when creating low-poly models. Good mapping can cover for a lot of missing geometry.

Using UVW Map to Change Mapping

If you collapsed your object to an editable mesh without checking Generate Mapping Coordinates in the Parameters rollout beforehand, or if you want to use a different mapping projection, you need to apply the UVW Map modifier. This modifier offers the same options of Planar (same as screen), Spherical, Cylindrical, and Shrinkwrap projection that we will see again later in environment mapping. Box projection applies a copy of the map to each side of a box; Face projection applies a copy of the map to each face of the object. The mapping gizmo can be moved and rotated to change the placement of the map.


NOTE Plug-ins such as Instant UV can give you more projection options.

In addition to controls over the tiling of the map, the modifier gives you up to 99 mapping channels for applying more than one set of mapping coordinates with the same gizmo, as well as various alignment options at the bottom of the Parameters rollout. The X, Y, and Z radio buttons allow you to choose the axis of alignment. Fit moves and scales the gizmo to best fit the object. Bitmap Fit allows you to choose a bitmap file with an aspect ratio you want the mapping gizmo to match (usually the bitmap you will be applying). View Align aligns the gizmo to the active viewport. Center aligns the gizmo to the center of the object. Normal Align allows you to drag over the normal to which you want the mapping aligned. Region Fit allows you to drag out a region of a viewport where you want the gizmo to be fit. Acquire allows you to pick another object with mapping you want the gizmo to match.


TIP Mapping changes made with the UVW Map and Unwrap UVW modifiers can be understood by VRML exports, while changes to tiling and offset in the Material Editor cannot. VRML only supports one mapping channel, however.


Previous Table of Contents Next

© 2000, Frol (selection, edition, publication)

 
Rambler's Top100