Go to:
Related nodes. Attributes.
The Stencil texture lets you take any image input (from
a shading network, or a file texture node, say) and map it
onto an object. It also lets you mask the input image to control
how it covers a surface. Use the Stencil texture to overlay
different textures (and control what parts of the texture are
visible), or for label mapping.
Normally, Stencil nodes are created automatically by the system
when you put a 2d texture map on a node, and specify that it
should be a 2d Stencil. The Out Color attribute of the Stencil
is connected to the attribute being mapped. The Stencil itself
is driven by the new texture map and its placement node.
Specifically, the texture's Out Color is connected to the Stencil's
Image attribute, and the Placement node drives the Stencil's
UV Coord and uv Filter Size attributes. This is all done for you.
Note: The region being stenciled-out will take on the
default color of the stencil, not the shader's color.
In the table below, important attributes have their names
listed in bold in the description column.
Node name | Parents | Classification | MFn type | Compatible function sets |
---|
stencil | texture2d | utility/general:drawdb/shader/texture/2d/stencil | kStencil | kBase kNamedObject kDependencyNode kTexture2d kStencil |
Related nodes
layeredTexture, envCube, envSphere, envSky, envBall, envChrome, bump3d, uvChooser, bump2d, texture2d, ramp, file, cloth, water, checker, fractal, bulge, grid, mountain, texture3d, projection, cloud, granite, crater, leather, stucco, brownian, solidFractal, marble, wood, rock, snow, defaultTextureList, place2dTexture, place3dTexture
Attributes (16)
colorKey, colorKeyB, colorKeyG, colorKeyR, edgeBlend, hueRange, image, imageB, imageG, imageR, keyMasking, mask, positiveKey, saturationRange, threshold, valueRange
Long name (short name) | Type | Default | Flags |
---|
|
colorKey
(ck )
| float3 | 0.0, 0.0, 0.0 | |
|
|
|
|
|
edgeBlend
(eb )
| float | 0.0 | |
|
|
hueRange
(hr )
| float | 0.5 | |
|
|
image
(im )
| float3 | 0.0, 0.0, 0.0 | |
|
|
|
|
|
keyMasking
(km )
| bool | false | |
|
|
mask
(m )
| float | 0.0 | |
|
|
positiveKey
(pk )
| bool | false | |
|
|
saturationRange
(sr )
| float | 0.5 | |
|
|
threshold
(th )
| float | 0.5 | |
|
|
valueRange
(vr )
| float | 0.5 | |
|