iRay scripts to allow simpler raytracing/faster rendering
Correct me if I'm wrong, but it's my understanding that one of the main reasons photoreal rendering can take so long is because the raytracing has an extremely high number of bounces in order to achieve something that approximates physically accurate light.
The problem with that is, that can really be overkill, especially for animation. In Photoreal mode there appears to be no way to limit ray bounces, and so that only leaves things that drastically make images uglier as the only options for cutting render times (less convergence, less iterations, lower footage resolution). Just speaking for myself, if I think about how many hours and electricity scripts to reduce ray bounces could save me, I can easily justify spending even 30 or more dollars for a product that would give me those options.
Comments
I believe if you change Render Mode to Interactive (Render Settings | Editor) then render times should speed up. I assume this may impact image quality slightly. Also can look at rendering to lower quality then running the image through a Denoiser which can work wonders. Lastly, I believe rendering at twice the resolution but half the iterations may be quicker and then resample image down to the needed size.
BTW, the best site for DAZ scripts is this one: https://sites.google.com/site/mcasualsdazscripts9/home. If there were such a script it might be there.
Photoreal actually has a control that does this exactly. Go to Render Settings > Editor tab > Optimization > Max Path Length and set it away from its default value (-1) and watch what happens when you render. I suggest starting all the way down at 1 and working your way up to really get a grasp for it. I did some testing on this in the past, and it appeared that the default Iray behavior (what it does when this is set to -1) was ~32 23 bounces (see below.) I was able to modify this all the way from 1 bounce (REALLY fast renders) to 250 bounces with corresponding visual differences/changes in overall render times.
ETA: Just re-checked, and I can confirm that the default bounces in Iray is 23 (ie. when Max Path Length = -1.) And that the cutoff value for MPL is 250 (>64 requires disabling limits via the gear icon on the Max Path Length control slider.)
Thank you so much for the lead!
I just did a test render and it seems like MPL 2 is strangely slower than MPL -1. (MPL -1 took 10 minutes and MPL 2 took 13 minutes and 15 seconds)(Also interestingly, MPL2 doesn't seem to obey transparency maps but MPL 3 does)
Does lower MPL values mean higher number of ray bounces?
I'll keep experimenting though!
A value of "-1" is a special flag that tells Iray to use whatever default value it wants (which happens to be 23.) Hence the longer render times. With that exception, larger numbers mean more ray bounces.
23 or 32?
You can adjust all of the settings manually to suit your needs. Don't need to spend any money, don't need any scripts or addons.
From what I understood, a transparent surface, no matter if it's fully transparent or only partially transparent, still uses up one ray in the process.
For an opaque object, light uses 2 rays: the ray coming from the lightsource going to the object, and the bounced ray coming from the object going to the camera.
A transparent surface will need at least 3 rays: the ray coming from the lightsource going to the object, the ray going from the object to the transparent surface, and the ray going from the transparent surface to the camera. Depending on the setup of the scene, the object and the transparent surface may be switched around though, provided the light passes through the transparent surface only once. If the light has to pass through the transparent surface more than once (light->transparent surface->object->transparent surface->camera), it will need at least 4 rays.
Lowering the amount of bounces a ray makes will eventually make the image look kinda plain, as it actually means the surroundings start to have less effect on the overall lighting of the scene. A simple example of what you're leaving out of the render would be: take a completely white painted room. Paint one wall blue. If you then take a photo anywhere within that room, there will be a slight blue tint to the picture, even if the blue wall itself isn't in the picture. But reducing the raylength in iRay, effectively deducts another bounce, so the blue tint caused by the wall can't reach your camera anymore. This affects all kinds of optical effects which you would normally want in a render: reflections, shadows, interference and blending of lights, caustics. On some really simple scenes, you could set the path length as low as 4 with no visible difference from the default setting. On more complex scenes, that same default setting is almost necessary for a decent result.
So, while lowering pathlength can speed up rendertimes tremendously, you'll want to be careful to keep it high enough for the light to maintain some depth.
23. There's a scene I constructed for testing this specifically that I can share here if people are interested in finding out for themselves.
OK, in an earlier post, you said 32, so I thought maybe 23 was a typo. I trust your testing. I don't need to repeat it myself.
I would be interested in that. Thank you all for the education you all have provided.
See attached. The scene itself is just two mirror primitives with an untextured G8F placed between them. The trick is to switch your viewport to Iray liveview, aim a camera (already done for you) at the point in one of the mirrors where the figure's reflections cease unnaturally, and then play around with the value for Max Path Length found in the Draw Settings pane under Optimization. What you (like me) will discover is that setting MPL to 23 gives the same visual result as leaving it at its default value (-1) and that the maximum value you can set it to before further changes have no visual effect is 250. Hence the default Iray behavior is 23 bounces and the max possible is 250.
particularly for animation .. steal the way the old timers did... use a background then just render the animation sets..
I've been doing this a lot because there always seems to be so much that iray does choose to ray trace
----
plus you can can a lot of control over spot lighting.
---
these have a background render which takes a while and in this case does include everything as an aid in placing the later renders
but then I turn off the background set and render the character with a brighter lantern and then render just the lantern at a much lower level and stack them.
the renders without the background take a minute whereas the base one probably took an hour.
---
One thing about this is the simple renders of just a particular object still get the render level of the original .. they're just faster because all the other ray targets are gone.