5
$\begingroup$

I need achieve the following effect that can be observed in the image. Is it possible?

Lose colour from a distant object

$\endgroup$
6

2 Answers 2

6
$\begingroup$

There are a few ways to make the objects fade in the distance like the image you show.

  • The most realistic would be replicating what would happen in real life: Suspended particles (haze, smoke or dust) would float in the atmosphere limiting visibility of objects in the distance.

    To do that in Cycles you can add volume scattering and volume absorption shaders to the world's volume.

    enter image description here Click on the image to enlarge

  • A different way to do something similar would be to use a mist pass.

    The mist pass can be enabled on the scene section of the properties panel

    It creates a black and white image that gets progressively whiter in the distance.

    It has a start and depth settings, that can be set on the world section. Objects that are closer to the start distance will be fully black, and those past the maximum distance will be fully white.

    The the range from start to end can be visualized as a line, by enabling Display>Mist on the camera settings.

    enter image description here

    The Mist pass has to be composited into the rendered image using the compositor. Usually you want to Add the mist pass on to the image pass. The Factor on the color mix node will determine how much of the mist pass will be added to the image.

    enter image description here

    A different way to use the mist pass would be to use it to control the color on the image:

    enter image description here

  • Lastly a different approach would be to use a normalized Z pass.

    The Z pass represents the distance from objects to the camera. The limits are controlled by the clip distances on the camera.

    enter image description here

    Note that the Z pass, being a representation of distance will likely exceed the limits of the 0-1 range of what can be displayed as an image (0 being black, 1 being white), so normalizing the Z pass will convert those values to something that can be visualized.

    The main disadvantage of this approach is that the Z pass is not antialiased, so your image might look blocky or pixelated on curves or diagonal edges.

    enter image description here

For Additional info on the difference between mist and Z pass read: Difference between a mist pass and a normalized z-buffer?

$\endgroup$
3
  • 3
    $\begingroup$ According to wikipedia, the effect should be the a decreasing contrast and saturation, and a shift towards blue. I'm not sure that adding the mist pass is the best way to achieve it. en.wikipedia.org/wiki/Aerial_perspective $\endgroup$
    – lbalazscs
    Dec 15, 2016 at 14:16
  • 1
    $\begingroup$ The color shift is not my main concern (it is easy to add a color shift), I am worried about the desaturation method. Adding the same value to all three channels will create a more desaturated color, but at the same time it increases the overall brightness, which was not (?) intended. It pushes the pixels towards white instead of pushing them towards grey. In reality there is scattering, but also absorption. $\endgroup$
    – lbalazscs
    Dec 15, 2016 at 15:36
  • 3
    $\begingroup$ I've always used it with the regular "mix" (over) blend mode, just as a mix factor. Distant haze doesn't add light, it replaces it with reflections off the mist. Thus applying the pass should replace color (as in mix/over), not add it. $\endgroup$
    – JtheNinja
    Dec 18, 2016 at 19:08
2
$\begingroup$

You could use the Z pass to influence a mix node set to saturation (selected node in the first image below). In this example, I also mix it with a blueish color that's also influenced by the Z pass. (This method is not very accurate, but it's faster than using a volume scatter node.)

desaturate image based on Z depth pass Here's the image before compositing (no distance desaturation or colorization) before and after compositing after

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .