View Full Version : R13 Physical Renderer - Optimization Tips & Tricks?

03 March 2012, 12:36 PM
Hi everybody,

I know that there have been some threads about the new physical renderer in R13, but I think there isn't one where the various parameters for tuning it are specifically discussed, so maybe we could do it in this one? The Cineversity Live Physical Renderer Optimization ( was an interesting intro, but altough it gives a nice overview on what kind of stuff one could play with and some helpful hints, I still can't quite figure everything out.

Specifically, I have a relatively large and relatively complex outdoor arch viz scene, including vegetation (high poly tree instances, as well as SurfaceSpread'ed grass and bushes). Everything is lit by a physical sun&sky with indirect illumination activated (one bounce is sufficient for my purposes) as well AO, some amount of reflection (windows), transparency (glass balustrades) and a few glossy reflections (some of the facade materials). It will end up as an animation, including of course camera movement (with DOF & MB) as well as light object movement & more extreme light animation (morning/day/evening transitions). Hence the physical renderer: at least from its advertising message, it seems like a project such as mine would be a match made in heaven: stable GI animation, easy net rendering, good antialiasing, DOF/MB, etc...

Now, narrowing down proper settings for my main buildings and their textures was pretty easy - in fact, the adaptive / automatic mode with a shading threshold of 5% and all the other subdivisions set at 2 was all that was needed for it, looks pretty good, minimal noise, great antialiasing performance compared to the standard renderer, and pretty reasonable render times (20-25 minutes per 1080p frame on a Core i7).

However, vegetation in general, and particular the grass areas are a nightmare - especially wide shots are horribly noisy with those standard parameters, as well as taking far longer to render. OK, the latter part is to be expected, after all there is lots of geometry, but the noise is a major issue. And I can't really even eliminate it, at least not without completely moving into render times of many, many hours per frame.

I tried playing with the sampling and shading min/max parameters, especially with giving a greater range between shading min and max, e.g. 0 and 16, and higher sampling threshold since I thougt it will adaptively sample only where needed. This helps a bit, but it still seems to significantly increase render times everywhere, not just in those high-detail, high-geometry areas. And involving the other sampling parameters (i.e. the shadow, AO or indirect illumination ones) make the number of combinations and permutations to try pretty daunting.

Annoyingly enough, the progressive mode converges on a relatively good looking image with a 3 hour / frame limit (at least as far as I can judge from stills, I am now trying an animation to see how it behaves in motion) starting from 0 on every additional sampling parameter (AO/shadows/matte/II). But I can't quite figure out what parameters I should try in the adaptive mode to get the same quality as the 3 hours progressive render and hopefully do it in less time, since the progressive render has, based on what I read, an overhead. Is there a rule of thumb for equivalency?

And as far as I can see, there is no way to override the sampling on a per object basis, is there? The old compositing tag doesn't appear to apply to the physical renderer, or am I missing something very obvious there? Cause I would love to be able to force it to just oversample the grass objects and try leaving everything else alone.

Anyway, thanks in advance for any tips and hints!

03 March 2012, 01:05 PM
Oh yes, just to try and contribute a tip: this is probably obvious for most of you (but wasn't initially to me!), and I guess it applies to the traditional GI engine as well, but I noticed that there are significant (factor of 3) render time savings to be had in the specific case of vegetation by turning off GI illumination generation on their materials.

This does result in more contrast in the foliage (obviously the shadows are stronger), but at least in wide shots, the trade-off is to my eyes more than acceptable, given the time savings.

Simon Wicker
03 March 2012, 01:19 PM
if your trees and shrubs are using alpha mapped textures then you can speed the render up considerably by turning off the 'soft' option in the materials alpha channel.

'soft' has to calculate extra rays to correctly sample the material transparency but in general you should be able to get away with this switched off and simply using pure black and white values in your alpha.

cheers, simon w.

03 March 2012, 03:40 PM
have a read of this

03 March 2012, 12:59 PM
Thanks for the tip Simon, altough in my particular scene it doesn't seem to make a significant difference for some reason. I'll have to test some more and see why that is so.

dataflow, that looks like a nice overview on R13, but unless I missed something, it really doesn't go in-depth on how to tweak the physical renderer parameters - even the included help is more comprehensive, and the tutorial I linked on Cineversity goes even further. But, alas, not far enough, at least for my comprehension level...

Anyway, I guess my main source of frustration is that on a heavy scene like this, it is pretty hard to do iterative renders to find the optimal combination - with scene preparation times of several minutes, even region-of-interest renders take a lot of time, and what's worse, the noiseness one sees in still renders isn't necessarily indicative on how bad or good things look once animated. I guess life isn't fair. :wise:

Getting back to the renderer - I am still guessing that the main trick is to get the sampler to oversample only in the problematic regions, and I am guessing there is no way to provide hints via tags, right?

I think in Vray (which I don't have) there is a trick of using a wide range of min/max antialiasing and let it figure out where what is needed, as well as an additional tag-based oversampling override, but in the case of the physical renderer in C4D, even the standard presets increase the min shading samples together with the max samples, which seems a bit counterintuitive to me in the case of the adaptive sampling mode.

CGTalk Moderation
03 March 2012, 12:59 PM
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.