RayType 1.1 Mental Ray shader
The RayType Mental Ray shader can assign different shaders (materials, textures, colors) to different kind of raytrace calculations. The node works like the mix of condition and switch nodes in Maya, to separate the following raytrace calls:
- eye
By default the shader connected to the eye ray is called for very shading
calculation but when you enable the checkbox of a specific ray type you
override that calculation with the connected shader. The "Continue Ray When Color Is Black" attribute makes the
ray continue its path when the override color is black: it makes an object
totally invisible for only a specific ray type. For example it allows
removing objects from raytrace reflections without cancelling the ray,
while the object still appears for final gathering. (If you'd like to
continue a ray for an override but use the black color for another one
with the same RayType node, assign very low values (for example 0.0001)
instead of black to disable continuing the ray and still output black.)
A few examples how the shader can be useful: - When using a background environment you can connect a texture to the eye rays and a blurred version of the texture to the finalgather rays to have nice, smooth FG and sharp reflections at the same time. - Connect a simple lambert or even constant colored version of your complex shader to the reflection or refraction rays, to have much simpler and faster raytrace calculations. (When using glossy reflections most of the detail is blurred anyway. :)) - You can implement very subtle changes in reflections, refractions, FG without changing the reflected shader itself. - Create an object that emits light using final gather but does not appear in reflections. - Make an object invisible for a specific ray type.
Download:
Installation: - Copy DSO file into "alias/maya/mentalray/lib"
(DLL for Windows / SO for linux and OSX) - Modify "alias/maya/mentalray/maya.rayrc" with the two following
lines, both of them comes after the link "{MAYABASE}/lib/RayType.{DSO}"
Usage: RayType appears in the HyperShade at the `Create mental
ray Nodes/Miscellaneous` tab. - Maya 5 sample scenes are included to demonstrate altering reflection, transparency and finalgather rays and a Maya 6 scene shows the effect of "Continue Ray When Color Is Black". This attribute is not available for Maya 5 because it requires a Mental Ray 3.3 feature. Advices, comments, bug-fixes and great new ideas are
welcome. 2005.02. |