In this eighth episode of a nine-part series on Atmospheric Perspective in Compositing in Blender 4.1, we will see how to decrease the contrast of the image based on the distance from the virtual camera.
Video Transcript
In this eighth episode of a nine-part series on Atmospheric Perspective in Compositing in Blender 4.1, we will see how to decrease the contrast of the image based on the distance from the virtual camera.
The contrast reduction can be achieved using a Brightness Contrast node from the Color Adjust group. Place this node between the output of the SATURATION group and the Reroute node.

In this case, it's important to note that reducing contrast is done by setting negative values in the Contrast field.
Since the normalized (but not inverted) Depth information returns values from 0 to 1, with 1 for the most distant elements, the first thing to do is to multiply the output of Normalize by -1. This will result in 0 for the closest objects and -1 for the farthest ones, thus achieving an initial contrast reduction.
We can perform this operation by inserting a Math node of the Utilities group between the Normalize node and the Contrast input of the Brightness Contrast node, changing the mode of the Math node to Multiply and setting -1 as the second value of the operation.

The contrast reduction is already in effect, but it's not very noticeable because the lowest value is -1. To gain more control over this operation, let's insert a second Math Multiply node, placing it between the first Multiply node and the Contrast input.

In this case, we should remember to use a positive value for the second Value field. This node will multiply its second value, which we can specify as desired, by the distance mask. As a result, we will obtain a Contrast value ranging from 0 to a negative value, as desired.

Let's group the two Math Multiply nodes and the Brightness Contrast node into a new group, which we'll call CONTRAST.
Let's enter the group and connect the second Value input of the second Multiply node to an input of the group.
This way, we can easily modify the multiplication value (and thus the contrast intensity) even when the group is closed.

I would like to remind you that you can easily activate or deactivate an entire group by selecting it and pressing the M key once or multiple times (shortcut for the Mute operation).
