Label mapping using Surface textures

A label is typically an image file representing a 2D surface texture that is mapped to a specific region on a surface.

Label mapping often requires the use of a transparency mask to mask out any unwanted regions of the image file. The Stencil is used to facilitate such masking and is used in this example.

The following shows a label represented by the image file.

The white background of the label must be masked out so that only the lettering will show in the final rendered image.

Creating the Basic Shader

  1. Select Edit New Shader from the Multi-lister to create a new shader.

  2. Double-click the shader icon to display the shader's editor.

  3. Choose an appropriate Shading Model and set any other shading parameters required to properly represent your underlying surface. This includes selecting an appropriate shader color. To do so, click the arrow to the right of the Color heading to display the Color Editor.

  4. Select Shader Assign Shader to assign the shader to the active surface. You are now ready to apply the texture parameter to the color parameter of the shader.

Applying the Stencil Texture

  1. Click the Map... button to the right of the Color slider to display the Texture Procedures window.

  2. Click the Stencil texture icon.

  3. When you select the Stencil texture, the Texture Procedures window automatically closes, a texture icon is displayed in the Multi-Lister, and the Stencil editor is displayed. See the following. Tips:

Specifying an Image File

The Stencil editor is the interface you use to specify the image file to be used as the texture map, manipulating and placing the texture, and creating any necessary mask images.

Initially the Stencil texture is black. The color of the Stencil texture is determined by the Image field in the Stencil editor. For this example, the label you want to use is a file texture for the color.

To select the File texture:

  1. Click the Map... button next to the Image field to re-display the Texture Procedures window.

  2. Click to select the File texture and display the File Texture Parameters.

If you know the name of the image file you want to use as the texture map, you can type the filename into the Image field in the File editor and press Enter.

If you are unsure of the exact filename, click the Browse button. The File Requestor is displayed.

Click the Show List button in the File Requestor to display the contents of the Pix directory of your current working project. When you have selected the appropriate image file, click the Use Pix button to load the image.

Once the image file has been loaded, the file appears in the File icon and is mapped onto the active shader in the Multi-lister, and the file name appears in the Image field in the editor.

  • In the Multi-lister, double-click the Stencil texture icon, or click the arrow located in the upper left corner of the File editor to re-display the Stencil texture parameters. An arrow is displayed to the right of the Image Map... button indicating that you have mapped this parameter (clicking this arrow returns you to the File texture).

    Note: By default, the texture map completely covers the shader, hiding the basic shader color beneath it. With most textures, you can selectively map the texture anywhere on the shader.

    Positioning the Label

    In some texture mapping situations you may want the texture map to completely cover the surface to which the shader is assigned. However, you are most likely to map (position) a label to a specific location on the surface.

    Two sets of mapping parameters are used to control the mapping of the texture:





    aliasdocs@aw.sgi.com
    Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.