mib_refraction_index

 
 
 

Category: mental ray > Texture

Shader Family: Texture

Multiple Outputs: Scalar and Boolean

This shader determines whether the ray is entering or leaving the object it has hit, based on a scan of parent rays. It is not based on the normal vector, which can be unreliable with certain types of geometry. The index of refraction ratio (outgoing divided by incoming) is returned. As a side effect, both incoming and outgoing indices of refraction are stored in the state (enter and ior, respectively), and the current volume shader becomes the refraction volume if the ray is entering.

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

mtl_ior

The index of refraction of the material that the ray has hit. It describes the optical properties of the object the ray is entering or leaving, and is returned as the new index of refraction if the ray is found to be entering the object.

Output Ports

ior

The returned refraction index ratio, ready for use by refracting or dielectric base shaders.

enter

Is true if the ray is entering the object. Most shaders do not need to know this, but it makes this base shader more versatile.