Is it possible to use mist in a Cycles scene in addition to a world background?
2 Answers
First, set a world background.
Then, go to the Render context in Properties and enable Transparent
(in the Film
panel).
Create two render layers. For the first one, enable Mist
(in the Passes
panel). For the second render layer, disable Combined
and Z
, and enable Environment
. Also, under Exclude
, select all layers (we only want the background texture).
Create this node setup:
The value in the Multiply
node controls the strength of the mist. The result is:
(my settings in the Mist Pass panel of World context were Start
:20, Depth
:1000, Falloff
:Linear)
A very simple way to do it, especially if you don't want to set up a world background or use world geometry, is to use a simple plane with an image texture at the back of your scene and a color ramp for the mist effect in compositing. If the last color of your ramp is black, then the mist won't apply at the background.