Setting Texture Layer Properties

 
 
 

You can set up texture layers and edit their properties from several places:

Typically, the most efficient way to work with texture layers is using a mix of the texture layer editor and the property editors. For example, you can use the texture layer editor to set up and order your layers, and then use individual layers' property editors to refine settings and animate parameters.

Texture Layer Properties: Workflow Overview

Each texture layer has four basic attributes which you can set in any order (although the following order is recommended):

  • The Color input, which is the texture that you're blending with other layers. For information, see Setting Color Input Properties.

  • The Mask input, which allows you to drive the layer's weight using a texture. For information, see Setting Mask Properties.

  • The Mixing options, which control how the layer is blended with the cumulative result of previous layers. For information, see Mixing Texture Layers.

  • The Layer/Port options control the layer's effect on each port that's been added to the layer. Every layer has a set of layer/port controls for each port that it affects. For information, see Setting Layer-Port Properties.

Setting Color Input Properties

A texture layer's Color input connection is the actual texture or shader that you're mixing with previous layers. If a layer's Color port is not connected to a texture, the layer uses a color value that you can adjust in its property editor.

Tip

In addition to using a single texture or shader to control a layer's Color input, you can use an entire network of shaders, allowing you to use complex texture effects in individual layers. This is best accomplished in the render tree.

For more information, see Working with Texture Layers in the Render Tree.

Each layer has a set of controls for setting and modifying its Color input.

  • In the texture layer editor and material panel, these controls are in the Color thumbnail's contextual (right-click) menu.

    Color thumbnail: Right-click to add or replace a texture to the layer's Color input and/or set Input Color options.

  • In texture layer property editors, the Input Color options are at the top, directly beneath the Mute and Solo options.

These controls allow you to select a texture or shader to connect to the layer's Color input, and set various options relating to the Color input's alpha channel.

Setting a Texture Layer's Color Input

Any new texture layer that you add to a shader or material has a Color input — be it the default color value or an actual texture. You can also modify or change the Color input, as described in the following procedure.

To modify/change a layer's color input

  1. Do one of the following:

    • In the texture layer editor, click the Color thumbnail's arrow icon (or right-click the thumbnail).

      or

    • Open the layer's property editor and click the Input Color parameter's connection icon.

  2. From the menu, choose one of the following:

    Texture

    Effect

    Disconnect

    Disconnects the currently connected shader from the layer's Color port.

    Insert

    Opens a sub-menu of valid conversion shaders. Selecting a shader from the sub-menu inserts it between the layer's Color input and the previously connected shader.

    For more information about conversion shaders, see Methods for Editing Shaders.

    Image

    Connects an Image shader to the layer's Color port. The shader uses the default image clip, but you can edit the shader's properties to choose a different image.

    Clips

    Opens a sub-menu that lists all of the scene's image clips. You can select any clip from the list.

    The clip is connected to the layer's Color port using an Image shader.

    Sources

    Opens a sub-menu that lists all of the scene's image sources. You can select any source from the list.

    A new image clip is created from the source and connected to the layer's Color port using an Image shader.

    Various Shaders

    A specific group of shaders appears, depending on the parameters affected by the layer.

    More...

    Opens a browser so you can select any shader from the shader library. The selected shader is connected to the layer's Color port.

    Note: Once you select a shader from the browser, it appears in a list of most recently used shaders under the More... option.

    The selected texture is connected to the layer's Color port.

Setting Color Input Options

You can set several options that allow you to control the Color input's alpha channel.

To set a layer's color input options

  1. Do one of the following:

    • In the texture layer editor, click the Color thumbnail's arrow icon (or right-click the thumbnail).

      or

    • Open the layer's property editor.

  2. From the Color input's menu or the Input Color options in layer property editor, set the following options as necessary.

    • Invert Alpha inverts the color input's alpha channel.

    • Use Alpha uses the color input's alpha channel as its color, creating a grayscale texture.

      Typically, the Invert Alpha and Use Alpha options are used together to control ports that work best with grayscale values, like transparency or reflectivity.

    • Ignore Alpha blends the Color input without using its alpha channel. This deactivates the Invert Alpha and Use Alpha options.

    • Premultiplied plied multiplies the color input's pixels by their corresponding alpha values.

Setting Mask Properties

A texture layer's mask is a grayscale texture used to modulate the layer's weight. The darker the mask, the lower the weight, and vice-versa. When the layer is blended with previous layers, the mask is multiplied by the weight value to produce the layer's final weight. In practice, this allows you to control where a layer is blended with previous layers, using a texture.

