Banding occurs as a result of the inability to accurately represent the required colors within the given number of bits per pixel. Within VR, banding manifests itself as distinct bands of colors that are marked by abrupt changes between each band.
The bands are most apparent within VR as the user is immersed within the scene. Therefore, their eyes adjust to the light levels within the scene. When the eyes have become adjusted, the bands are even more apparent. If there are many bands, then the eyes are constantly adjusting to the changing light levels, which can also become physically tiring.
Mitigation technique - dithering
Dithering is the process of introducing noise either to the banding material or to the viewer. Through this process, the distinct bands of color are broken up and disrupted therefore they are no longer so distinct.
There are many variations of dithering which can be introduced, each of which either apply a different form of noise, or take a different approach to gathering the noise which is applied. For example, generating noise in real time, while others sample noise from a texture crafted to contain random noise.
Mitigation technique - tonemapping
Tonemapping is a subset of color grading that transforms High Dynamic Range (HDR) colors so that they fit within the Low Dynamic Range (LDR) that is suitable for displaying on non HDR-capable screens. Tonemapping uses a Look Up Table (LUT) so that each color is mapped to the appropriate corresponding color for the new tone.
Any low lighting levels or sharp gradients in textures that are causing banding can be reduced by applying tonemapping to the scene.
Implementing dithering in Unity
Dithering in Unity is often done through the Post Processing package, which must be added and setup. Alternatively, there is an effect that is built into the camera in the Universal Render Pipeline.
To enable dithering:
- In Window, then Package Manager, search for Post Processing and install the package. Make sure that it is version 2.x that you are using.
- Create a Post Processing Profile in the Project Window, by right-clicking in the Project Window.
- Under Create, choose Post-processing Profile.
- From within the Inspector for a camera, add a Post Process Volume and a Post Process Layer component to each camera in the scene that requires dithering.
- Finally, from within the Post Processing Volume, set the created Post Processing Profile as the Profile.
As shown in the following screenshot, in Universal Render Pipeline in Unity, you can enable dithering in a camera:
- In the Inspector window for the Camera in the rendering section, tick the Post-Processing box.
- Tick the Dithering box below it.
Implementing tonemapping in Unity
Tonemapping in Unity requires the installation and setup of the Post Processing package.
To enable tonemapping:
- In Window then Package Manager, search for Post Processing, and install the package. Make sure that it is version 2.x that you are using.
- Next, create a Post Processing Profile in the Project Window, by right-clicking in the Project Window.
- Under Create, select Post-processing Profile.
- Now select this Post-processing Profile.
- In the Inspector, select Add effect….
- Under Unity, choose Unity Color Grading, then set the Mode option to High Definition Range.
- Tick the box next to the Mode for tonemapping and choose ACES in the combo-box.
- From within the Inspector for a camera section, add a Post Process Volume and a Post Process Layer component to each camera in the scene that requires tone mapping.
- From within the Post Process Volume, set the pre-created Post Processing Profile as the Profile.