Graphics Reference
In-Depth Information
5.
Connect its output to the second input socket of the Mix Shader node. Click on its
Color box to change the color to R 0.023 , G 0.083 , and B 0.179 .
6.
Now, add a Light Path node (press Shift + A and navigate to Input | Light Path).
7.
Connect the Is Camera Ray output of the Light Path node to the Fac input socket
of the Mix Shader node, and voilĂ ! The objects in the scene are lit by the HDR image
connected to the first Background node, but they appear in a sky that is colored
as set in the Color box of the second Background node. This is shown in the
following screenshot:
The use of the Path Light node as a factor to have a different background than the HDR image still illuminating the
scene
8. Save the file as start_08.blend .
How it works...
To explain this trick better, let's say we just created two different world materials: the first
material with the texture and the second material with a plain blue color (this is not literally
true; actually, the material is just one, containing the nodes of two ideally different worlds).
We mixed these two materials using the Mix Shader node. The upper green socket of the
Mix Shader node is considered equal to a value of 0.000 , while the bottom green socket
is considered equal to a value of 1.000 . As the name suggests, the Light Path node can
set the path for the rays of light that are shot from the camera, if you remember. Is Camera
Ray means that only the rays directly shot from the camera have a value of 1.000 , that is,
not the reflected ones, or the transmitted ones, or whatever, which have a value of 0.000 .
 
Search WWH ::




Custom Search