Sprite
 
 
 

| Sprite | Render Tree Usage

Category: Processing > Raytracing

Shader Family: Surface Material

Output: Color

This shader is designed to render a sprite or billboard on a grid. Transparency is infinite, because the shader ignores the Ray Depth settings in the render options. This means that you can have thousands of sprites at different depths and see all of them correctly without having to set extraordinarily high Ray Depth values.

Name

The shader's name. Enter any name you like, or leave the default.

Sprite

Color Input

Defines the color input that shades the sprite's surface and the alpha value that defines its transparency. You can set a color using the sliders, but this parameter is typically connected to a texture image.

Stencil

Mode

Specifies how transparency is created and used for the sprite:

Alpha: uses the color input's alpha as the transparency channel.

Intensity: uses RGB intensity as transparency.

Maximum: uses the maximum RGB as the transparency. This works best when the image is on a white background.

Minimum: uses the minimum RGB as the transparency. This works best when the image is on a black background.

Average: use Average of RGB as the transparency.

Invert

Inverts the computed/extracted alpha value.

Threshold Depth

Allows you to alter the depth pixel data based on the alpha channel, so the depth (Zpic) channel will have the outline of the alpha channel. The threshold value determines what values are inside the cutout alpha or outside of it. The default value is 0.9, so values above 0.9 are considered to be outside the cutout, and will take on the depth of the object behind the sprite.

Matte

Input

A color input used to accept an external alpha channel to use as a matte for the sprite.

Enable

Enables an external matte and ignores the alpha value set in the color input.

Render Tree Usage

Connect this shader to the material node's surface input to create a flat, transparent sprite object. You can connect texture images to both the color and matte inputs to define the sprite's shading and transparency.