Custom Fresnel curve - r2

Generally, the falloff between the 0° color and the 90° is controlled by the Nd and roughness parameters. A high Nd number means more of the 90° color will be visible when using a low roughness value, but as you increase the roughness, the 90° color will start to disappear until at roughness 99 (or lambert), the 90° color will not be visible at all, no matter the Nd setting of the material.
This is normal behavior, but there may be special cases where you would like to control the influence of roughness and still keep the 90° color visible at high roughness. Examples would be car paints that quickly change their color to another color based on viewing angle, or velvet which has a high roughness but a bright “sheen” of a different color, which would not be possible to create without the .r2 parameters.
The first parameter can be set between 0-90 and controls the falloff angle between the 0° and 90° colors. The second parameter can be set between 0-100 and controls how much influence the roughness should have. For instance, if you write 45 0, the 90° color will start appearing when the viewing angle increases more than 45°, and roughness will have no influence on the effect. If you set the second parameter to 100, you are specifying that roughness should have maximum influence on the 0° and 90° colors; it would be as if you had disabled the .r2 functionality.

Other r2 examples: If we set the r2 values to 15 0, the 90° color will quickly become visible, right after the viewing angle is 15° or more. Roughness will not have any influence. Setting the r2 values to 70 50 means the 90° color will become visible only at a large viewing angle, making it appear just at the edges of the object. The increased roughness would make this effect less visible, but it would still show up. Using 85 99 means the 90° color will be visible only at the very edges of the object, but with the second parameter set to 99, which controls the influence of the roughness, the effect would be virtually invisible.

 

The “R2” name derives from the first time it was suggested, for the Mike Verta’s R2D2 project.

 

Image courtesy of Mike Verta (www.mikeverta.com)