osx mental ray shaders

this page contains assored Mental Ray shdaers. some i've written, and some others i've managed to compile for OS X. They have been compiled with GCC 2.95, and tested with Maya 5.0.1 and Mental Ray 3.2.6. I dont have Maya 6, so I cant tell you what the score is there. Have a go! many thanks to their authors for letting me put them here.


UPDATE!: We now have some OSX intel compiles for some of these shaders, and 64bit versions of tc_curvature!

Thanks for Darren from http://www.offtherackpro.com and Felix Ulber and Haggi Krey.


(Install instructions at the bottom of the page.)

tc_curvature v1.0

written by: Tom Cowland - mr@tomcowland.com

calculates surface curvature for procedural shaders. usefull for creating the effects of wear and tear on sharp corners. works with nurbs, sub-divs and poly geometry. This is the first public version so please send any comments or feedback my way. OSX / Win / LINUX versions included.


tc_curvature page


by LaMaison

A neat shader for outputting motion vectors for faking motion blur in post - or anything else you may want to do with them :)

For information, and the maya files, take a look here:


Then download the OSX .so below. Check what kind of machine you have, If its a Mac Pro, or a new MacBook, youll need the intel one.





by ctrl_studio

Fully featured layering system for shaders... Grab the OSX .so below, and the rest of the files here:

mix8layers on highend3d


NOTE: in order to maintain compatability with Maya 5.0.1 under OSX, powf() calls have been changed to pow(). If you have any weird things happening, it may be realted to this change. Please let me know. This shouldnt have any effect on comaptibilty Maya 6+, cheers, Tom



by Daniel Rind - animus.brinkster.net

The renound ambient occlusion shader by Daniel Rind. You need to pick the other parts up here:



two versions?

There are two versions to download here, the first is a compile of the code from Daniels site. The second (Dirtmap_osx_5) is a version with a few lines of code removed that stop it working with Maya 5 under OSX. Its identical functionaly, but it is less efficient with larger scenes. The problems seems to stem from the use of mi_ray_falloff in the normal version, which with Maya 5.0.1 / MR 3.2.6 / OSX will hang the render. The osx_5 version has these lines removed. If you have problems with the normal version under Maya v6+. Try the v5 version too.




by Daniel Rind - animus.brinkster.net

Daniel's most excellent SSS shader... Again you need to pick the other parts up here:




written by: Pavel Ledin / Tom Cowland - puppet@rambler.ru / mr@tomcowland.com

UPDATE: Since I added reflection handling and colour splitting, Pavel has updated his shader to include his own implementation of these things, as well as refraction etc... Avaiable on his site. I left my version is here as it behaves slightly differently.


A z-depth tracing shader, supporting transpacency and refections. This shader is a modified version of p_z, avaiable at puppet.cgtalk.ru, posted with Pavel's consent. Please see the included readme for more info. If anyone can help me get Win/Linux complies together, please get in touch! Many thanks.



written by: Stephen H Westin
ported to MentalRay by: Fredrik Brännbacka - madcrew.se

A neat shader to simulate the eddge effects of velvet.



by Olivier Renouard - drone.org

Ray displace allows you you to recover Normal and Displacement maps from high-res geometry for apply to a lower res mesh. Tutorials, other versions, and a host of other info, as well as the Maya plugins are avaiable here.


Bump Combiner

by ctrl_studio

This cool shader allows you to apply standard maya bump nodes to mental ray shaders without an inherent bump slot - aswell as allowing you to layer multiple bumps together!


links to other mental ray shaders avaiable for osx:

Assorted usefull Mental Ray shaders here - pixero.com

ToLight shader suite (ambient occlusion, reflection occlusion) - thereisnoluck.com

install instructions: (Maya 5.0.1)

if you havent allready done so, open this file ~/Library/Preferences/AliasWavefront/maya/5.0/Maya.env (the library in your home folder) in TextEdit and add this line:


then for any new shaders:

1. copy the shaders .so file into /Applications/AliasWavefront/Maya 5.0/mentalray/lib/

2. copy the shaderrs .mi file into /Applications/AliasWavefront/Maya 5.0/mentalray/include/

3. open /Applications/AliasWavefront/Maya 5.0/mentalray/maya.rayc in TextEdit

4. add the following lines in red below, near the bottom of the file, substituting the in name of the files copied above:

     link "{MAYABASE}/lib/nameofshader.{DSO}"
     mi "{MAYABASE}/include/nameofshader.mi"

     echo "mental ray for Maya - startup done"
end registry

5. Copy any AE templates (.mel) to your Scipts folder, and any icons (.xpm) into your Icons folder (in your user prefs folder). I usualy just put them in the appropriate folders within /Application/AliasWavefront/Maya 5.0/Application Support/ instead though so theyre avaiable for all users.

6. Start Maya...


install instructions: (Maya 6.0 +)

I hear that in the re-write of Maya 6.0+ for Alias have gone down the 'proper' OSX app route and bundled everything up into a package. The install instructions should essentialy be the same as above, except you may need to control-click on the 'Maya 6' icon and choose 'Show Package Contents' to get to the Mental Ray folders....

If there are issues with these shaders under Maya 6+ please let me know.... It may be worth a look on the authors sites to see if there are versions of the .mi files with NodeIDs...



hope this of some use, let me know if you have any good osx mental ray links, or shaders to compile...

email me: mr@tomcowland.com