Normal Falloff
VEX node
Generates a falloff value based on the relationship between the normal and incident vectors.
See also: Global Variables, Front Face
This vop uses the dot product of a surface normal and an incident vector to calculate the falloff value for curved surfaces. The return value will be one (1) where the normal and incident vector line up (parallel), and zero (0) where they are at right angles (perpendicular). This does not work on flat surfaces, since there is no variance in the relationship between the normal and incident vectors with flat surfaces. This vop can be used to create glow effects, simply by multipying it with a glow color and applying it to a sphere; or to soften edges by multplying with the opacity. If inverted, it can be used to create an inexpensive Fresnel effect by multipying it with the output color of an environment map;
Inputs
|
nN |
The normal vector used in the calculation of the falloff. The normal should be normalized if explicitly connected as an input, and front-face calculation is optional but recommended. If this input is not connected, the global variable N will be used instead. |
|
nI |
This is the incidence direction ray used in the calculation of the falloff. The incident vector should be normalized if explicitly connected as an input. If it is not connected, the global variable will be used instead. |
|
exp |
A floating point value used as the exponent in a power function to tighten or relax the falloff rate. Values less than or equal to zero (0) are not recommended. |
|
invert |
This toggle will invert the result. This is useful for creating glows. |
|
facefwd |
This toggle will force the normal to face the camera. It is recommended this toggle be on. |
Outputs
|
float |
This is the amount of falloff. |
Usages in other examples
| Example name | Example for | |
|---|---|---|
| Fire Pit example |
Material shader |
|
| RampReference |