Oren-Nayar Diffuse VEX node

Generates a color using the Oren-Nayar diffuse lighting model calculation.

All Inputs Outputs

See also: Lambert Diffuse, Front Face, Parameter

This is a more sophisticated diffuse calculation than Lambert’s. It provides a roughness exponent to control the spread of the diffuse contribution. Typically its color is the main surface color of the material. This lighting model is often used for materials with no specular contribution, such as clay or chalk or matte paint.

Inputs

nN

The normal vector is used in the Oren-Nayar diffuse calculation.

The normal should be normalized if explicitly connected as an input, and front-face calculation is optional but recommended. Implicitly, the normalized global variable, N, is used.

nI

The incidence direction ray used in the Oren-Nayar diffuse calculation,

and the face forward calculation. The incident vector should be normalized if explicitly connected as an input. Implicitly, the normalized global variable, I, is used.

Kd

The diffuse intensity.

A floating point value used to darken or lighten diffuse contribution.

diff

The diffuse color. This color is most often the main surface color of the material.

rough

A floating point value used to control the size or spread of diffuse contribution.

facefwd

This toggle will change the normal to face forward towards the camera.

It is recommended this toggle be on.

Outputs

color

The Oren-Nayar diffuse color contribution

Kd * diff * diffuse(nN, -nI, rough);

illum

Just Oren-Nayar diffuse lighting without the multiplication by the diffuse

intensity or the diffuse color. Usually used as an export parameter for extra images planes used in the composite.

bsdf

The PBR diffuse calculation.

Usages in other examples

Example name Example for

Instance particle node

Load | Launch