MentalRaySetup
From Odwiki
How to set up MentalRay rendering from Houdini
Before you can use mental ray with houdini you need to setup some environment variables.
setenv MI_LIBRARY_PATH "/path/to/mentalray_version/platform/shaders"
In the above, replace "/path/to/mentalray_version/platform" with your full mental ray path and platform (linux-x86).
setenv MI_RAY_INCPATH "/path/to/mentalray_version/common/include"
In the above, replace "/path/to/mentalray_version/" with your full mental ray path.
setenv MI_ROOT "/path/to/ray3rcDirectory"
You need to setup a ray3rc file and include the path to it in the above otherwise houdini will complain in the shell. DO NOT include the path to the file, just the directory. In my setup, my ray3rc is located in my home directory: Example: setenv MI_ROOT "$HOME/" Now all you have to do is create a mental ray ROP and in the render command enter the full path to the mr binary (ray, ray3). You could create another environment variable called RAYBIN and just use that variable.
There is 1 quirk that happens when trying to render mental ray. Since houdini's mplay uses sockets, I can't get mplay to show the image. You can pipe the rendered image to imf_disp in the render command to see the rendered picture.
Taken from the mental ray manual:
ray -imgpipe 1 | imf_disp
Happy Rendering!
Discussion
| EdwardLam | http://www.techimage.co.uk/products/houdini/houdini_tutorials.html also provides a tutorial on using Houdini with mental ray. I thought that it's supposed to render into mplay if you're using a mental ray ROP. That's why there's the -m option to the imdisplay command. |
| RickWork | I'll try -m later today and update this document if it works. I'll also reconfirm with Jan. Last I recall, he mentioned that it didn't work correctly and we should render mi files at the command line. Perhaps the we should add Jan's mental ray tutorial like to the "Writing mental ray shaders" section? |
| EdwardLam | Ah, just found out that when rendering to ip from the mentral ray rop, it is suppose to work but apparently the interface to mental ray changed from between mi2.0 and mi3.0. So for sure, it won't work for mi3.0 |



