---
title: "PxrVary"
canonical: "https://rmanwiki-26.pixar.com/space/REN26/19661737/PxrVary"
format: markdown
---
> Macro (inline-media-image)

  
  
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.

#### Vary Source

The source of the variation. One of:

- 0: Identifier Id
- 1: Identifier Name
- 2: Primvar
- 3: Attribute

#### 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`".

#### Hue

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

#### Saturation

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

#### Luminance

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

#### Gamma

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

### Advanced

#### Probability

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

#### 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: Subtractive -- the variation will be subtracted from the current value.

#### 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: Subtractive -- the variation will be subtracted from the current value.

#### 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: Subtractive -- the variation will be subtracted from the current value.

#### 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: Subtractive -- the variation will be subtracted from the current value.

#### Seed

Allows the variations to be changed without altering the set primvar

#### Scale Normalized Primvar

Will take the set primvars and scale them to an expected 0-1 range used in the pattern for items that the primvar scale is beyond the normalized range

#### Verbosity

Outputs various info 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.

### 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.