Panel: Mixer

 

All Functions, that modify a texture, make use of the Mixer. It defines how the current state of the texture and the outcome of the function are combined.

The way the texture and the function result are mixed is determined by the Mixing Mode. The different modes are explained below.

You can specify, which of the four color channels Red, Green, Blue and Alpha will be modified.

The Opacity Value scales between 1% and 100%. It specifies how much of the texture is overdrawn by the function. For example a value of 50% causes half of the old texture to still be visible after the operation.

Additionally you can set another texture as Opacity Map. This can be done by pressing the Select button right to the map's thumbnail or by operating thebutton on a Texture's Form. Use the None button to disable the Opacity Map.

The brightness of the Opacity Map is interpreted as opacity information and is combined (multiplied) with the Opacity Value. A white pixel on the Opacity Map means full opacity, black represents full transparency. The switch Invert reverses that relation.

The opacity value of a pixel on the opacity map is computed by (R+G+B)/3. For example if the Opacity Value was set to 50% and the Opacity Map has a brightness of 80% at the current position, the final opacity value will be 50%*80%=40%.

Target texture and Opacity Map do not need to have the same width and height. If the dimensions differ, the Opacity Map can be used with its own dimensions by activating the Tile switch. This causes the map to be tiled 1:1 on the target texture without distortions. Enabling the Adjust switch scales the Opacity Map to the target texture's dimensions.

Another feature of the Mixer is the Variator Map, which is some kind of paper structure simulation. This image is selected from the set of image files (PNG format only) in the .\variator subdirectory of Texture Maker. The variator map is combined with the Opacity Value, following the same rules like the Opacity Map, but with doubled intensity. This means for example, that a medium gray value allows the opacity to remain unchanged (because doubled medium gray is white) and a white variator pixel doubles it. Enable Random Offset to have the Variator Map displace randomly each time you run a function. Variator Maps are used best with Opacity Values around 50%.


A demonstration of the Opacity Map's effect. 
1
=Target Texture, 2=Function Result, 
3=Opacity Map, 4=Final Result

The Mixing Mode defines the technique that is used to combine the function result with the texture. You have the following set of options:

O = Old Values (Current Texture)

N = New Values (Function Result)

Result

Name

Description

Normal (default)

N is drawn on top of O

Replace All channels of N replace O

Add

N is added to O

Add (Normalized)

N is added to O, the result is scaled down to fit the valid range (0..255)

Add (Wrap)

N is added to O, the result is wrapped if it exceeds the valid range (0..255)

Add Difference

The difference between O and N is added to O

Difference

The difference between O and N replaces O

Equality

The inverted difference between O and N replaces O

Subtract

O is decreased by the inverted values of N

Brightness

The brightness of O is set to the brightness of N

Color

The color hue and saturation of O is set to the color hue of N

Darkest

O is replaced by N, if N is darker than O

Lightest

O is replaced by N, if N is brighter than O

Multiply

O is replaced by O * N

Multiply Double

O is replaced by 2 * O * N

Multiply Bright

O and N are inverted and multiplied. The result is inverted again and replaces O

Variate

O is darkened, if N is darker than an middle gray, but lightened, if N if brighter

Transparency Prim

O is replaced by N with the opacity proportional to the similarity of N to the Primary Color (white in the example here)

Transparency Sec

O is replaced by N with the opacity proportional to the difference of O to the Secondary Color (black in the example to the left)

Console/Script Switches

Name

Range

Description

mix red channel 0/1 modify red channel
mix green channel 0/1 modify green channel
mix blue channel 0/1 modify blue channel
mix alpha channel 0/1 modify alpha channel

opacity

1-100

value of the overall opacity

opacity scale mode

0=tile/1=adjust

scale opacity map

invert opacity map

0/1

invert opacity map

variator map

none

name of the variator map in .\variator subdirectory (without .png)

invert variator map

0/1

use the variator map inverted

variator random shift

0/1

random offset for each operation

function mix mode

solid, add, ...

mixing mode