Optimising Render Settings in DAZ|Studio


Note: This tutorial was written for version 2 of D|S. There are now even more render settings to tweak in more recent versions. I'm leaving this tutorial online as it has been very popular, but it's unlikely it will be updated. All the information presented here is still valid for the current version of D|S.


One of the biggest mistakes people who are new to 3D make is to turn up all the render options to maximum, thinking this will guarantee the highest quality output. This is true up to a point, but then we hit the law of diminishing returns, where the output quality just doesn't justify the often extraordinarily long render times. Many people seem to complain about long render times in DAZ|Studio without actually thinking about how hard they're making the renderer work. This article will show you how to reduce your render times and maintain high image quality. It will examine each option in the advanced render settings tab in Studio to obtain a deeper understanding of how  they affect render quality and speed. The screenshots and render settings referred to here are from version 2.0, although they'll be relevant for versions at least as far back as 1.8. I'm assuming you know how to navigate your way around Studio.



Figure 1


At the top are the Render Engine options. Obviously Use Software should be the selected option here, as we're not interested in low rent OpenGL renders. We want the full monty 3Delight stuff.


Bucket Order doesn't matter. It just dictates how the rendered image is presented on screen.


Bucket Size is the size of the squares, in pixels, that are rendered to screen at once. A bucket size of 32 will cause the renderer to evaluate an area of 32 x 32 pixels and then display it, before moving on to evaluate the next 32 x 32 pixel chunk of the image. Larger buckets take up more memory but can be slightly quicker to render. 32 is a good compromise size. If you have a very resource intensive scene with multiple characters and dozens of texture maps and are having trouble getting the thing to render, try lowering the bucket size to 16, or even 8.


Max Ray Trace Depth seems to cause all sorts of confusion for new users. Without getting too far into the technical details, this setting determines how many times you want light reflected off reflective surfaces. In the real world, objects can be reflected infinitely, as in the case of two mirrors facing each other. If this was allowed to happen in the 3D world, the renderer would get stuck in an infinite loop and never complete the image. This setting tells the renderer to calculate x number of ray bounces for reflective objects and then stop. Low settings will render faster, because of the smaller number of calculations being done, but higher settings will be more accurate. Let's look at some examples, starting with Figure 2.



Figure 2


Rendering with Max Ray Trace Depth set to 0 took 35 seconds, but there's no reflections. At least we know this setting actually has an effect on the image.
I'm using ray traced shadows from a Distant Light for all these examples. Now let's look at Figure 3 where we have enabled reflections by setting Max Ray Trace Depth to something above 0.



Figure 3


This is my version of the cliched old reflective spheres on a plane. It's very 1991, don't you think? Every object in this scene is reflective, so we have reflective objects reflecting other reflective objects, a potentially nasty situation. This was rendered with Max Ray Trace Depth set to 1 and took 2 minutes 16 to render. As you can see, it's hardly impressive. The lack of ray traced bounces does not allow the renderer to take into account all the reflective surfaces. Instead we have what appear to be shadows under the spheres, but they are not shadows at all. They are supposed to be reflections. You'll also notice that the sphere reflections on the spheres themselves are just black blobs. So, obviously in this case, 1 ray bounce is nowhere near enough. Let's try 2 bounces. See Figure 4.



Figure 4


This took 2 minutes 49 to render and looks much better. We now have the sphere reflections on the plane and what were just black blobs on the spheres now have some detail. We can do better though. Figure 5 shows the result of setting Max Ray Trace Depth to 3.



Figure 5


We're almost there, but not quite. Let's go one more and set Max Ray Trace Depth to 4 and have a look at Figure 6.



Figure 6


This took 2 minutes 54 to render. We've gone from a render time of 2:16 to 2:54, an increase of about 28%, but we now have accurate reflections. I won't bore you with any more renders of this scene, but I will note that setting Max Ray Trace Depth in this scene to anywhere between 5 and 16 made absolutely no difference to the quality of the reflections. So we can see from this little experiment that ray tracing reflections is an expensive operation in terms of rendering speed. It doesn't mean you shouldn't do it, just that you need to be aware of how it affects render time.


If I had just been rendering one chrome sphere on an ordinary, non reflective plane, 1 ray bounce would have been sufficient to capture the reflection of the plane in the sphere. It's all about horses for courses and setting up your renders for maximum efficiency. Why waste clock cycles just for the sake of it?


As a general rule of thumb, setting Max Ray Trace Depth to 4 will take care of most scene requirements. There is, however, no one size fits all setting for anything in 3D, so you should always do smaller test renders to evaluate how things are looking before committing to the final render.


One other item worth mentioning with regards to Max Ray Trace Depth is that for transparency mapped objects, such as hair, it has no effect on render time. See Figure 7.



Figure 7


This was rendered with Max Ray Trace Depth set to 0, yet we still see the effect of the transparency map on the hair and it is casting correct shadows onto the face. Setting Max Ray Trace Depth to any number above 0 resulted in the same render time, so if you are not ray tracing reflections or refraction anywhere in the scene, this setting will have no effect on render times.


