Graphics Programs Reference
In-Depth Information
And here we are so far:
What is missing now is the underwater deep
atmospheric perspective
effect. There
are several ways to obtain this, for example, by compositing a
Mist
pass rendered in
Blender Internal, but we are going to do it with a node group assigned to each one
of the different materials:
1. Add a
Camera Data
node (press
Shift
+
A
and go to
Input
|
Camera
Data
), a
Math
node (press
Shift
+
A
and go to
Convertor
|
Math
), an
Emission
node (press
Shift
+
A
and
Shader
|
Emission
), and a
Mix
Shader
node (press
Shift
+
A
and go to
Shader
|
Mix Shader
).
2. Connect the
View Z Depth
output of the
Camera Data
node to the first
Value
input of the
Math
node. Set the
Math
node operation to
Multiply
and the second
Value
to
0.030
, check the
Clamp
option. Connect the
Multiply
node output to the
Fac
input socket of the
Mix Shader
node.
3. Connect the
Emission
output to the second
Shader
input of the
Mix
Shader
node and set the color to
R 0.040
,
G 0.117
,
B 0.124
.