Banding artifacts caused by post processing?

When I crank up the gamma a bit, i start to notice banding in the image more and more. Is there a way to fix that?

Or perhaps, can someone explain why is this happening? I would have thought unreal processed stuff in a high dynamic range so i don’t understand why I am getting banding.

Here is a picture of the issue.

bump

Is your color space set to sRGB in your project settings?

Are your textures set to sRGB (should be ticked to true)

Looks like almost 8 bit color space.

What operations are you doing in the post processing? Are you using a post processing material to modify the image output at runtime?

yes the project settings are set to default srgb space. The banding appears in the lighting, even on untextured objects.
In the post processing volume, I set the gamma setting to a fairly extreme value of around 0.5, in order to explemplify the issue.

Not seeing this on gamma 0.5 on 5.4 (0,5 is under exposure so it won’t show materials a 100% correctly anyway, they will be much darker than intended)


Here is what it looks like with textures on the default settings with gamma set to 0.5

a) What version of the engine are you on?
b) Which gamma parameter are you setting?

  • Global
  • Shadows
  • Midtones

c) Which RHI are you using

  • DX11
  • DX12
  • Vulkan

d) Which shader model are you using?

  • SM5
  • SM6

e) What type of rendering are you using

Maybe the answers to the following questions might help narrow down the problem.

Also what are your color settings on your monitor output (color bit depth)

Do you have tonemapper enabled in the viewport?

You can also try to disable tonemapping with the commands in this thread

(last 2 posts mention a fix)

Thankyou for the detailed reply, ive been going through checking everything and I think I found the issue! I had a material ambient occlusion effect in my shader. it seems having very smooth gradients in material ambient occlusion can cause this banding effect in the lighting.


if I remove the material ambient occlusion, the banding disappears.

If it a post processing material then perhaps the order of execution could be causing this (blendable location)

Inside of the post process material

obraz

You can try different methods like

  • Replace Tonemapping
  • After Tonemapping (default)

Maybe your post process instead of replacing the tone mapping is adding to it making it look muddy?

I have no post processing material, im starting to think this is just the way unreal is with material ambient occlusion and cranked up gamma.

Ok so it’s a newer feature, thought you meant mixing in an ambient occlusion sample with the post processing inside of a post proc material. Will check if I can duplicate the banding with the material ao turned on.

edit:
Not really seeing the banding even with static lighting turned off.

I can get similar visuals if I mess with the film setting inside of the post process.

I only get slight shadow artifacts on textured objects if using virtual shadow maps.

I had all the fancy lighting features turned off (lumen/df gi/ virtual shadow maps etc).

I think the setup has to be quite specific to see the banding. Youd need a certain amount of skylighting, and a (non shadow casting) point light, and a smooth AO gradient in the mesh material.

I could setup an example scene if anyone is really interested.

Perhaps the AO gradient is getting crushed in the compression process for the texture map?

Does it look ok when opening up the texture in the editor, is banding visible there too? (does it look choppy instead of smooth)

Mipmaps could also be causing a reduction in texture quality at a distance as well as texture streaming (it can load in a lower version of the texture map).

I also thought maybe it was a texture compression issue, so what I did was I put the ao through the “vertex inteprolator” node, which should in theory create a smooth and very high precision gradient, however the banding was still present.

edit: on closer inspection, the material ambient occlusion was just making the issue more pronounced. The banding is still there when there is no material AO.

Perhaps this might of some help in reducing the color banding.

Also maybe your gradients are just too dark?

You could use the dither aa node to break up your gradient like this

Comparison:

No Dither node

Dither node

Just like in the video dithering can help break up the banding.

This method of adding noise/dithering works only for situations where banding is caused the limited 8 bit nature of a computer display. In my case the banding is not caused by that. In my case the banding is due to the way unreal does lighting/post processing, not due to my display being unable to represent the colours unreal has calculated.

Does moving up from low scalability video settings change the visuals reducing banding?

It does not. I think you are right that dithering could help, particularly on ao gradients, but it wont fix it, as even without ao gradients, there is still some banding.

The banding is probably happening because you are going from a bright light to near pitch black.
Your shadows do look very strange though in the orange scene, like they are already being dithered or changed by anti aliasing.

On another area where the problem may be, have you tried checking your graphics driver settings? Perhaps you overrode a specific hardware setting that is causing the graphics card to be limited in some way. You could try maybe resetting them to default and seeing if it changes.

Does this happen on other pc’s? Have you had the chance to send someone a demo level to see if it’s just your pc settings?

Trying to recreate it, some dithering occurs but it’s inevitable with the jump from bright lights to darkness.

Thankyou for testing this, ive been investigating more and I have finally found the source of issue!

I have been viewing the world through a custom fog setup/shader. It uses the “scenecolor” node to represent the unfogged parts of the scene, and this is where the problem comes from.
image.
For some reason, when you view the world through the “sceneColor”, you will see this banding effect.

This is a before and after switching my fog setup off.


Congratulations on narrowing it down :slight_smile: So maybe setting the tonemapping options for the custom fog might resolve it?

Ah its a pretty customized setup, it wasnt a post process sahder. It was basically a unlit transparent shader applied to a cube with zdepth testing turned off. I lerped between scenecolor and a fogcolor derived from the “skyEnvMapSample” node.
I fixed the issue by using the shader Opacity input instead of lerping into the “SceneColor” node.

1 Like