Now we move on to Pixel Samples X and Y. These control the antialiasing of the render. Aliasing is the presence of artifacts caused by lines that are seen diagonally. Because pixels are square, a line seen diagonally shows stair stepping, or aliasing. Antialiasing is the process of smoothing out these stair step artifacts.

Figure 8 shows Pixel Samples set to 1.



Figure 8


Obviously this is unusable. Not enough samples are being calculated to smooth things out. Compare this with Figure 7, which was rendered with 4 samples in X and Y. Changing Pixel Samples from 4 to 8 increased render time by 10%. I changed the image size to 1600 x 1200 and re-rendered with 4 and then 8 samples. Even at this larger size, going from 4 to 8 samples still only increased render time by 10%. The really interesting thing here is that there appears to be no visible difference in the quality of the antialiasing. Figure 9 shows a full sized section of each render. See if you can tell which used 4 samples and which used 8.



Figure 9


The left image  was rendered at 4 samples, the right one 8. So it seems that there is not much point going over 4 samples. Figure 10 shows the result of taking the settings down to 2 and 3 samples.



Figure 10


The left image  was rendered at 2 samples, the right one 3. There is a noticeable difference here on the edges of the dress, where it runs down from the shoulder. So, 2 samples is obviously a bit low. The right image with 3 samples doesn't look too bad, but there are still some signs of aliasing on the dress edges, although admittedly these are minor. I should note here that setting X and Y samples to the same value seems to be the order of the day, as lowering one compared to the other doesn't seem to produce very satisfactory results.

Finally we come to Shadow Samples. This is where we determine the size of the shadow map when we are using Deep Shadow Maps. Shadow mapping is a similar procedure to that used to calculate which areas of a scene are hidden from the camera's view by objects. Instead of calculating from the camera's point of view, the renderer calculates which objects are hidden from the light's view. Areas that are hidden will be in shadow. Shadow mapped shadows are not as accurate as ray traced shadows, but render much faster and have soft edges. Shadow maps are calculated before the render begins, unlike ray traced shadows, where brute force shadow calculations are run at render time. The shadow map is held in memory, while ray tracing shadows does not consume memory.


Too low a setting for Shadow Samples will result in pixellated, rough looking shadows. Increasing the samples will smooth out the edges of the shadows, but at the expense of increased memory usage. Setting the samples too high can quickly eat up memory, especially if you have multiple shadow mapped lights. As always in 3D, you trade off one thing for another.


OK, let's see the worst first. Figure 11 shows the result of setting Shadow Samples to 1 on a Distant Light.



Figure 11


Render time: 51 seconds. That's pretty awful, so let's try 8 samples. See Figure 12.



Figure 12


Render time: 55 seconds. That's better, but the shadow on the wall is still pretty grainy. Let's go all the way to 32 samples. See Figure 13.



Figure 13


Render time: 1 minute 09. That looks considerably better but the shadows from the dress strap are very indistinct, almost non-existent. This illustrates the problem with using shadow maps on Distant Lights. A Distant Light emits an infinite wall of parallel light beams across the scene. A shadow map can't possibly cover that amount of real estate and be accurate. This is why when you render a large outdoor scene, shadows can all but disappear, because the shadow map is spread so thinly across a huge area. For large outdoor renders, ray traced Distant Lights are still the best solution.


Now let's change the light to a spot and re-render. I used the default spread angle of 60 degrees. Figures 14 and 15 show the results of 8 and 32 shadow samples respectively. I'm not going to bother with anything less that 8 samples, as I find anything less than this is still too grainy.



Figure 14


Render time: 59 seconds.



Figure 15


Render time: 1 minute 13.


Finally, I reduced the spread angle of the spot to 40 and re-rendered at 8 and 32 samples.



Figure 16


Render time: 1 minute 04.



Figure 17


Render time: 1 minute 16.


Reducing the spread angle of the spot reduces the area the shadow map has to cover and allows finer grained detail in the shadows. Compare the hair shadows on the face to see the difference. We still have our nice soft shadows on the wall but the shadows from the dress strap are now defined better. I leave it up to you to decide which one you like more.

One final example needs to be looked at before we wrap up and that's using Shadow Samples with ray traced lights. Figure 18 shows a Distant Light set to use 1 Shadow Sample with ray traced shadows. Max Ray Trace depth is set to 0.



Figure 18


Render time: 1 minute 23. The shadows exhibit some minor coarseness around the edges. Figure 19 shows Shadow Samples increased to 2.



Figure 19


Render time: 1 minute 56. The shadow edges have improved and look good. Figure 20 shows Shadow Samples increased to 32.



Figure 20

Render time: 14 minutes 53. There is absolutely no improvement in image quality, yet render time has blown out by 770% compared to Figure 19. This almost seems like a bug, until we realise that Shadow Samples become more relevant when we want to ray trace soft shadows. I would have liked to see this available as a setting on a per light basis for ray traced lights, rather than as a global setting. I'll let you experiment with ray traced soft shadows on your own. Try a Shadow Softness setting of 2.0 to start with, then go and mow your lawn, wash your car and walk your dog. It'll take a while. You'll also need a high setting for Shadow Samples to obtain reasonable results.


Well, hopefully all this has given you something to chew on regarding render times in Studio.
Ray tracing anything is an expensive operation, but the results can be well worth it. Just keep an eye on those settings.