Mental Ray Override Material (Maya)
Quick post on a very useful but obscure attribute that can be added to any geometry so you can override the material that is assigned to it.
A practical use for this would be fur/hair in Maya. As by default hair and fur is shaded by Maya’s default shaders. These shaders are hard coded into Maya, and there is no usual way of just selecting the feedbackshape/pfxHair and assigning any shader you want to it.
So what you can find inside the depths of the Maya help is an attribute called “miExportMaterial”. This attribute enbales the ability to override the current phenomenon (material) that is assigned to that current transform object.
For my example I have created a simple scene with a sphere and a “bear” fur preset (with a few adjustments) added.
I then added the two required attributes by selecting the feedback transform object “Bear_FurFeedback” and running the following in the script editor :
addAttr -ln "miExportMaterial" -at bool -defaultValue 1;
addAttr -ln "miMaterial" -at message ;
I then created a “mia_material” and using the connection editor connected the “message” attribute of the mia_materialSG node to the miMaterial attribute that I have previously made.


When I render now the fur has the mia_material applied instead of the original maya_fur material::

Example scene : FurMatOverride.zip
That is all.
More tuts to come.
– Ash
No comments yet.
