PDA

View Full Version : How do i render faster with mental ray?


gwklam
04-26-2009, 10:52 PM
Hi guys, this is my first post.
I also just started maya(i used blender:argh: for a couple of months), and right away i went straight onto mental ray.
I have a pc:

Case: antec Sonata II
CPU:e6750 intel core duo 2 2.66ghz @ 2.8ghz
PSU: antec 450 watt
GPU: XFX 9800gtx stock clock
HDD: 500GB
Memory: kingston 3 1GB sticks
Monitor: viewsonic VX2255 wmb 22"(i got this half price off for $250)
sound: Logitech x-240
OS: windows vista ultimate sp1
And i also have a mac:

Macbook pro 3,1 2.4ghz with 2GB ram mid 2007(the hour that leopard 10.5 came out)
I rendered an image(this is my very first render from maya, i know, it sucks, but it's practice)
http://portfolio.silentsleeper.com/newportfolio/firstrender.png

and it took about 3 hours on my pc.

I have maya installed on the mac as well.

Is there a way in which the when I render on my pc, it uses the power of the cpu in the mac and pc at the same time, and vice-versa, render from a mac using the power of the pc.

constantine1
04-27-2009, 02:31 PM
first, try tweaking the render settings. Adjust your raytracing and shadow settings to get the quality you want while taking the minimal amount of time to do it. Read up on the settings and then try some simple tests till you get it right.

Skoczylas
04-27-2009, 03:45 PM
I think three hours rendertime are too much. What can you tell us about the rendersettings for this image? Especially the anti aliasing settings and the contrast settings. How is it lit?

thematt
04-27-2009, 03:55 PM
I'm pretty sure the deph of field is killing your rendertime..take it out check rendertime. if it's a necessity do it in post

gwklam
04-27-2009, 05:27 PM
first, try tweaking the render settings. Adjust your raytracing and shadow settings to get the quality you want while taking the minimal amount of time to do it. Read up on the settings and then try some simple tests till you get it right.
Well, my raytracing is at reflection:10, refraction:10, and Max Trace:20 - could this be the reason?. Shadows were let at default.
I also already did a optimize scene.

I think three hours rendertime are too much. What can you tell us about the rendersettings for this image? Especially the anti aliasing settings and the contrast settings. How is it lit?
I have 2 lights, one made by the mental ray physical sun and sky. and one that is a area light. other than changing the position of the area light, both lights settings are the same.
My antialiasing was only min sample:0, max sample:2. I have no idea what you mean by contrast settings in maya.

I'm pretty sure the deph of field is killing your rendertime..take it out check rendertime. if it's a necessity do it in post
Well, yes depth of field would be the thing that kills the rendertime the most, and i used the 'depth of field' setting in the camera in made with values focus distance:3.5(at the flowers), Fstop at 40, and focus region scale 1(i have no idea what is focus scale for)

Libor
04-28-2009, 09:55 AM
Just a few hints for speed up:

1) use standard maya lights and use them wise (as few as neccesary - key, fill, rim light (3?) )

2) lower the raytraced depth as much as you can (without glass transparent objects it can be like Reflection depth like 1 and refract 1, total 2)

3) production quality antialiasing is ok when using Box Filter, min 0 max 2 (contrast default 0.100)

4) Loose the true DOF computed by raytracing algorithms (use zdepth blurring in post)


5) use ambient occlusion instead of using GI when you can cheat it (of course its not GI but its a nice way how to cheat it)

Well of course theses rules could be and should be breaked when one needs something more (GI, physical sun)


Hope this helped a bit.

L.

Hamburger
04-28-2009, 01:34 PM
If you've got another computer lying around you can speed up render with mental ray satellite.

Otherwise as others have mentioned use DOF in post! Photoshop CS versions have filters that are able to read alpha channels to calculate nice blurs or use other software for animation like After Effects...or if you want good results relatively cheap imo you could use a PS plugin:
http://www.dofpro.com/cgigallery.htm

raytrace dof is too slow! Avoid it if you can get away with it! A good tip to do when rendering is if it can be faked well...do it! Because who wants to wait around for renders and buckets to finish? :argh:

lazzhar
04-28-2009, 01:56 PM
Also, I don't think you need such a depth of field in this shot. It's making it looking like a miniature.

Quio
04-28-2009, 04:10 PM
Some things slowing down MR:
Depth of field (like peaple say try using a postpordution z-Buffer DOF)
Good Antialiasing (0-2 and 0.1 is good. 1-3 and 0.01 contrast will make rendering already a lot slower)
Final Gathering (If you use Sun and Sky its enabled, reduce the point density in the final gather settings to 0.15 to speed FG up a lot or use direct lights istead)
High Raytracing depth (4-6 might be enought in your scene)

gwklam
04-28-2009, 11:27 PM
I just figured out there was a maya sp1 update, so i did that.
I just used mental ray satellite on mac(as the master) to use the pc processors. It was fantastic and speeded my render by nearly 40%.

