Making of: the piano room

Table of contents

Jump in this page to: optimizations: baking shaders and render times tables, AA render tests or final renders settings.


As I mentioned in the introduction chapter, the project was started in mid 2005, and back then, I was using C4D R9 and I was thinking of rendering the image with AR. But, because I didn't work on it then, I changed my mind. So, in mid 2007 when I resumed the project, I was using C4D R10 and I thought of giving Vray a try. I dedicated a lot of time to work on the project and I managed to get it almost done in the spring of 2009. But, I was using C4D R10 32 bits version and VrayforC4D 1.0. This prevented me from completing the project, because I reached the memory limit of 32 bits and I was encountering random crashes during long renders. In the end, the project was finalized in C4D R11 and VrayforC4D 1.1, on 64 bits. This slowed down the whole project. In early spring of 2009, I could have rendered the finals, but only in August 2009 I managed to do so.

Optimizations: baking shaders and render times tables

The scene, as you can already tell, is very complex and it did become a hurdle to manage. For the objects I modeled, I did my best to take into consideration the final output resolution and the perspectives from which it will be rendered. As such, the polygon count is moderate. Although, I didn't make any compromises in terms of polygon count. The highest amount of polygons is concentrated on the macramé (1,8 millions polygons) and on the flowers (840 873 polygons). In total, the scene has 4,24 millions of polygons and 2560 (9845) of objects. During render time, the application uses about 4 to 6 Gb of memory. Another fact is that I got 223 different materials in C4D and 136 texture image files totaling 1,85 Gb). The following wire-frames are more illustrative in terms of polygons density:

Wireframe: Piano room POV 1 Wireframe: Piano room POV 2 Wireframe: Piano room POV 3

The big culprits of the scene were, in the early stages, the memory usage and, in the final stages, the render times. To optimize the memory usage, I converted all the gray-scale images which were stored as PNG or PSD, in RGB mode to gray-scale texture files in TIFF format. This solution was very good for the situation at that time, because I was using C4D in 32 bits. It saved me about 300 mb of memory usage.

Because I did very complex shaders and perhaps, exaggeratedly detailed, the render times, as the scene evolved, increased a lot, yet this was progressively happening so I did not notice this. At the end, when I had finished most of the scene, it was rather too late to rework all shaders.

Initially, all the shaders were not baked. I've been informed that baking shaders helps a lot. So, I baked the bump maps of the most important objects: the room walls, including ceiling, the carpet and the armchair covers. I also baked the SPD shaders for the carpet and for the wall painting frame. Baking of all these shaders helped a lot, because during render time, the CPU was better utilized. Before I baked the shaders, Vray was not fully utilizing the CPU cores. In synthetic renders (e.g. just the walls and the floor) the render times dropped by approximately 50%, but I never actually did complete render tests for comparisons. As I noticed, the render times were reduced by 10-25%. Here's the table of render times I did when I baked the bump maps, on Saturday, 14 March 2009:

Render time comparisions for bump maps. Resolution: approximately 510 x 350 pixels. All these tests were done with the 3D room empty, only walls visible, and Global DMC Sampler subdivisions set to 1.

Test details With bump maps Baked bump maps No bump maps
Test 1 7m 05s 2m 47s 2m 49s
Test 2:
LC 500, IR map 1 prepass,
GI - very low quality preset
20m 17s 9m 18s 8m 43s
Test 3:
LC 800, IR map 3 prepasses,
GI - medium quality preset
34m 40s 17m 8s 15m 38s
Test 4:
LC 800, IR map 2 prepasses,
GI - medium quality preset,
Global DMC subdivisions multiplier: 3
59m 56s 29m 26s 26m 55s
Test 5 (complete room):
LC 800, IR map 2 prepasses,
GI - medium quality preset
LC in 23m 39s,
All the passes were canceled, too long
LC in 17m 38s,
IR map in 44m 38s
Total render time: 1h 15m 51s

Keep in mind that even if the results seem very good, they are not representative for the overall impact on the render times when all objects are visible. As such, I consider these as being synthetic tests and that they are far from accurate.

Another thing which helped was to increase the dynamic memory limit in the render settings of Vray. I have 8 Gb of physical memory and until then, C4D was crashing unexpectedly during render times. This little aspect, prevented me from doing the final renders in early spring of 2009. Since I changed the value of this setting from 400 mb to 4000 mb, I don't encounter anymore crashes during renders.

