Specular Functions VEX node
Generates a color using the selected specular lighting model calculation.
See also: Ambient, Lambert Diffuse, Oren-Nayar Diffuse, Front Face
This vop uses the selected specular lighting model calculation to generate a color. Typically, adding this lighting model into the network, is the last thing done before connecting the resulting color to the output Cf input.
The available specular lighting models are
-
Phong
-
Blinn
-
Glossy
-
Anisotropic (Ward for micropolygon rendering/Ashikhmin for PBR)
-
VEX Specular, the default.
Sample Material Diffuse Specular U-Rough V-Rough --------------------------------+---------+--------+-------- Rolled brass .1 .33 .05 .16 Rolled aluminum .1 .21 .04 .09 Brushed aluminum .15 .19 .088 .13 Varnished plywood .25 .025 .04 .11 Enamel finished metal .25 .047 .08 .096 Painted cardboard box .19 .043 .076 .085 White ceramic tile .7 .05 .071 .071 Glossy grey paper .29 .083 .082 .082 Ivory computer plastic .45 .043 .13 .13 Plastic laminate .67 .07 .092 .092
Inputs
|
nN |
The normal vector is used in the selected specular calculation. The normal should be normalized if explicitly connected as an input. The face forward calculation is optional, but it is recommended. Implicitly, the normalized global variable, N, is used. |
|
nI |
The incidence direction ray used in the selected specular calculation, as well as, the face forward calculation. The incident vector should be normalized if explicitly connected as an input. Implicitly, the normalized global variable, I, is used. |
|
Ks |
The specular intensity. It is used to darken or lighten the highlight color. |
|
spec |
The specular highlight color. It is multiplied by the light color. |
|
urough |
This value is used to control the size or spread of the specular highlight. If Anisotropic specular is selected, this value controls only the size or spread in the U direction of the anisotropic highlight. If urough and vrough are the same, the highlight becomes isotropic, round rather than elliptical. |
|
vough |
This is used only if Anisotropic specular is selected. This value controls the size or spread in the V direction of the specular highlight. If urough and vrough are the same, the highlight becomes isotropic, round rather than elliptical. Anisotropic specular is often used in metalic materials. |
|
sharp |
This value is used to control the sharpness of the edge of the specular highlight. This is used only if Glossy specular is selected. Glossy specular is used for the cornea of the eye, as well glass and other highly reflective materials. |
|
facefwd |
This toggle will change the normal to face forward towards the camera. It is recommended this toggle be on. |
Outputs
|
Color |
The selected specular color highlight calculation Ks * spec * specularFunction(nN, -nI, urough, vrough, sharp); |
|
Illum |
Just selected specular lighting without the multiplication by the specular intensity or the specular color. Usually used as an export parameter for extra images planes used in the composite. |
|
BSDF |
The PBR specular calculation. |
Usages in other examples
| Example name | Example for | |
|---|---|---|
| Fire Pit example |
Material shader |
|
| FurBallWorkflow |
Fur surface node |
|
| FurTextureMap |
Fur surface node |