Mental Ray shaders commonly place in
C:\Program Files\Autodesk\mentalrayForMaya2015\shaders (in Maya2015)
example : MayaShaders.dll
It is a binary data, and the mi place in include : MayaShaders.mi
so you need a pairs file : shader.dll and shader.mi
If you want to place them to custom path
example - D:\shaders\mentalray\
You must to set Maya environment to let Maya know what shader do you install
In common, Maya.env in C:\users\<Username>\documents\maya\<MayaVersion>
We just add two line
MI_CUSTOM_SHADER_PATH=D:\shaders\mentalray\include
MI_LIBRARY_PATH=D:\shaders\mentalray\lib
In here, "lib" just a classify, you also could be place in D:\shaders\mentalray
Best is create yourself AETemplates directory and icon directory
You will not get messy in many file
Try to add
MAYA_CUSTOM_TEMPLATE_PATH=D:\custom\maya\2015-x64\AETemplates
XBMLANGPATH=D:\custom\maya\2015-x64\prefs\icons
Their are AETemplate & Icons for yours
MI_CUSTOM_SHADER_PATH & MI_LIBRARY_PATH make Maya got custom shaders
Finally, we find C:\Program Files\Autodesk\mentalrayForMaya2015\maya.rayrc
open it and add
registry "{DSO}" value "dll" end registry
registry "{_CUSTOM_SHADERS}" value "D:/shaders/mentalray" end registry
link "{_CUSTOM_SHADERS}/lib/shader.{DSO}"
mi "{_CUSTOM_SHADERS}/include/shader.mi"
Complete install, we now can be use custom shader in Maya
Following reference :
https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/GUID-3A452245-0676-4FFB-AAF5-72A10F77C54C-htm.html
https://knowledge.autodesk.com/support/maya/learn-explore/caas/mne-help/global/docs/maya2014/en_us/files/mrfMS-Load-shaders-htm.html
沒有留言:
張貼留言