• About us
  • Contact Us
  • Terms and Conditions
  • Forum
  • Materials
  • Shaders
  • Tools
  • Video
  • Learn
  • Gallery
My Mental Ray Tutorials Mental Ray 101

Learn

  • Tutorials
    • Shaders
    • Mental Ray 101
    • Final Gathering
    • Optimizations / General
    • GI / Caustics
    • Rendering
    • Lighting
  • Extra resources
    • DVD
    • Books
    • References
    • Links
  • Documentation
    • Wiki
PDF Print E-mail
Mental Ray Shaders Information
By: Jared Martin, Aka Jozvex

Mental Ray shaders can be extremely powerful, this post will contain information on the Mental Ray shaders that come installed with Maya, and how to install and use the many great shaders that people have created and posted online.

Shaders that come with Maya 6 +

Materials – Connect to Material Shader slot & most colour attributes.

Material shaders in Mental Ray are what provide an object with it's main surface properties, just like regular Maya materials. Why use a Mental Ray one instead then? Well because people create many advanced material shaders for Mental Ray all the time, that offer things like Sub-Surface Scattering, Ambient Occlusion and many other powerful effects. These standard ones that come with Maya 6 are for the most part pretty unexciting, but some are quite cool.

Dgs_material

This is a simple shader with few attributes. DGS stands for Diffuse, Glossy, Specular because those are the three main properties this shader offers, along with Transparency. The Glossy and Specular attributes provide reflectivity. Glossy reflections are blurry. The blurriness is controlled via the Shiny attribute, the lower the blurrier. When Shiny is set to 0, the Shiny_u and Shiny_v attributes can be used to blur the reflections non-uniformly (eg blurred more horizontally than vertically). Maya 6 now provides blurry reflections and refractions on standard Maya shaders, so it is better to use those instead because they can be tuned for quality vs speed whereas the Dgs_material cannot. Also, the ability to create non-uniform blurring with the Shiny_u and Shiny_v attributes only seems to work reliably on NURBS surfaces.

Mib_illum_blinn

Mental Ray equivalent of the blinn shader. Use Maya's intstead.

Mib_illum_hair

This shader is basically a blinn shader for use on Mental Ray hair geometry. Not much use for it, if any.

Mib_illum_phong

Mental Ray equivalent of the phong shader. Use Maya's intstead.

Mib_illum_ward_deriv

This is more or less like a DGS shader with Ambience attributes. Also, the ability to create non-uniform blurring with the Shiny_u and Shiny_v attributes only seems to work reliably on NURBS surfaces.

Transmat

Transmat material shaders make things invisible. This can be usefull if you want something to have a volume shader (for example) applied to it, but have no surface.

Dielectric_material

The Dielectric material is very good for creating refractive materials such as glass and water. It's a little bit complex because it relies on you having the normals of your object facing the right way depending on the effect you want. 'Col' is a colour representing how much light can pass through the object. 'IOR' is the Index of Refraction. The IOR is most important for changing the type of material you're trying to achieve. For example glass has an IOR of roughly 1.55, while water has an IOR of roughly 1.33. Now, what this shader does is act like a conversion between two substances. The 'Col' and 'IOR' attributes control what the substance will be on the opposite side to the object's normals...for example on the inside of a default poly sphere. The 'Col_out' and 'IOR_out' control what the substance will be on the side the normals are facing...for example on the outside of a default poly sphere. On the default settings (at least in Maya 6) this shader is ready to use as glass because the 'IOR' is 1.5 (meaning glass on the inside) and the 'IOR_out' is 1 (meaning air on the outside). If you were creating a glass ball that is inside water, you would change the 'IOR_out' to 1.33. This shader uses the laws of Fresnel (reflections/refractions are strongest on surfaces facing away from the camera) and Beers law (light is absorbed as it goes further through). Beers law affects the shader in that if you've set the 'Col' attribute to 0.85, then 15% of the light entering the surface is absorbed every unit (in world space) as it travels through the object. The 'Ignore_normals' option ignores the way the normals of your object are facing. This can be usefull if your model is a little bit wacko and the normals aren't right. I think using this option may be slightly slower to render as it has to do more calculations instead of just reading the normal direction. 'Phong_coef' adds a fake specular highlight.

Mib_illum_cooktorr

This is similar to a blinn shader, only it has an IOR setting that allows you to control the way the specular highlight looks at different angles to the camera (basically Fresnel). The IOR colour has to have a value greater than 1 to work. I can't really see a use for it as a shader by itself.

Mib_illum_lambert

Mental Ray equivalent of the lambert shader. Use Maya's intstead.

Mib_illum_ward

Same as the other ward shader only this one lets you map the U and V coordinates in order for Mental Ray to know which way the Shiny_u and Shiny_v attributes should blur the reflection. This seems to allow the blurring to work properly on both NURBS and polygon objects. I think that you need to use the Mib_texture_vector node to do the mapping. In Maya 6, just use standard shaders as they can do the blurring anyway without the hassle.

Path_material

The Path material seems like just a simple DGS material...only it's not! It not only is a DGS material but it calculates Global Illumination too! No photons or Final Gather are needed, the shader does it all by itself. The GI it calculates is very accurate too, more-so than normal photon mapped GI. Why isn't everyone using it then? Because it's VERY slow if you want good results. In order to not have any graininess, you need to use very high sampling settings in the Render Globals like Min 4 Max 4. It uses what's known as brute force Monte Carlo sampling to calculate the GI. You can control the number of lighting bounces this shader calculates by setting the raytracing Reflection/Refraction and Max Trace Depth attributes in the Render Globals. For example, setting the Reflections attribute to 5 in the Render Globals and the Max Trace Depth to at least 5, the Path shader will calculate 5 bounces of light. One strange thing is that the shader doesn't seem to work with transparency/refraction.

Shadow Shaders – Connect to Shadow Shader slot.

You apply a shadow shader to the object whose shadow you want to modify.

Mib_shadow_transparency

This shader allows you to change the colour and transparency of shadows. Transparency values of less than 0.5 seem to create solid opaque shadows. As far as I know you must set the 'Mode' to 1 for it to work.

..................................................................................................................................................

 
Copyright © 2012 My Mental Ray Community. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.