Home Marmoset

Mini-Tutorial | How to reduce banding in exported renders

I've seen banding in the backgrounds in a lot of Toolbag 2 renders, so I figured I would write a short post explaining why it happens and how to fix it.

First off, the underlying issue is a problem of bit-depth, there simply isn't enough values in an 8-bit image to represent a perfectly smooth gradient. The effect of this is amplified if you have a low contrast or flat color background, and a low contrast vignette.

To solve the banding/bit-depth issue, some sort of dithering needs to happen. Dithering is basically adding some noise so to break up the pattern and avoid the typical stair-stepping effect. In Toolbag 2 we do this by default by setting the grain value in the camera post effect options to 0.04, this adds a very small amount of noise that helps to dither the render. A bit of noise also helps to generally make renders look more natural, and at the default setting its such a small amount that it shouldn't make a noticeable difference to your actual model.

Here are some comparison images in PNG format:
banding01.png

First off, is a standard 8-bit image with the grain effect turned off. You can see the nasty stair stepping effect clearly here.

Secondly we have an image exported at 16bit, and then down converted to 8-bit in photoshop, which should do some dithering in the conversion. This helps a small amount, however it isn't enough with a subtle vignette like we have here.

Lastly, we have an 8-bit image with grain on at the default value of 0.04. This looks much, much better with no visible banding. There is a small amount of noise visible in the background, however this is very much preferable to the alternative (nasty banding artifacts).

We realize it may be a little confusing that grain effect is essentially required to get the best quality renders, so we may look into doing some sort of dithering that is not tied to the grain effect.

Here is the same image, but jpeg(quality 9) this time:
banding01.jpg

With the above, simply saving the image as a jpeg ruins the quality of subtle gradients as well, even when we dither the source content.

For a further look at jpeg quality:
1. Quality 8: https://dl.dropboxusercontent.com/u/499159/bandingjpeg08.jpg
2. Quality 9: https://dl.dropboxusercontent.com/u/499159/bandingjpeg09.jpg
3. Quality 10: https://dl.dropboxusercontent.com/u/499159/bandingjpeg10.jpg
4. Quality 11: https://dl.dropboxusercontent.com/u/499159/bandingjpeg11.jpg
5. Quality 12: https://dl.dropboxusercontent.com/u/499159/bandingjpeg12.jpg
6. PNG: https://dl.dropboxusercontent.com/u/499159/bandingpng.png

Quality 11 or 12 start to look near as good as PNG. Its worth noting that at Jpeg 12, the file is still 1/4th the size of the PNG.

TL;DR: JPEGS suck and a little bit of grain goes a long way!

Thanks to Ryan for letting me use his little alien dude, check out more of his work on his folio here: http://www.ryan-jackson.net/website/

Replies

Sign In or Register to comment.