Graphics Programs Reference
In-Depth Information
12. Add a
Layer Weight
node (press
Shift
+
A
and go to
Input
|
Layer
Weight
), two
Math
nodes (press
Shift
+
A
and go to
Convertor
|
Math
)
and a
Hue Saturation Value
node (press
Shift
+
A
and go to
Color
|
Hue
Saturation Value
).
13. Connect the
Facing
output of the
Layer Weight
node to the first
Value
input socket of the first
Math
node. Set the operation to
Multiply
and the
second
Value
to
0.700
.
14. Connect the
Multiply
node's output to the first
Value
input socket of the
second
Math
node and the output of the latter to the
Hue
input socket of
the
Hue Saturation Value
node. Connect the output of the
Hue Satura-
tion Value
node to the
Color
input socket of the
Diffuse
shader node.
15. Change the
Hue Saturation Value
node's
Color
value to
R 0.103
,
G
0.500
,
B 0.229
and, just for this example, let the other values be as they
are.
How it works...
This is how the preceding steps work to create a beetle-like chitin material:
• The first parts of this shader work almost the same as that of the
chitin_wasp
material, that is the basic shader from step 3 to step 6 and
the chitin bump from step 7 to step 11.
• From step 12 to step 15, we built the color component coming from the
Hue Saturation Value
node and that, thanks to the combination of the