View Full Version : AA problem in Dark areas

03-20-2009, 04:04 PM
I'm having an issue with the AA in dark areas not being applied. The scene is using radiosity and also uses DOF and MB. The blur created in the shadowed areas are not being sampled. Looks ok until you gamma correct the image and then woah...looks awful. I can partly compensate by disable AS and use MASSIVE AA setting (like 50 so far) and the render times really start increasing.

Has anybody else run into this problem, if so whats the word on getting the AS system to find the "dark areas" so I don't have to run massive AA (overkill on most of the scenes).


03-20-2009, 04:47 PM
You're not the only one, and there isn't really a good solution until NT implements the feature request for a gamma-sensitive adaptive AA.

03-21-2009, 12:36 AM
I have found that just brut force AA in a lot of situations is quicker, & if you need to do a high number of AA to fix a problem you need to double the number plus the original. 5, 9, 17, 33, 65, 129 passes etc.

I feel one gets a lot better result with 33 than say 25. You may not get that much better results with 50 instead of 33, but if 50 is still borderline for the quality, then try 65.

Or if you have a problem in one area of a still image, do the whole image at say 9 & a patch or two at a higher AA for the area/s with a problem.

Eg. below: the out of focus leaves had AA of 65 & 129. It would have taken forever if I did 129 for the whole image.

03-23-2009, 07:37 AM
I see. This is for an animation which makes it a bit more difficult to multipass and composite (with the time I have to turn it around anyway). I suppose I better just get used to the idea.

03-23-2009, 10:55 AM
A trick is to switch to Classic Camera and apply the gamma correction to pixel level, before AA, mblur and other optical effects be added. We can do this with DP Pixel Filter Node Editor or G2. Just be sure to add dof, glares, etc, before the gamma correction - if you are adding these effects within LW.


03-23-2009, 11:37 AM
Hmmmm interesting. Can you elaborate? Perhaps a simple tree.

03-23-2009, 12:55 PM
Sure. The basic tree is pretty simple (only 2 nodes):

After switching to Classic Camera, add a Pixel Filter Node Editor, then add the RenderBufer node and plug the final Color output to a gamma correction node. It can be SG_CCNode, Aurora's Gamma Correction, Michael Wolf's Simple Colour Corrector or your own gamma correction config.

It's a similar setup to the Inverse Linear Workflow described here:


But since you have already linearized all colors and textures, you need to gamma-encode, not gamma-decode the color output. You might want to try other linear workflows described there, maybe.

A way to add a glare effect is by blurring the final Color output and increasing its contrast. Then, mix this in screen or additive mode with the final color output again - before the gamma correction. I share a similar setup here (second image of that post):


There, I used Michael Wolf's Simple Colour Corrector for adjusting the glare threshold and the blur node from Denis Pontonnier for the glow effect.

Similar node setups has beeen used for achieving some of the glare effects in these 'looks' as well:


If you are solving the Dof effect within LW with the Pixel FIlter Node Editor or with x-Dof perhaps, we need to add it before the gamma correction in order to get the appropriate bokeh effect.


03-23-2009, 03:06 PM
Thanks a bunch! I just wish this would work with the advanced cameras. Previously I was trying this with the perspective camera so no wonder it wasn't working before.

I do most of my effects in post but DOF is one that I have much difficulty working. The quality is eluding me unless I do it in LW. Always lots of artifacts on edges where you can see non blurred distant objects next to the closer ones.

03-23-2009, 04:11 PM
Well, the trick works out also with advanced cameras (it's just that the Classic Camera offers better AA). If you want gamma correction before AA for advanced cameras, set up the number of passes as mBlur passes (not in the AA field) - consider however AS is applied after gamma correction.

And yea, I know what you mean about dof in post. A way to solve it is by rendering the occluded objects in separate passes. XDof makes a great job in LW, btw. I'll share a nodal config for dof barely I have some time :)


03-24-2009, 09:27 AM
I sure appreciate all the help. I still haven't been able to get AS to come in after the gamma correction using the renderbuffer>SG>pixel filter NE. Doing multiple passes with MB works fine but pretty much no better than just adding the same multiples to the initial AA pass (ie. 3 passes at 2 or just 6 look the same). If I boost the light or ambient light so that the shadowed areas are much brighter the AS works like it should seems to be independent of any node settings.

Thanks man.

03-24-2009, 11:43 AM
Really sorry, I did mean - consider however AS is applied BEFORE (pevious to - not after) gamma correction. The mBlur passes and AA are applied before gamma correction, but AS doesn't, and higher AA levels might be necessary in that case - which doesn't mean higher render times in all cases.

Increasing the ambient light could solve the problem but you'll need to correct the blacks in post and colors will be affected too. Eventually, you might want to try the other linear workflow setups linked in the previous post, maybe.

Bassically they work in gamma encoded space and the gamma correction is applied at the end (using DP Pixel Filter NE for the inverse linear workflow and DP Image Filter NE for the multipass linear workflow). The only consideration is to use simple inverse distance falloff to mimic the inverse square distance falloff from the classic linear workflow.

They are not physically accurate, but results could be pretty similar as we can see there.


03-26-2009, 08:24 AM
Well, after a day of experimenting with settings it really looks like standard AA does not benefit from pre AA gamma correction at least as far as my DOF situation goes. I tried comparing multi mblur pass style with gamma correction pixel filter vs single pass higher AA settings with FPgamma image filter and they both look identical in terms of AA quality on blurry items in dark areas.

Whats the solution? I am thinking that the only way to really fix this is to revamp the AS system (maybe in Core?) so that it works with color/gamma correction and maybe an upper limit setting. I am hoping you get a chance to post that node based DOF, I'm really intersted. I appreciate ya.

03-27-2009, 09:34 AM
theres always the good ol trick of rendering at double your target resolution, and not doing any AA... then when you downscale in coposite, your entire image gets AAd after your adjustments.

has worked for me before when ive had AA or noisy shadow issues, and couldnt expend the extra time to get it smooth in render.