However, when i use the PC to batch render(as the master), to the mac processors, i get this message:
Starting "C:\Program Files\Autodesk\Maya2009\bin\mayabatch.exe"
mental ray for Maya 10.0
mental ray: version 3.7.1.27, Jan 26 2009, revision 30548
Hardware Renderer : vendor(NVIDIA Corporation), renderer(GeForce 9800 GTX/9800 GTX+/PCI/SSE2), version(3.0.0)
fragment API(NVIDIA Cg)
vertex API(Cg vertex programs)
Cg fragment profile(fp30), vertex profile(arbvp1)
Warning: Gelato doesn't support version 2009 Service Pack 1a of Maya.
File read in 0 seconds.
Result: C:/Users/Gabriel Lam/Documents/maya/projects/default/scenes/untitled__3672.mb
mental ray: got 8 satellite CPUs.
MEM 0.0 info : heap size limit set to 2281 MB
Info: (mental ray) : number of render thread(s): 2
// mental ray for Maya: using rayhosts file C:/Users/Gabriel Lam/Documents/maya/2009/prefs//maya.rayhosts
Info: (mental ray) : adding rayhosts
Info: (mental ray) : adding host: 192.168.1.64:7109
MSG 0.0 info : adding new host 1 (192.168.1.64:7109)
MSG 0.0 error 011329: mi-ray/tcp: not a service (check %SystemRoot%\system32\drivers\etc\services)
MSG 0.0 warn 012219: using fallback inet service 7003
JOB 0.0 info : started threads 0,1 on 192.168.1.64:7109 now known as host 1
Info: (mental ray) : network rendering slaves: 192.168.1.64:7109
LINK 1.n error 191014: realflowMeltShaderMr.so: load failed,
Error: (mental ray) : realflowMeltShaderMr.so: load failed,
LINK 1.n error 191029: failed to link library on host silentsleeper.local
Error: (mental ray) : failed to link library on host silentsleeper.local
Info: (Mayatomr.Nodes) : custom string options found
Info: (Mayatomr.Nodes) : derive mental ray global approximation settings from Maya
Info: (Mayatomr.Nodes) : derive mental ray global displacement settings from Maya
Info: (Mayatomr.Scene) : update lights and related shaders
Info: (Mayatomr.Scene) : update cameras and related shaders
Info: (Mayatomr.Scene) : update geometry and materials
Prog: (Mayatomr.Scene) : DAG node: pCylinder1
Warning: (Mayatomr) : mental ray has reported errors, see the log
Error: Scene C:/Users/Gabriel Lam/Documents/maya/projects/default/scenes/untitled__3672.mb failed to render.

// Maya exited with status 210
Right now, only Render View works, so I'm confused.


also, if I dont use the camera DOF, and use Z-depth, how do i configure the depth of field from the z-depth?
(remember, i am still learning maya.)

Hamburger
04-29-2009, 04:20 AM
I haven't seen a few of those errors before but this might be the one:

LINK 1.n error 191014: realflowMeltShaderMr.so: load failed,
Error: (mental ray) : realflowMeltShaderMr.so: load failed,

You need to copy the mi files and dll plugin files onto your slave even if they aren't used in the scene.

C:\Program Files\Autodesk\Maya2009\mentalray\include and lib

gwklam
04-29-2009, 04:50 AM
I haven't seen a few of those errors before but this might be the one:

LINK 1.n error 191014: realflowMeltShaderMr.so: load failed,
Error: (mental ray) : realflowMeltShaderMr.so: load failed,

You need to copy the mi files and dll plugin files onto your slave even if they aren't used in the scene.

C:\Program Files\Autodesk\Maya2009\mentalray\include and lib

