iray in Maya 2013
Recently Twitted on the mental ray Twitter feed:
We thought we’d try and make it happen in Maya 2013. With some digging and a license of Standalone; the end result is a complex menagerie: Spinning Buddha!
For Progressive + IPR you need: A new Maya 2013 SP1 re-posted for download on Autodesk’s site: Autodesk – Autodesk Maya Services and Support
So how do you make this happen? (Please note that the magic works for Windows right now. Linux can be found in the comments from Brenton. Haven’t gotten to OSX.)
Well, first you need the correct files. This means you need a licensed copy of either mental ray Standalone or 3ds Max (Or Design) separately or as part of your bundle. You will need these files:
- libiray.dll
- libiraymr.dll
- cudart64_40_17.dll (Possibly slightly different, this is x64)
Place these into a single directory you create, name it whatever you need to make it recognizable. In our example we’ll simply call it: iray
On Windows we placed it here: <My Documents>\maya\2013-x64\iray
You now need to alter the Maya.env file found in the correct folder for 2013. You can find it here: C:\Users\<your user name>\Documents\maya\2013-x64\Maya.env
Open with a plain text editor and add these lines:
MI_LIBRARY_PATH = $MAYA_APP_DIR/2013-x64/iray
PATH = $MI_LIBRARY_PATH;$PATH
Now open Maya and render using the information and hints found on the ARC forum here:
Some short tests confirmed that this works with Progressive IPR in Maya 2013 SP1.
Posted on July 3, 2012, in maya, Uncategorized and tagged iray, maya 2013, mental ray. Bookmark the permalink. 23 Comments.
Hi David:
This bolg is awesome .I have a question. Bug fixes: “For unified sampling, fixed filtering artifacts for non-color framebuffers (such as normal and Z depth).”
I think the depth pass must be unAnti-Aliasing. If i use the filtering for Z pass, i get a bad edge for Zblur.Now,I Using unified sampling for render, the pass (Z depth) have a bad edge.
But i using the Anti-Aliasing the Z pass is right. I was so upset. i want know the unified sampling with passes in production .If you have time,Please give me the answer.
Fred
Hi Fred,
Data passes like zdepth and world position should be unfiltered to be correct. Otherwise you filter together values that makes them incorrect. The bug fixes refers to artifacts like patterning in data passes and custom buffers making then unusable previously.
Hi David
Thank you for your reply. I have a little puzzle..I use the normal “AA” and the passes for render .I get every pass are correct. But i use the unified sampling and the passes for render , i get a wrong result.,such as zdepth and world position .It looks be filtered.If i turn off the filter in the depth pass panel.I also get a wrong result. The edge is bad for compose.
Is it a bug? Maybe my method is wrong?Please give me a hand.Thank you very much.
Fred
What version of Maya are you using? You must use 2013 for the passes to be correct.
I use maya2013 sp1(the newest versions). It also have the problem.I Upload some pictures in web.have a look ,please.
http://forums.cgsociety.org/showthread.php?p=7363089#post7363089
I’m not sure the cause without seeing the scene. But I would avoid the mitchell filter. Try gaussian 2 2
howdy
I want to again thank you very much . I changed the gaussian ,the result is better ,But the result is also have a wrong edge .I read the Zpass into nuke,first i use unpremult node to Z.then i use the Zblur node ,looks good.Now The question is the Zpass is filtered. If i turn off the filter in the depth pass panel,the edge is imperfect。I upload the simple senses . Help me check it.
.https://github.com/downloads/nnfred/problom/problem.rar
Technically an unfiltered Z-depth is correct. This is because individual samples in a pixel will each have a different depth result. Say, 2 objects overlap in a pixel but one covers more and is closer.
If I take the depth from the object behind and the one in front and filter them together, I end up with a numerical result that isn’t the distance of EITHER object.
Example: Depth of 2 and 6. My result should be either 2 OR 6. Preferably the result of the object that covers the pixel the most. A result of say 3 or 4.32 isn’t the depth of either object and is useless. That would be a depth that means nothing to the objects in the pixel.
In your case, visually simple, the effect of a non-filtered pixel with extreme depth of field causes an artifact. So using a filtered pass might be ok visually but be aware it’s not actually correct like a non-filtered pass. The vast majority of data passes (normals, depth, world position, etc) should be unfiltered to avoid generating values that are not accurate.
For linux users, the three libraries you need are:
libiray.so
libiraymr.so
libcudart.so.4
In a mental ray standalone distribution, the first two files are located in OS sepcific mental ray bin directory while the cudart library is located in lib directory. For Maya, you need to point MI_LIBRARY_PATH towards library.so/libiraymr.so and LD_LIBRARY_PATH towards libcudart.so.4. You can install the libraries however you want as long as the environment variables are set accordingly. You can set these environment variables in the Maya.evn file as you would Windows.
Hi David
When i see your explain,it just clicked for me.Many thanks for your help.
Iray is working perfect for me in Maya with IPR! Only problem is it’s a bit of a pain to tweak interactively. My performance gets totally destroyed when iray is doing it’s thing. Must be eating that gpu alive. 🙂 But…it is totally working. No crashes yet!
It does, I use the CPU mode and make it lower priority (niceness in Linux)
Hi David
I have a question.
mental ray for Maya 2013
mental ray: version 3.10.1.11, Jul 26 2012, revision 177995
IRAY 0.11 29 MB warn : unsupported shader adskMayaLambert, defaulting to grey diffuse
how to resolve this?
If you have time,Please give me the answer. maya2013 sp2
//Fred
Follow the posts listed in the blog entry at the bottom. You have to use materials that translate to iray; this basically means the mia_material (not x_passes) and no others. Since iray is not integrated into Maya, a lot of the Maya nodes mean nothing to iray.
Thinks for your help.Up to now,only mia_material and some builtin_bsdf shaders can rendered by iry?The misss_fast_skin_maya shader does not support rendering?
//Fred
The information here: http://forum.mentalimages.com/showthread.php?6584-Maya-2011-and-mental-ray-iray
…is relatively unchanged. Until some changes are made to mayatomr to accept the iray layered material, your options are limited.
i tried to make maya 2012 work with iray borrowed from max 2013 – no success – “LIB 0.3 warn 292015: loading …/maya/2012-x64/iray\libiray.dll: The specified module could not be found.
IRAY 0.3 error 841098: failed loading iray rendering plugin …/maya/2012-x64/iray\libiray.dll
when i replace the iray files back to those from max 2012 – it works.
and last question: what about maya 2013.5? would adding maya.env lines work?
cheers!
You need to match versions for the plug-in to recognize iray. 2013 should not work in 2012 and vice versa usually.
for some reason dlls from max 2013 dont work in maya 2013.5 (extension)…
SAP has some plug-in binary incompatibility.
Hi David, first thank you for all your blogs, they are a big help!
The problem is i can’t get gammaCorrect node to work with iray. Funny thing is it is working on one machine normal like in mental ray, but on other it is not recognized (renders black). Do you know what else is required besides libraries that you mention above to make gamma nodes work? I obviusly forgot what I did on this machine where gamma nodes work.
I haven’t tried but I didn’t think the gamma nodes translated to iray at all.
Pingback: nVidia iray in Maya 2014 | elemental ray