Tip

In addition to using a single texture or shader to control a layer's Mask input, you can use an entire network of shaders, allowing you to create complex Mask effects for your layers. This is best accomplished in the render tree.

For more information, see Working with Texture Layers in the Render Tree.

   

In this example, a texture layer was added to blend some green slime over the mug's surface. A mask was used to control where the slime appears.

Here, you can see the mug with only the first texture layer (the label) applied.

   

Adding the second layer without a mask applies the slime texture over the entire object and obscures the label. This is not what you want.

Using a mask confines the blend to the area defined by the mask's texture, creating the unappetizing drips.

TipWhen you're mixing layers using the Over mixing mode (see Choosing a Mixing Mode), you can use the mask to create cutouts for Color inputs that have no alpha channels. This is the case in the previous example.

You can use a separate texture/shader preset as a layer's mask, or you can use one of several other Mask Modes to create the mask based on the Color input's attributes. By default, texture layers do not have masks. In other words, their Mask Mode is set to No Mask (and their thumbnails are marked with an X). Each layer has its own controls for setting the mode and other mask properties.

  • In the texture layer editor, these controls are in the Mask thumbnail's menu (click the arrow icon or right-click the thumbnail to open the menu).

    Mask thumbnail: right-click to add a texture to the layer's mask input and/or set Mask Mode options.

  • In texture layer property editors, the Mask options are directly beneath the Input Color options.

The following sections describe the various mask modes and how to use them.

Using a Texture/Shader Preset as a Mask

The most common way to set a layer's mask is to use a separate texture image or shader preset. When you connect a grayscale texture to a layer's Mask input, it is used "as-is." When you connect a color (RGB or RGBA) texture, it is converted to grayscale, based on its intensity, and then used as the mask.

TipIf you set a layer's Mask Mode to Use Mask Connection before connecting a texture or shader preset, the mask is controlled by a simple scalar value that you can adjust from the layer's property editor.

To set a texture layer's mask

  1. Do one of the following:

    • In the texture layer editor, click the Mask thumbnail's arrow icon (or right-click the thumbnail).

      or

    • Open the layer's property editor and click the Mask parameter's connection icon.

  2. From the menu, choose one of the following:

    Texture

    Effect

    Image

    Connects an Image shader to the layer's Mask port. The shader uses the default image clip, but you can edit the shader's properties to choose a different image.

    Clips

    Opens a sub-menu that lists all of the scene's image clips. You can select any clip from the list.

    The clip is connected to the layer's Mask port using an Image shader.

    Sources

    Opens a sub-menu that lists all of the scene's image sources. You can select any source from the list.

    A new image clip is created from the source and connected to the layer's Mask port using an Image shader.

    Various Shaders

    A specific group of shaders appears, depending on the parameters affected by the layer. Choosing a shader replaces the shader connected to the layer's Mask port.

    More...

    Opens a browser so you can select any shader from the shader library. The selected shader is connected to the layer's Mask port.

    If a shader is already connected to the port, it is disconnected and replaced with the new shader.

    Note: Once you select a shader from the browser, it appears in a list of most recently used shaders under the More... option.

    The selected texture is connected to the layer's Mask port and the layer's Mask Mode is automatically set to Use Mask Connection.

To choose a mask texture in other ways

You can do any one of the following to choose a texture/shader preset to use as a layer's mask:

  • Drag and drop an texture image or shader preset from a browser or toolbar onto a layer's mask thumbnail in the texture layer editor.

    or

  • In the texture layer editor, drag and drop any layer's Color or Mask thumbnail onto any other layer's mask thumbnail.

    or

  • In the render tree, connect a shader to a layer's Mask port.

Creating a Mask from the Color Input's Alpha Channel

One way of creating a mask for a layer is to create a grayscale texture based on the alpha channel of the layer's Color input and use that as a mask.

Original texture

Mask created from alpha

TipYou can have a layer's Color input set to Ignore Alpha or Use Alpha and still use its alpha channel as a mask. For more information, see Setting Color Input Options.

To create a mask from the color input's alpha channel

  • Do one of the following:

    • In the texture layer editor, click the Mask thumbnail's arrow icon (or right-click the thumbnail) and choose Use Layer Input Alpha as Mask from the menu.

      or

    • Open the layer's property editor and choose Use alpha of input from the Mask mode list.

Creating a Mask from the Color Input's Intensity

