demontroll's avatar
Max Path Length, Iray Render Setting, Daz Studio
By demontroll   |   Watch
16 20 5K (1 Today)
Published: March 30, 2015
© 2015 - 2019 demontroll
Tutorial on Max Path Length

Iray allows light to bounce around a scene when creating an image.  I made a test setup for looking at adjusting the Max Path Length setting under the Optimization tab in the render settings.  The light can't get from the left sphere (the only light emitter) to the right sphere, unless it takes an indirect path.  The Environment is set to Scene Only and Ground off.  The camera headlamp is set off.

The default setting for Max Path Length is "-1" which from what I can tell, allows for the maximum amount of light ray bounces.  In my test images, it made for the most light wrapping around the block to get to the other side.

Max Path Length of 1 results in an all black image, except for the all white sphere on the left.

Max Path Length of 3 shows some light wrapping around, but is is clearly limited in being able to get around the block.

Max Path Length of 5 and above shows a result similar to the result for "-1" which is shown in the image.  There are a few more light rays that get around with a higher MPL, but it is subtle, and you wouldn't notice it without being able to flip between the images.

So, what sort of performance hit does increasing the ray bounces cause?  In 3Delight, there is a huge performance hit for increasing the number of reflections from reflections.

I waited for Iray to reach a number of iterations higher than 300.  I recorded the number of iterations, and the time it took (all images were over 5 minutes to render).  Then I calculated the number of iterations per second (higher is faster).

MPL .... iterations/second ---------- quality

 1 ........... super fast ----------- very very bad
 3 ........... 1.02 ------------------ decent
 5 ........... 0.97 ------------------ good
 7 ........... 0.97 ------------------ good
 9 ........... 0.96 ------------------ good
11 .......... 0.98 ------------------ good
-1 .......... 0.97 ------------------ good (the best quality)

Now, there is some error in my measurement, due to trying to read the iteration number, and time at the same time, and I did do a bit of web surfing while waiting for the renders, so really anything with MPL of 5 or higher took essentially the same amount of time.  And was only about 5% slower than the inferior MPL 3 image.

Now this scene is very simple, and there may be more of a performance hit for a more complex scene, but I would recommend leaving Max Path Length at the default setting of -1 which gives the best image quality, and surprisingly is not noticeably slower than the other settings.
Image size
800x800px 1010.54 KB
Comments20
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
LenioTG's avatar
LenioTGHobbyist Digital Artist
Thanks! :D
jackaroo47's avatar
jackaroo47Hobbyist Digital Artist
I never stop learning..Nod 
takezo3001's avatar
takezo3001Student General Artist
Too bad I have an AMD GPU...
demontroll's avatar
Next time you buy a graphics card, whenever that time may be, get a Nvidia card to take advantage of Iray.  Nvidia made Iray, so they make Iray for free, but then you need their cards to fully utilize it.

You can get results with just CPU, but it takes a while, or takes some tricks.
SaulPaul's avatar
Hey, do you know any of those tricks? I've been struggling lately with optimizing my iray renders. I've never used this engine before and i don't have nvidia card so my renders take literally ages. If you know some good tips to lower the time of render or know some site with such tricks, could you share it with us?
demontroll's avatar
One trick is to render the image much larger, and then use post work to scale it back down.  So if you want a 1500x1500 image, render it at 3000x3000.  It will be grainy, but in postwork give it a 1 pixel radius Gaussian blur, and then scale it down to 1500x1500.

Another trick is to render the whole scene to OK quality.  Then go back and use the spot render tool (set to New Window in tool settings) to render the important parts at a higher quality.  Since it is working on a smaller area, it goes a lot faster.

Brightly lit scenes with light coming from multiple directions will render to a higher quality faster.

Finally, just accept that your work is going to have graininess to it, cause you don't have the Nvidia card.
SaulPaul's avatar
Thank you very much sir. I'm gonna try these :D
Lyrnetu's avatar
LyrnetuHobbyist Digital Artist
I've been lurking all the tutorials I can find on Iray renders and this one filled in a blank. Thank you DT!!!
Belcris's avatar
BelcrisHobbyist General Artist
Very cool, you just answered a question I've had all day.  Thanks!
aaron572's avatar
aaron572Hobbyist Digital Artist
Thank you for doing the research, very helpful.
Lingster's avatar
LingsterHobbyist Digital Artist
Thanks for the research.
demontroll's avatar
Maybe I should make it mature content?
PerfectPrey4U's avatar
It is subtle, but yes, very sensual ;P
methanbreathinglife's avatar
you can't be too careful with stuff like this. Somebody might complain about those huge balls and naked lines...
popa666's avatar
no symmetry of reflection
demontroll's avatar
The material is set to not reflect, but it does scatter the light that hits it.  The scene is symmetrical, except for one sphere is set to emit light, and the camera is at an angle to show the geometry.

I was going to show a bunch of images showing how the number of light bounces affects the image, but for images with 5+ bounces they were almost identical.  And then, because all the renders for 5 bounces or more rendered in essentially the same amount of time, I recommended using the 'unlimited' bounce setting, as that gives the best quality without a performance hit.
popa666's avatar
sorry my English is very badmatteo (deviantART Co-Founder) 
Even translators :( (Sad) stupid
translate  this  text
demontroll's avatar
Ah.  My text may be too technical for translation.  Even those who speak English natively, may not understand what I was trying to say.
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
©2019 DeviantArt
All Rights reserved