Using Opacity Mapping for the Fences
 
 
 

The fences are a bit of a special case, because the chain-link parts of them should be partially transparent. You accomplish this the way you did bump mapping: by the use of bitmaps.

Set up the lesson:

Select the fences:

  1. On the main toolbar, open the Named Selection Sets drop-down list, and choose the fence selection set.

    This step is mainly to show you what and where the fences are. There is the main fence around the compound and the smaller fence that encloses the utility containers.

    NoteIncidentally, the main fence includes two gates, left and right. Each gate can move along its own local X axis to open or close the compound.

Use a basic material for the fence supports:

Each fence component, including the gates, actually includes two objects: a “structure” component for the fence’s supportive piping, and a “wire” component for the actual chain link.

  1. In the Material Editor, click the next unused sample slot to make it active, and name the material, FenceSupport.
  2. In the Blinn Basic Parameters rollout, click the Diffuse color swatch to display the Color Selector, and then assign the material a light gray color: Red = Blue = Green = 188.
  3. Click OK to close the Color Selector.
  4. Press H to display the Select From Scene dialog. Highlight the structure objects for all the fences: Fence-Structure, Gate-left-structure, Gate-right-structure, and Fence-sml-Structure. Click OK to select these four objects.
  5. Click Assign Material To Selection.

Use a texture map for the chain link:

The chain link itself uses a bitmap with a chain-link pattern.

Chain-link texture for the fence

  1. In the Material Editor, click the next unused sample slot to make it active, and name the new material FenceChainLink.
  2. In the Shader Basic Parameters rollout, turn on 2-Sided.
  3. In the Blinn Basic Parameters rollout, click the Diffuse map button. In the Browser, double-click Bitmap, and then in the file dialog, assign the bitmap sitework.chainlink.jpg as the diffuse map.
  4. Press H to display the Select From Scene dialog. Highlight the wire objects for all the fences: Fence-Wire, Gate-left-wire, Gate-right-wire, and Fence-sml-Wire. Click OK to select these four objects.
  5. Click Assign Material To Selection and then turn on Show Standard Map In Viewport.

    The fence texture appears in viewports as a gray pattern on a black background. It isn’t yet to scale, so you need to adjust it with UVW Map.

    NoteBecause the mapping isn’t yet right, some fence surfaces might appear gray even if you turned on 2-Sided. The UVW Map adjustments will fix this.
  6. With all four objects still selected, go to the Modify panel and apply a UVW Map modifier.
  7. Change the mapping projection type to Box, and then set Length = Width = Height = 0.5m.

    Now the mapping and the scale of the chain link are correct; but of course, the fences still appear to be solid objects.

Use the chain-link texture to create transparency and opacity:

Just as in bump mapping, where black areas of a map appear recessed and white areas appear prominent (with gray values having an intermediate effect), in opacity mapping, black areas appear transparent and white areas appear opaque (while gray values create some degree of translucency).

Because the chain-link map is already black-and-white, it should work effectively both as a texture and as an opacity map.

  1. In the Material Editor, click Go To Parent if you are not already at the top material level, and then open the Maps rollout.
  2. In the Maps rollout, drag the Diffuse Color map button to the Opacity map button, and then release the mouse.
  3. 3ds Max displays a Copy (Instance) Map dialog. Make sure you choose Instance, and then click OK.

    (Also, leave the Opacity Value set to 100 percent.)

  4. Click to turn on Show Standard Map In Viewport at the main material level.

    Now, in the viewport, the chain-link portions of the fence appear partially transparent.

    Viewport display of fence with opacity mapping

    The one thing missing from this view is transparency in the fence shadows. Depending on your graphics card, viewports might not display opacity mapping just as they don’t display bump mapping. If this is the case, you must render to see the effect of opacity mapping on shadows.

  5. Click Render Production.

    In the rendering, the shadows convincingly match the transparency of the fence.

    Rendering of opacity-mapped fence

Save your work:

Next

Texturing the House: More Mapping Techniques