Another way of creating a mask for a layer is to create a grayscale texture based on the intensity of the layer's Color input and use that as a mask.

Original texture

Mask created from luminance

To create a mask from the color input's intensity

  • Do one of the following:

    • In the texture layer editor, click the Mask thumbnail's arrow icon (or right-click the thumbnail) and choose Use Intensity of Layer Input as Mask from the menu.

      or

    • Open the layer's property editor and choose Use intensity of input from the Mask mode list.

Creating a Mask from the Color Input's Threshold

Creating a mask from the Color input's threshold compares the intensity of the Color input's pixels to a specified threshold value. Where the Color input's intensity falls below the threshold, the mask is completely black; where the intensity exceeds the threshold value the mask is completely white. This is a quick and dirty way of creating a rough matte from the Color input.

   

In this example, the skull & crossbones texture was added as a decal over a label texture. The skull & crossbones texture has no alpha channel, so a mask was created using the threshold. You can see the results in the images below.

No Mask

With no mask, the foreground layer, which has no alpha channel, completely blocks the background layer.

   

Threshold = 0

Using the foreground layer's threshold as a mask creates the beginnings of a cutout.

Threshold = 0.6

Raising the threshold value cleans up the edges, creating a passable decal of the foreground layer.

To create a mask using the threshold

  1. Do one of the following:

    • In the texture layer editor, click the Mask thumbnail's arrow icon (or right-click the thumbnail) and choose Use Threshold of Layer Input as Mask from the menu.

      or

    • Open the layer's property editor and choose Use input threshold from the Mask mode list.

  2. Open the layer's property editor and adjust the Threshold value until you're satisfied with the resulting mask.

Inverting the Mask

You can invert a layer's mask, regardless of the layer's Mask Mode setting.

To invert a layer's mask

  • Do one of the following:

    • In the texture layer editor, click the Mask thumbnail's arrow icon (or right-click the thumbnail) and choose Invert from the menu.

      or

    • Open the layer's property editor and select the Invert option in the Mask area.

Mixing Texture Layers

Texture layers are mixed together sequentially from the texture layer closest to the base layers to the texture layer farthest from them. The first texture layer in the list or stack is mixed with the base layers, the second texture layer is mixed with that result, and so on.

To control how a layer is mixed with previous layers, you adjust its weight and specify a mixing mode. The weight value controls the strength of the layer's effect, while the mixing modes perform specific mathematical operations on the foreground and/or background layers to mix them together in different ways. Each layer has its own controls for these settings.

  • In the texture layer editor, controls for these settings appear in each texture layer, next to the Mask thumbnail.

    Layer Weight slider (A) and Mixing mode list (B)

  • In texture layer property editors, the mixing controls are directly beneath the Mask options.

Setting a Layer's Weight

A texture layer's weight controls the degree to which the layer affects the previous layers. The higher the weight value, the more prominent the layer's effect in the blended result. The weight value is multiplied with the layer's mask to produce the final weight.

In this example, a red-to-transparent gradient was blended over the base layers that make up the skin texture, creating a blush/radiation effect.

As the Weight is increased, the gradient's effect becomes more prominent. Notice how the mask, used to give a slightly mottled look, affects the gradient's weight.

Weight = 0

Weight = 0.25

Weight = 0.5

Weight = 0.75

TipA good way to think of weight is as the extent to which the layer's effect is performed on the previous layers. A Weight value of 0 is equivalent to not performing the effect, while a value of 1 performs the effect fully.
NoteYou can also adjust a layer's weight for each of its ports using the Layer/Port scaling sliders. Each port's local scale value is multiplied with the layer's overall weight value. For more information, see Setting Layer-Port Properties.

Choosing a Mixing Mode

Mixing modes are mathematical operations that are performed on the foreground and/or background when a layer is blended with previous layers. For example, the Plus mixing mode adds the pixel values of the foreground and background together, which typically produces a result brighter than either layer.

To set a texture layer's mixing mode

Choose a mode from the layer's Mixing Mode list in the texture layer editor or open the layer's property editor and choose the mode from the Mode list.

For each texture layer, you can choose one of the following modes:

Mixing Mode

Effect

Formula

Over

Interpolates the previous layer's color with the new layer's color, weighted by the alpha of the new layer. Higher alpha values make the new layer's color more prominent and vice-versa. Thus areas where the new layer's alpha value is 0 shows only the previous layer's color, while areas where its value is 1 shows only the new layer's color.

This is the mode to use when you want to apply a layer as a decal.

C + B*(1-C.a)

In

