Inputs

Shader Input

Shader

Connect the material used for shading and rendering that you want cut out, a Standard Material for example.

Shader: Purple Standard Material Blue Standard Material with bump Red transmissive Standard Material Leaf setup with Standard Material

Stencil

Stencil Shader

Connecting a shader to this input forces the sprite node to automatically bake down the incoming connection for use as the stencil cutout. This allows you to use procedural shading networks instead of an external texture.

The Stencil Shader requires UVs. When a shader is connected to the Stencil Shader input, loading an external texture is disabled and the Opacity Threshold only works with color value, not a dedicated alpha channel.

Stencil Shader: Spiral Tiles shader
Opacity Threshold: 0.5
Leaf opacity texture Circular ramp Linear ramp

Stencil Size[2..16384]

Sets the resolution for the baked texture when using the Stencil Shader input.

Stencil textures used by the Sprite node cannot go out-of-core. Using very high stencil resolutions may cause instability.

If too many high-resolution stencil textures are used in a scene Redshift may run out of GPU memory. A 1024x1024 sprite node texture uses 1MB of memory, a 4K texture occupies 16MB of memory and so on.

AMD GPUs have a maximum sprite texture resolution of 16k x 16k. Nvidia GPUs have a maximum sprite texture resolution of 65k x 65k.

Stencil Size: 2 - 64 512 2 - 64 512

Path

Load an external texture for use as the stencil cutout here.

Stencil textures used by the Sprite node cannot go out-of-core.


Color Space

Use this option if you want to have the loaded texture manually interpreted in a different color space before it is converted to the render space.

UV Channel

Controls which UV set is used for the stencil texture.


Opacity Calculation

Controls how the transparency value is derived in one of two ways:

  • From Color Intensity ( uses the RGB channel color information) - Compatible with baked texture and external texture
  • From Alpha ( uses the alpha channel information) - Only compatible with external texture


Stencil Opacity Threshold[0.00..1.00]

Controls at which point the shader is rendered transparent vs opaque based on the value found in the stencil texture. When the value from the stencil texture is greater than the Opacity Threshold, the material is rendered as normal. When the value is less than or equal to the Threshold, the material is cut out as if completely transparent.

In the examples below the Opacity Threshold is animated from 0 to 1. Lower values only cut out the darker parts of the stencil texture while higher values cut out more. The spiral texture has a black background (0) and three different greyscale lines, one has a value 0.33, the next a value of 0.66, and the last a value of 1. The circular and linear ramps demonstrate a greyscale gradient from 0 to 1. Note how the plane is cutout as the Opacity Threshold is raised above the different brightness levels found in the stencil texture. On textures like the circular and linear ramps the cutoff point smoothly transitions between each value because of the smooth gradient, where as the different sections of the spiral cut out as soon as the Threshold matches the value in each section.

Opacity Threshold: 0 - 1
Stencil Shader: Spiral Texture
0 - 1
Circular Ramp
0 - 1
Linear Ramp


Texture Repeats[XYZ ]

This option allows you to repeat the stencil texture without having to repeat the UV coordinates.

Texture Repeats: 1 - 1 2 - 2 5 - 2


Custom Gamma[-∞..+∞]

Sets a custom gamma value for the stencil texture.