But but but... when my master was a mac and my slave was a pc, it worked very well.
And i dont think copying files from a pc master to a mac slave would do the job. realflowMeltShaderMr.mll is on windows and realflowMeltShaderMr.so is on the mac right now, why did it fail to load??? i didnt even put any realflow sequences in there
My error message is smaller but ....Starting "C:\Program Files\Autodesk\Maya2009\bin\mayabatch.exe"
mental ray for Maya 10.0
mental ray: version 3.7.1.27, Jan 26 2009, revision 30548
Hardware Renderer : vendor(NVIDIA Corporation), renderer(GeForce 9800 GTX/9800 GTX+/PCI/SSE2), version(3.0.0)
fragment API(NVIDIA Cg)
vertex API(Cg vertex programs)
Cg fragment profile(fp30), vertex profile(arbvp1)
Warning: Gelato doesn't support version 2009 Service Pack 1a of Maya.
Warning: line 1: Unrecognized node type for node '_areaLight1_mrLoc'; preserving node information during this session.
File read in 0 seconds.
Warning: Main poly limit exceeded: 100008 faces created out of 518700 - see Docs for reduction hints.
Warning: Flower poly limit exceeded: 100002 faces created out of 114672 - see Docs for reduction hints.
Warning: Main poly limit exceeded: 100002 faces created out of 247620 - see Docs for reduction hints.
Warning: Flower poly limit exceeded: 100002 faces created out of 153180 - see Docs for reduction hints.
Result: C:/Users/Gabriel Lam/Documents/maya/projects/default/scenes/carpets__3852.mb
mental ray: got 8 satellite CPUs.
// mental ray for Maya: using rayhosts file C:/Users/Gabriel Lam/Documents/maya/2009/prefs//maya.rayhosts
API 0.0 warn 302018: type conflict: "input" is type vector, "maya_file" returns type color
LINK 1.n error 191014: realflowMeltShaderMr.so: load failed,
Error: (mental ray) : realflowMeltShaderMr.so: load failed,
LINK 1.n error 191029: failed to link library on host silentsleeper.local
Error: (mental ray) : failed to link library on host silentsleeper.local
API 0.0 warn 302018: type conflict: "input2" is type vector, "maya_file" returns type color
API 0.0 warn 302018: type conflict: "specularColor" is type color, "maya_multdiv" returns type vector
API 0.0 warn 302018: type conflict: "input2" is type vector, "maya_ramp" returns type color
API 0.0 warn 302018: type conflict: "specularColor" is type color, "maya_multdiv" returns type vector
API 0.0 warn 302018: type conflict: "input2" is type vector, "maya_ramp" returns type color
API 0.0 warn 302018: type conflict: "specularColor" is type color, "maya_multdiv" returns type vector
Error: Scene C:/Users/Gabriel Lam/Documents/maya/projects/default/scenes/carpets__3852.mb failed to render.

// Maya exited with status 210
I still dont get why render view is working and batch render is not.


BTW, do you know how to configure the z-depth?

gwklam
04-29-2009, 06:21 AM
Actually, ignore all those errors, mental ray satelite seems to work now with the scenes that i created after i installed realflow plugin for maya, thats very strange.

Now about the Camera DOF, how can i configure Z-depth to act the same way?(disregarding the picture i posted in the first post). Actually, i ticked z-depth on the render options. I can even see the z-depth when i click on the 'Z' button in fcheck. But how do i actually apply this z-depth?
I looked at that dofpro, but nah.............. i dont wanna pay anymore.
how do the professionals do it?

InfernalDarkness
04-29-2009, 06:18 PM
...simply copy/paste the Z-depth pass into a new channel in Photoshop. Select this channel, and apply your favorite blur to your main layer, and tweak it until you're satisfied.

If you need a more accurate focal depth or point of focus, then use "Select Color Range" to narrow down your selection, then run your blur. Quick and simple out of the box DOF in Photoshop.

The basic concept is that your Z-depth pass is a greyscale image, with white (or black) being the farthest or closest to the camera. It's much like an alpha, but with distance from camera being your gradient, as opposed to selection or backdrop. Hope this helps.

gwklam
04-29-2009, 07:39 PM
...simply copy/paste the Z-depth pass into a new channel in Photoshop. Select this channel, and apply your favorite blur to your main layer, and tweak it until you're satisfied.

If you need a more accurate focal depth or point of focus, then use "Select Color Range" to narrow down your selection, then run your blur. Quick and simple out of the box DOF in Photoshop.

The basic concept is that your Z-depth pass is a greyscale image, with white (or black) being the farthest or closest to the camera. It's much like an alpha, but with distance from camera being your gradient, as opposed to selection or backdrop. Hope this helps.

ok, but using photoshop is like having to do each frame if I rendered a sequence too right? wouldn't that take forever?

I just heard of this Render Layers. How do I use it? every tutorial I see is using some older version of maya, hey have this 'R' sign, while the my maya 2009 has the camera sign. quite hard to follow the rest of the instructions. Do you guys know any good tutorials for it?

InfernalDarkness
04-29-2009, 07:59 PM
...you would run an action (automation) on each frame. So simply record your settings on one frame, make it look good, then run that Action on your entire folder. You wouldn't do them separately on each frame; you're correct, that would take FOREVER! But still not as long as this render, actually.

But if you're doing animation, you should be using After Effects instead of Photoshop. Then you would only have to run your DOF blur one time, or even keyframe it to change focus during your animation, like they do in the movies.

Quio
04-29-2009, 10:39 PM
There is a great deph of field plugin for after fx. Frischluft Lenscare. Its quite fast and does a nice dof. I use it with digital fusion too.

gwklam
05-10-2009, 05:52 AM
ok, guys, I just started trying out this Irradiance Particle. It enables Importons by default too.

Well, I havent played to much with the settings as it was talking forever to render.
How can i optimize this for faster render times, because it really seems slower than it should. I turned off final fathering, ambient occlusion and global illumination.
I put importons density to 0.1 and irradiance particle rays to 64. raytracing to left at 5, 5, and then 10.
I have a image-based sky.anti-aliasing is at min1,max3.

I'm still trying to see what settings can make the footage look a bit more real.
How do you guys get things to look a bit more real?

CGTalk Moderation
05-10-2009, 05:52 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.