Cuts the previous layer in the shape of the new layer's alpha channel.

C*B.a

Out

The opposite of In. Cuts the shape of the new layer out of the previous layer's alpha channel.

C*(1-B.a)

Plus

Adds the previous layer's pixel values to the new layers' pixel values. The result is not clipped at 1 (100%).

C + B

Bounded Plus

Performs a similar calculation to the Plus mode, but all values are clipped at 1 (100%).

Same as plus but every component is clamped between 0 and 1.

Hide/Reveal (Multiply)

Multiplies the previous layer's color by the new layer's color.

C * B

Hide/Reveal Bounded (Multiply)

Performs a similar calculation to the Hide/Reveal (multiply), except that all values are clipped at 1 (100%).

Same as multiply but every component is clamped between 0 and 1.

Difference

Looks at the information in each color channel and subtracts either the previous layer's color from the new layer, or vice-versa, depending on which layer's color is brighter.

{ abs(C.r-B.r), abs(C.g-B.g), abs(C.b-B.b), abs(C.a-B.a) }

Darken

Sets the darkest color (between the previous layer and the new layer) as the result color. Pixels lighter than the new layer's color are replaced. Pixels darker than the new layer's color are not replaced.

{ min(C.r,B.r), min(C.g,B.g), min(C.b,B.b), min(C.a,B.a) }

Lighten

Sets the brightest color (between the previous and new layer) as the result color. Pixels lighter than the new layer's color do not change. Pixels darker than the new layer's color are replaced.

{ max(C.r,B.r), max(C.g,B.g), max(C.b,B.b), max(C.a,B.a) }

Hard Light

Causes the previous layer's bright pixels to brighten the new layer's bright pixels. Also, the previous layer's dark pixels dim the new layer's darkest pixels. Visually, each layer is pushing the other layer's extreme pixel values; that is, the darks become darker and the light parts become brighter.

{ HL( C.r, B.r ), HL( C.g, B.g ), HL( C.b, B.b ), HL( C.a, B.a ) }

Where HL( c, b ) =

if ( c < 0.5 ) 2 * c * b

else 1-2*(1-c)*(1-b);

Soft Light

Mixes the previous and new layers, then reveals the resulting color with the brightest pixels of the new layer.

{ SL( C.r, B.r ), SL( C.g, B.g ), SL( C.b, B.b ), SL( C.a, B.a ) }

Where SL( c, b ) = HL( c, b*0.5+0.25)

Note: see Hard Light, above, for a definition of HL.

Screen

Multiplies each color channel's values with the inverse of the new layer's color and the previous layer's color. This results in a lighter color as though the original color has been faded.

C + B - C*B

Overlay

Lightens or darkens the foreground layer depending on the background layer.

If the background is dark (<0.5), it scales down the foreground color with the background's relative darkness by interpolating between the front color and black.

If the background is light, it scales up the foreground color with the background's relative lightness by interpolating between the front color and white.

This allows you to preserve the background layer's shadows or highlights while overlaying the foreground layer.

{ OL( C.r, B.r ), OL( C.g, B.g ), OL( C.b, B.b ), OL( C.a, B.a ) }

Where OL( c, b ) = HL( b, c )

Note: see Hard Light, above, for a definition of HL.

Blend

Makes the brighter sections of the new layer gradually (and proportionally) screen out the darker sections of the previous layer. This mode compensates the previous layer prior to adding, so the resulting color never exceeds 1 (100%).

C + B*({1,1,1,1}-C)

Setting Layer-Port Properties

Each port added to a given texture layer has a set of controls for fine-tuning the layer's effect on the port.

  • In the texture layer editor, these controls appear in each cell where a layer has been added to a port.

    A

    Layer port scaling

    B

    Use alpha as color

    C

    Invert color

  • In texture layer property editors, an extra property editor is appended to the main layer property editor for each port that you add to the layer.

    A

    Affected port

    B

    Layer port scaling

    C

    Mute

    D

    Use alpha as color

    E

    Invert color

In either case, these controls only appear when a port has been added to a layer. The following sections describe the layer/port options and how to use them.

For more information about adding ports to texture layers, see Adding Ports to Texture Layers in the Render Tree and/or Adding and Removing Ports from Texture Layers.

Using a Layer's Alpha Channel as the Color for a Port

You can use a layer's alpha channel as the color for specific ports. Typically, this option is used for ports that work best with grayscale values, like transparency and reflectivity. In such cases, you may also have to invert the layer's color for the port, as described in the next section, Inverting a Layer's Color for a Port.

