“Stencil” is a parametric texture.
The Stencil texture procedure is used mainly for label mapping purposes. Label mapping is a two-dimensional texture that is usually applied as a Color map onto a surface and often includes a transparency component to mask certain parts of the two-dimensional texture. An example of label mapping is consumer packaging items such as a shampoo bottle with a label. The labels often hold opaque colors combined with transparent areas. The Stencil texture procedure enables you to easily place the two-dimensional label map and create the necessary transparency mask.
Argument Name | Absolute Range | Useful Range | Default | Description |
image_file | (string) | name of the pix file to be used as a label map | ||
edge_blend | 0, infinity | 0, 1 | 0.0 | Softens the edges of the texture coverage area. This is useful for hiding the texture boundary when the mask is not perfect. |
mask_file | (string) | name of the mask file to be used as a label map | ||
mask_level | -infinity, infinity | -1, 1 | 1.0 | Varies the degree of transparency of the color areas. At a value of 1 (the default), all white areas of the mask are totally transparent and all black areas are totally opaque. As you decrease the value towards 0.00, the black areas become more transparent. By the time you reach 0.00, no image transparency masking occurs. If you decrease the mask_level to -1.00, the mask is inverted, where the black areas become transparent and the white areas are opaque. |
mask_blur | 0, infinity | 0, 0.25 | 0.0 | Affects the edges of the mask. At a value of 0.00, there is no mask blurring. As you increase the blur value, the edges of the mask are blurred to produce soft edge transparency effects. |
key_masking | ON, OFF | OFF | Toggle of color key masking (mask derived from a color). Key masking can be used in combination with a mask file. | |
positive_key | ON, OFF | OFF | When ON, color determines the visible portion of the texture. When OFF, determines the hidden portions. | |
color_key | -infinity, infinity | 0, 255 | 0.0, 0.0, 0.0 | Color center to key to. |
hue_range | 0, infinity | 0, 1 | 0.5 | Spread of hue value from central color key. |
sat_range | 0, infinity | 0, 1 | 0.5 | Spread of saturation value from central color key. |
val_range | 0, infinity | 0, 1 | 0.5 | Spread of brightness value from central color key. |
threshold | 0, infinity | 0, 1 | 0.5 | Determines sharpness of mask boundary. At 0.0, all values within the HSV spread ranges from the color key are fully masked. At 1, the level of the mask falls only at the color key, and drops off to zero at the HSV spread limits. |
urepeat | -infinity, infinity | -10.0, 10.0 | 1.0 | # of copies in u direction within coverage area. |
vrepeat | -infinity, infinity | -10.0, 10.0 | 1.0 | # of copies in v direction within coverage area. |
uoffset | -infinity, infinity | -1.0, 1.0 | 0.0 | U offset repeat within coverage area |
voffset | -infinity, infinity | -1.0, 1.0 | 0.0 | V offset repeat within coverage area |
ucoverage | -infinity, infinity | 0.0, 1.0 | 1.0 | amount of U surface to be textured |
vcoverage | -infinity, infinity | 0.0, 1.0 | 1.0 | amount of V surface to be textured |
utranslate | -infinity, infinity | -1.0, 1.0 | 0.0 | amount of U coverage area to be moved. |
vtranslate | -infinity, infinity | -1.0, 1.0 | 0.0 | amount of V coverage area to be moved. |
uwrap | TRUE FALSE | TRUE | flag to wrap texture around U boundaries of coverage area. | |
vwrap | TRUE FALSE | TRUE | flag to wrap texture around U boundaries of coverage area. | |
worldspace | TRUE FALSE | FALSE | flag to use world space texture mapping | |
rotate | -infinity, infinity | -360.0, 360.0 | 0.0 | angle coverage area to be rotated |
mirror | TRUE FALSE | FALSE | flag to match edges of texture |