Category: mental ray > Materials
Shader Family: Surface Material
This shader is very similar to the mib_glossy_reflection shader, but has a few differences. Since it deals with refraction, it has a "deep material" rather than an environment.
See mib_glossy_reflection_phong_phen for more information about using this shader and the mib_glossy_reflection shader.
Objects fading into a gray "deep material".
Name |
The name of the shader node displayed in the render tree. Enter any name you like, or leave the default. |
|
top_material |
The surface characteristics of the top layer. Like the base_material in the mib_glossy_reflection shader, this is simply added to the result. An example of a shader to plug in here would be the mib_illum_phong shader with only specularity and very little to no diffuse component defined. |
|
deep_material |
Only used if max_distance is set to a non-zero value. It is the surface characteristics of the "interior" of the object, and the color to which refractions fade as they reach the max_distance. While the color is still calculated at the surface, it will appear to be behind any refraction of internal objects. For interesting pseudo-volumetric simulations, you can try using the misss_fast_shader subsurface scattering shader here. |
|
back_material |
The material used for rays that hit the inside of the object from within (that is, any ray that hits the object from the back as defined by the geometry normal). It defines what the "inside" of the object looks like, and should be assigned to a surface shader, such as the mib_illum_phong shader or similar. |
|
render_reverse_of_back_material |
By default, mental ray flips the normal to the side of the incoming ray, which would render the inside of the object's surface. However, sometimes it is desirable to simulate a translucency effect by letting the light hitting the outside of the object define its shading. You can achieve this effect by selecting this option, which causes the shader to use the original direction of the surface normal when evaluating back_material. |
|
refraction_color |
A multiplier for the refracted rays. |
|
max_distance |
Limits the reach of refracted rays, and fades them toward the deep_material as their length approaches this value. This gives the appearance of a semi-transparent material into which you can only see so far. |
|
falloff |
Sets the rate for fading into the deep_material, which is a "power of" function. The default of 2.0 means the falloff is the distance squared (power of 2); 3.0 means the distance cubed, and so on. This parameter has no effect if max_distance is zero. |
|
refraction_base_weight |
A scalar multiplier for the refraction at surfaces facing the camera |
|
refraction_edge_weight |
A scalar multiplier for the refraction at surfaces perpendicular to the camera (that is, the edges). |
|
edge_factor |
The narrowness of the edge. Generally, there is less refraction at the edges (glancing angles) than on facing surfaces. This is known as a Fresnel effect. |
|
ior |
The index of refraction. Since the perturbation of refraction is calculated based on a perturbed normal vector, it is very important that this value defines a sensible index of refraction. For example, an index of 1.0 causes no change in the ray direction, which generates no blurriness whatsoever. As a special case, you may set this value to 0.0 which switches to a "direction perturbing mode" rather than a "normal perturbing mode." |
|
samples |
Sets the number of samples used, and is ideally the power of 2. If this value is zero, the shader reverts to single sample refraction only. |
|
u_spread, v_spread |
The amount of normal vector perturbation performed in the U and V directions. If these values are identical, isotropic glossy refraction is generated. Upon any difference between the two values, the anisotropic mode is enabled. |
|
u_axis, v_axis |
Optional parameters for specifying the directions of anisotropy. These only apply in anisotropic mode. If u_axis is 0,0,0 the shader attempts to generate a default vector based on the first derivative vector of the surface: if this missing, the vector is based on object-space X axis. If u_axis has a value, it is used as the U direction of anisotropy. If v_axis has a value, it is used as the V direction, but if it doesn't, the V direction is calculated as the cross product of the original surface normal and the U direction. |
|
dispersion |
Dispersion goes from 0.0 (no chromatic aberration) to 1.0 (full spectrum chromatic abberation). |
Creates an array of colors defining the "rainbow" into which colors are broken when the dispersion parameter is set to a non-zero value. The defaults are red-yellow-white-cyan-blue-indigo colors, but can be set to anything you wish.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License