I've studied quite a lot what slows down heavily my renders and I concluded that it is the reflections and the bump maps. The shaders I have in those channels are too complex, thus they require too much sampling and almost all my materials use at least one specularity channel for dim reflections. The following comparison table of render times illustrates this:

Render time comparisions with different rendering features. These were done on the 1st of August 2009. Resolution: 476 x 384 pixels, armchairs - POV 2. Render settings: GI - very low quality preset, AA DMC 1/2:

SPD Bump maps Bump shadows Reflections Glossy effects Render time
NO NO NO YES YES 29m 28s
NO NO NO YES NO 25m 5s
NO NO NO NO NO 12m 48s

Despite the fact that SPD, bump map shadows and glossy effects have a minor impact on the overall render time, it needs to be mentioned that these features have a greater impact on the render times as the resolution increases, or as the AA and GI quality settings are increased.

I tried to optimize the render time by using a light portal for the big windows found in the room. But, this is not a solution, the rendering time is a bit slower and the image gets noisy. I could clear the noise, but at a great expense in terms of render time. I thought I'd complicate things even more with it, so I dropped this idea. Here's a test render comparison and the render times:

Physical sky and Light portal render comparison

Only one issue wasn't solved in the end: the enormous render times. Even if I baked the most important shaders in the scene, I didn't manage to cut down the render times by 50% or more. On my PC, Core 2 Duo E6700, I calculated that one final render would take several months. The final images were rendered on an Intel Xeon 5420 dual quad-core, 2,5 Ghz with 12 mb cache and 12 mb of RAM. Thanks a lot to Giel-Jan Wijns for doing the renders. Each render took 6 days to finish.

I cached 1,27 Gb of GI solutions for the finals renders (538 mb), ambient occlusion passes (197 mb), clay renders (255 mb) and sunlight passes (315 mb). Most of the renders were done with SPD enabled to make sure the results will fit with the final renders.

Anti-aliasing render tests

I also tested extensively the different AA methods. I did my best to pick the one that is not too slow and looked good enough for me.

The first AA tests I present you here are done with GI set to the medium quality preset of Vray 1.1, LC 950 and the Global DMC Sampler subdivisions multiplier was set to 1. These tests were done on the 4th of April 2009:

AA methods comparisions

AA type LC + IR render time Total render time
DMC min. / max. rate: 1/4 3m 20s 7m 25s
DMC min. / max. rate: 1/4
GI cached: Global DMC Sampler subdivisions multiplier: 1
no GI cache: Global DMC Sampler subdivisions multiplier: 5
3m 20s (GI cached)
7m 38s (no GI cache)
17m 20s (GI cached)
23m 45s (no GI cache)
Adaptive min. / max. rate: -1/2 3m 21s 16m 25s
Adaptive min. / max. rate: -1/3 3m 20s 31m 26s
DMC min. / max. rate: 1/6
GI cached: Global DMC Sampler subdivisions multiplier: 1
Global DMC Sampler subdivisions multiplier: 5
3m 22s 27m 32s

At some point I was annoyed by the level of noise in the reflections and specularities of the objects. So, I decided to study the relationship between the different AA methods, AA rates and reflections subdivisions. The following image presents some of the tests I did on 6th of April 2009:

AA methods comparisions - multiple renders with a 3D gerbera

Working on the flowers, I observed that the different AA methods influence how the highlights of the petals look like. With my preferred AA method, the DMC sampler, the pink highlights were greatly diminished:

AA methods comparisions - the petals highlights

When VrayforC4D 1.1 was released, I decided to test it and see how fast it renders against v1.087. I tested again the AA algorithms. If you are curious, look at this image I did on April 22, 2009:

AA methods comparisions - the armchairs

Final renders settings

GI set to very high quality preset:

  • Irradiance map, min. / max. rate: -3 / -1
  • Hemispheric subdivisions: 110
  • Interpolated samples: 50
  • Intensity / Normal / Distance thresholds: 0.2 / 0.1 / 0.5
  • Light-cache samples: 2500


  • DMC subdivision, min. / max. rate: 1/16
  • Threshold: 0.001
  • No AA filter

DMC sampler:

  • Adaptive: 0.75
  • Minimum samples: 12
  • Noise threshold: 0.002

Colour mapping settings: Reinhard mode. Multiplier: 2.25 - 2.7, Burn: 0.2, Gamma: 2.2.

Next page: Post-processing

Previous page: Light setup