Page MenuHome

AO, Samples and Alpha Overrides
Needs ReviewPublic

Authored by Tod Baudais (tod_baudais) on May 9 2016, 8:48 PM.


Group Reviewers

This patch allows you to set a constant alpha for shadow and AO rays as well as allow you to override sampling settings per material (number of bounces and number of samples in branched path rendering). The alpha settings can be set for self-shadowing and self-ao only if necessary. The reason for these changes is to make fur (we have lots of furry characters) render faster and smoother and allow us to get the look we needed. By making it a constant setting in the materials, shader lookups were unnecessary and allowed a 4x speed improvement over a shader based solution.

Please find attached one of several patches for Blender and Cycles from Tangent Animation that were implemented for the production of Tangent’s latest film, Run Ozzy Run. It is our hope that these features will make it to the master branch of Blender as we have found that they are necessary for our production environment. You’ll find that these features either decrease render times or allow the director to more easily meet his vision on time and on budget. They are not intended to be accurate or physically correct.

Diff Detail

rC Cycles

Event Timeline

Tod Baudais (tod_baudais) retitled this revision from to AO, Samples and Alpha Overrides.
Tod Baudais (tod_baudais) updated this object.
Tod Baudais (tod_baudais) set the repository for this revision to rC Cycles.

The constant alpha optimization is something that we should do automatically. One of the ideas I wrote in the wiki some years ago is to compiler a separate shader graph optimized for shadow rays.

In such a graph all closure nodes except for the transparent BSDF would be eliminated, and if constant folding does its job all you are left with then is a single node. If evaluating that very small shader still has noticeable overhead, then we can detect that special case and make it use a constant color automatically.

I think it is also possible already to set up a shader in such a way that it evaluates very quickly, by adding a mix closure node at the root and mixing between a transparent BSDF and the full shader, using Is Shadow Ray. For shadow rays it should then only evaluate the mix closure, light path and transparent BSDF nodes and skip the full shader.

For the other options:

  • The self shadow options are things you typically need when you're approximating GI and need to compensate for too much / too little light. Self is also a fairly ill defined concept since a single character can be composed of multiple objects. I rather not start adding these tricks.
  • Per material sample settings I think are a stop gap solution until we have reliable adaptive sampling. The goal should be to reduce the number of sample settings, not increase them. Perhaps a single number of samples multiplier per material could be an ok solution for now, but would rather not add many settings.
  • Per material bounce settings shouldn't be so important if we are using GI and have a reliable working Russian roulette. I'm not really convinced these are good to have as renderer features, limiting ray depth can be done in shaders if it's really necessary.

This production didn't have any bounces turned on so hacks were necessary. The next one will probably have one bounce turned on so any adaptive sampling (etc.) techniques would help us a ton. Is there any timeline for these features?

Sorry, I lost track of this. There's no timeline for these features at the moment, no one is actively working on them right now as far as I know.

Some initial work was done in D808, but if we add this it will probably something that is more closely integrated with the denoising feature that is being worked in this summer, since for best results those should cooperate.

Holy crap.

One thing I'm noticing lately is we have so many good cycles features we can add but someone just thinks is unnecessary or not perfect even though it works it's usable it's needed and cut render times in half or more.

Like scrambling distance and dithered sobol. (We use these every day in production on million dollar jobs) but hey they aren't good enough for the blender devs lol

What happened to experiential mode where we can just shove a bunch of experimental features and let people who need these amazing and absolutely needed features to get real paying work done in blender.