Hi,
We've got Maya 2014 mannully installed in our network and I am having an issue with mentalray trying to locate some .mi files.
These are the messages I get in my shell when try to render only a polygon sphere with mental ray
MI 0.0 6 MB error 121002: failed to open /usr/include/mi/mayahair.mi for reading, No such file or directory
MI 0.0 6 MB error 121002: failed to open /usr/include/mi/abcimport.mi for reading, No such file or directory
And this is in maya:
// Error: (Mayatomr) : mental ray init failed, can't start render
If i try to use the physical Sun and Sky I get more errors Like:
// Warning: (Mayatomr.Scene) : output data type "rgba_h" not directly supported by image format tif, conversion performed by mental ray //
And in my shell:
API 0.0 6 MB error 301090: while defining options "miDefaultOptions": undefined options symbol "miDefaultOptions"
API 0.0 6 MB warn 302012: while defining options "miDefaultOptions": undefined options "miDefaultOptions"
API 0.0 6 MB error 301031: while defining options "miDefaultOptions": call to undeclared function "maya_state"
API 0.0 6 MB error 301031: while defining options "miDefaultOptions": call to undeclared function "adskFrameBufferState"
API 0.0 6 MB error 301031: call to undeclared function "adskMayaDirectionalLight"
API 0.0 6 MB error 301031: call to undeclared function "maya_shaderglow"
API 0.0 6 MB error 301031: call to undeclared function "adskMayaVolumeEngine"
API 0.0 6 MB error 301031: call to undeclared function "adskFrameBufferData"
API 0.0 6 MB error 301032: while defining camera "perspShape": undefined shader "shaderGlow1:perspShape"
API 0.0 6 MB error 301032: while defining camera "perspShape": undefined shader "volumeEngine1"
API 0.0 6 MB error 301031: call to undeclared function "maya_vertexdata"
API 0.0 6 MB error 301031: call to undeclared function "adskMayaLambert"
API 0.0 6 MB error 301031: call to undeclared function "adskMayaFastShadow"
API 0.0 6 MB error 301031: while defining material "initialShadingGroup": call to undeclared function "adskMayaShadingEngine"
API 0.0 6 MB error 301032: while defining material "initialShadingGroup": undefined shader "lambert1:shadow"
API 0.0 6 MB error 301031: call to undeclared function "adskMayaVolumeEngine"
I've added the folder that contains theses .mi files to all my environment variables I could possibily add to. The path in my system that contains the .mi files are in: ( /linux/maya2014/mentalray/shaders/include )
export MAYA_SCRIPT_PATH=${MAYA_SCRIPT_PATH}:/linux/maya2014/mentalray/scripts:/linux/maya2014/mentalray/scripts/AETemplates
export MAYA_PLUG_IN_PATH=${MAYA_PLUG_IN_PATH}:/linux/maya2014/mentalray/plug-ins:/linux/maya2014/mentalray/bin
export MI_CUSTOM_SHADER_PATH=/linux/maya2014/mentalray/shaders/include:/linux/maya2014/mentalray/shaders
export XBMLANGPATH=${XBMLANGPATH}:/linux/maya2014/mentalray/icons
export PYTHONPATH=${PYTHONPATH}:/linux/maya2014/mentalray/scripts
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/linux/maya2014/mentalray/shaders:/linux/maya2014/mentalray/shaders/include
export MENTALRAY_INCLUDE_LOCATION=/linux/maya2014/mentalray/plug-ins:/linux/maya2014/mentalray/shaders/include
export MENTALRAY_LOCATION=/linux/maya2014/mentalray/:/linux/maya2014/mentalray/shaders/include:/linux/maya2014/mentalray/shaders
export MENTALRAY_SHADERS_LOCATION=/linux/maya2014/mentalray/shaders/include:/linux/maya2014/mentalray/shaders
export MI_LIBRARY_PATH=/linux/maya2014/mentalray/shaders:/linux/maya2014/mentalray/shaders/include:/linux/maya2014/mentalray/plug-ins:/linux/maya2014/mentalray/bin
But I still continue getting the error:
So What I've done to make it work was to create a symlink from:
/linux/maya2014/mentalray/shaders/include to /usr/include/mi/
Doing that, maya reads the mi files and I can render properly with no naugthy messages from Mental ray.
But this is not ideal workflow for us. We need to be able to add the folder /linux/maya2014/mentalray/shaders/include or even others to a variable that mental ray looks at and is happy with it.
Could someone tell me which variable that is? I Can't figure out which ones mental ray still need. Had looked everywhere.
Thank you very much for your attention in advance.
Rodrigo Guimaraes
Hello digo_bh,
Thank you for posting to the forums.
Since this is a question more specific to Maya and mental ray, it may be better next time to post at The Area forums (http://forums.autodesk.com/t5/Maya/ct-p/area-c2) forums.
However, to provide you with further information in regards to your issue I would recommend two more environment variables to test:
MAYA_MR_STARTUP_DIR
MAYA_MODULE_PATH
The MAYA_MODULE_PATH defines the search paths for Maya module files. A module file describes the install location of a plugin which has been distributed as a module. Maya will append subdirectories of this install location to the following path variables: MAYA_PLUG_IN_PATH, MAYA_PRESET_PATH, MAYA_SCRIPT_PATH, PYTHONPATH and XBMLANGPATH.
The following table list the default paths, which will always follow any path that you specify.
Default for Linux:
$MAYA_APP_DIR/maya/2014/modules
$MAYA_APP_DIR/maya/modules
/usr/autodesk/modules/maya/2014
/usr/autodesk/modules/maya
You may want to add your custom path plus the default "$MAYA_APP_DIR/maya/2014/modules".
Cheers,
Hi David
Thanks for your reply.
I've inlcuded a few paths to the 2 new variables you provided me, just to be safe, but mental ray still trows the same error trying to find the .mi files at /usr/include/mi/.
I know they are in ${MENTALRAY_DIR}/shaders/include, but Maya still doesn't read these variables as expected.
export MAYA_MODULE_PATH=${MENTALRAY_DIR}:${MAYA_DIR}/modules:${MENTALRAY_DIR}/shaders:${MENTALRAY_DIR}/shaders/include
export MAYA_MR_STARTUP_DIR=${MENTALRAY_DIR}:${MENTALRAY_DIR}/shaders:${MENTALRAY_DIR}/shaders/include
Is there any other variable missing?
Regards,
Rodrigo
Hi Rodrigo,
I spoke with one of my colleagues who is more familiar with the Linux system and he provided me the following information:
I would start by creating a new mental ray mod file. It is not clear if this was done.
I attached it and it looks like the following. I was not able to upload the file with the .mod extension so be sure to remove the .txt extension and make .mod. You will see we use this to point to all the libraries. You just need to change the first (+ LOCALE:en_US mayatomr 3.11.1.4 /apps/caid/mentalrayForMaya2014) line to match your path.
+ LOCALE:en_US mayatomr 3.11.1.4 /apps/caid/mentalrayForMaya2014
MENTALRAY_LOCATION:=
MENTALRAY_SHADERS_LOCATION:=shaders
MENTALRAY_INCLUDE_LOCATION:=shaders/include
MAYA_RENDER_DESC_PATH+:=rendererDesc
IMF_PLUG_IN_PATH+:=bin/image
PATH+:=bin
[r] scripts: scripts
[r] presets: presets
I hope this information is helpful.
Cheers,
Hi David,
With the file you provided, Mental Ray read its shaders and libraries normally now. So we can start render pretty pictures with it. 😉
I appreciatte your time and support.
Thank you very much.
Kind regards
Rodrigo Guimaraes