PxrVary

PxrVary

This node creates controlled random variations. The variation source can be attribute- or primvar-based. Primvars should have a constant detail (a single value per object). Only non-zero id/primvar/attribute values will create a variation. If the source can not be read, there will be no variation. Being able to lookup an arbitrary float or int attribute is a good way to debug a scene. For examples, if you are wondering which objects are single-sided, you can enter 'Ri:Sides' in varName.

Input Parameters

Input Color

The color that you would like to vary.

RIB: color inputRGB
Default: 0.5 0.5 0.5

Vary Source

The source of the variation. One of:

  • 0: Identifier Id
  • 1: Identifier Name
  • 2: Primvar
  • 3: Attribute
RIB: int varySource
Default: 0

Variable Name

If varySource is 1 or 2, the name of the primvar or user attribute. If using a primvar, it should be either constant; per-vertex/face primvars are not supported. For user attributes, type user:myattribute.

RIB: string varName
Default: ""

Variable Type

The type of the primvar or user attribute used to seed variation. If using a primvar, it should be either uniform or constant; per-vertex/face primvars are not supported.

  • 0: Float
  • 1: Integer
RIB: int varType
Default: 0

Hue

Limit random hue shift. Ranges from 0 (no variation) to 1 (full variation).

RIB: float hue
Default: 0.0

Saturation

Limit random saturation scale. Ranges from 0 (no variation) to 1 (full variation).

RIB: float saturation
Default: 0.0

Luminance

Limit random luminance scale. Ranges from 0 (no variation) to 1 (full variation).

RIB: float luminance
Default: 0.0

Gamma

Limit random gamma variation. Ranges from 0 (no variation) to 1 (full variation).

RIB: float gamma
Default: 0.0

Advanced

Probability

Range from 0 to 1 specifies the possibility of applying the variation.

RIB: float probability
Default: 1.0

Hue Mode

How the color hue will be varied:

  • 0: Centered -- the variation will be centered around the current value.
  • 1: Additive -- the variation will be added to the current value.
  • 2: Substractive -- the variation will be substracted from the current value.
RIB: int hueMode
Default: 0

Saturation Mode

How the color saturation will be varied:

  • 0: Centered -- the variation will be centered around the current value.
  • 1: Additive -- the variation will be added to the current value.
  • 2: Substractive -- the variation will be substracted from the current value.
RIB: int saturationMode
Default: 0

Luminance Mode

How the color luminance will be varied:

  • 0: Centered -- the variation will be centered around the current value.
  • 1: Additive -- the variation will be added to the current value.
  • 2: Substractive -- the variation will be substracted from the current value.
RIB: int luminanceMode
Default: 0

Gamma Mode

How the color gamma will be varied:

  • 0: Centered -- the variation will be centered around the current value.
  • 1: Additive -- the variation will be added to the current value.
  • 2: Substractive -- the variation will be substracted from the current value.
RIB: int gammaMode
Default: 0

Verbosity

Outputs various infos to help you debug your scenes.

  • 0: Silent -- only error messages will be output.
  • 1: Warnings -- errors and missing attributes will be reported.
  • 2: Infos -- like above, plus the value of attributes.
RIB: int verbosity
Default: 0

Output Parameters

resultRGB

The clamped color result.

resultR

The R channel from the resultRGB output.

resultG

The G channel from the resultRGB output.

resultB

The B channel from the resultRGB output.