mib_color_spread

 
 
 

Category: mental ray > Texture

Shader Family: Texture

Output: Color

This shader fans out one color input to up to 8 color outputs (the exact number is determined by the num parameter). Each output is equal to the corresponding input, multiplied by a weight, with a given conversion.

The equations are:

Mode

Operation

Calculation

0

Weighted Color

R = w . A

1

Grayscale Color from Alpha

Rrgba = w . Aa

2

Grayscale Color from Average Intensity

Rrgba = w . (Ar + Ag + Ab) / 3

3

Grayscale Color from Weighted Intensity

Rrgba = w . (0.299 . Ar + 0.587 . Ag + 0.114 . Ab)

4

Grayscale Color from Red Component

Rrgba = w . Ar

Where:

R is the current (one of up to eight) result

w is the current weight

mode is the current conversion

A is the input color shared by all outputs

Mode 4 is intended for converting a scalar to a grayscale color.

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

input

The color input.

num

The number of valid inputs to compute. The minimum is 1 and the maximum is 8.

mode_*

The modes as described in the table above.

weight_*

The weights w as described in the table above.

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