A

The alpha channel of the layer's Color input is inverted (see the following section) and used as the color for the shader's Transparency port.

B

This creates a cut-out in the shape of the sign from the grid to which the shader is applied.

NoteIf you are using the layer's alpha as the color for the port and also inverting the color, the invert operation is performed last so as to affect the grayscale texture generated from the alpha.

To use a layer's alpha channel as the color for a port

  • Do one of the following:

    • In the texture layer editor, click the Use alpha as color (A) icon in the port's cell.

      or

    • In the layer's property editor, locate the port's layer/port page and set the Color Source option to Layer Input Alpha as grayscale.

Inverting a Layer's Color for a Port

You can invert a layer's color for any port affected by the layer. This is most useful when you are using a matte or grayscale texture (or the layer's alpha channel) to control parameters like transparency and reflectivity.

A good example is using a layer's alpha channel to affect a surface shader's transparency. Because transparency works best with a grayscale image, you'll likely want to use the color input's alpha channel instead of its RGB channels. The problem is that the surface shader interprets the black areas of the alpha channel as opaque and the white areas as transparent — exactly the opposite of what you want. Inverting the layer's color (which has been set to use the alpha channel) for the port solves this problem.

NoteIf you are using the layer's alpha as the color for the port and also inverting the color, the invert operation is performed last so as to affect the grayscale texture generated from the alpha.

To invert a layer's color for a port

  • Do one of the following:

    • In the texture layer editor, click the Invert color icon (I) in the port's cell.

      or

    • In the layer's property editor, locate the port's layer/port page and activate the Invert option.

Scaling a Layer's Effect on the Port

Both the texture layer editor's layer/port cells and the layer/port pages of layer property editors have Scale sliders. Adjusting this slider's value scales the effect of the layer on the port. Each port's local scale value is multiplied with the layer's overall weight value (see Setting a Layer's Weight), producing the layer's final effect on the port.

Layer port scaling sliders (A)

You can adjust the layer's scale on several ports at once by selecting the desired cells, and dragging one cell's scale slider. All of the selected cells are set to the same scale value.

TipWhile the cells are selected, you can adjust an unselected cell's scale value without losing the selection. This allows you to balance the effect's scale on a single port with it's scale on several other ports.

Muting the Layer's Effect on the Port

Muting a layer's effect on a port causes the layer to have no effect on that port. You can do this from any layer/port property editor.

To mute a layer's effect on a port

  1. Open the property editor for the layer whose effect on ports you wish to mute.

  2. In the layer property editor, activate the Mute option on the layer/port page of each port on which you want to mute the layer's effect.

Muting and Soloing Texture Layers

Each texture layer contains controls that allow you to mute and solo it. Muting a layer causes the layer to have no effect, while soloing a layer makes that layer the only one used.

NoteSoloing always has precedence over muting. When one layer is soloed, all layers' mute commands are ignored.
  • In the texture layer editor, you can mute or solo a layer by clicking the corresponding icon in the layer's header, as shown in the following image.

    A

    Click to mute the layer.

    B

    Click to solo the layer.

    The icon changes color to indicate that the layer is muted or soloed. Clicking the icon a second time unmutes or unsolos the layer.

  • In texture layer property editors, you can simply toggle the Mute and Solo options to mute and solo the layer.

Muting and Soloing Multiple Texture Layers

In the texture layer editor, you can also mute and/or solo several layers at once. This is useful when you only want to see the effect of a given group of layers — all of those affecting a shader's Transparency port, for example. You could either mute all of the texture layers that have no effect on the Transparency port or solo all of the layers that do.

To mute or solo several layers at once

  1. In the texture layer editor, select one or more texture layers.

  2. Right-click one of the selected layers and choose Mute or Solo from the menu, or press m to mute or s to solo the selected layers.

Locking Texture Layers

Locking a layer prevents further modifications to the layer by locking all of its parameters. You can only lock layers from the texture layer editor, where clicking a layer's lock icon locks the layer.

A

Click to lock the layer.

If you open the layer's property editor, you'll notice that all of the layer's parameters are marked with a lock icon.

For more information about locking parameters, see Unlocking Scene Elements.

Renaming Texture Layers

You can rename any layer from the texture layer editor or from its property editor.

To rename a layer

  • In the texture layer editor, right-click the selected layer and choose Rename from the menu or press F2. Then enter the new name and press Enter.

  • In the layer's property editor, enter a new name in the Name text box.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License