Part 1: Playing with colors and properties

[Linked Image]

The "Material" node is the main output node of a material.
You can describe the visual look of the scene (from colors to transparency/opacity and position) by passing various parameters to its output ports.

When none of the outputs are connected, our material is pitch black as it reflects no light at all:
[Linked Image]

1) Let's start by giving our material a diffuse color.
The diffuse color defines how much of the light received by the object is reflected *in all directions*.
  • Place a "Vector 3 (3)" node by dragging it to the node graph from the Nodes pane.
    We need a 3-component vector because graphics engines internally handle colors as vectors with 3 components: Red, Green and Blue.
    A (0, 0, 0) diffuse color is completely dark - reflects 0% of the light, whereas a (1, 1, 1) color reflects all light.
    Similarly, a (1, 0, 0) color reflects all light received in the Red channel, and doesn't reflect any light in the Green and Blue channels.
    There are transitions too, such as (0, 0.3, 0), that reflects 30% of the Blue light.
  • Assign a color to the Vector by selecting it, then selecting the ColorValue in the Properties pane, clicking "..." and selecting a color value.
  • Connect the output of the Vector to the Diffuse input of the Material.

The resulting node graph and preview material should look something like this:
[Linked Image]
[Linked Image]

Our sphere now has a color that is the same on all sides, independently of view angle and rotation.


2) Let's proceed by giving it a Specular color too.
(We'll skip the Emissive output for now as its effects are not that spectacular without textures, but we'll do cool stuff with it later :))
Specular color represents how much of the incoming light reflects in a directional manner. The specular response is brightest when your eye lines up with the direction of the reflected incoming light, so specular is view dependent.
  • Place another "Vector 3" node and assign it a color, similarly to the previous example.
    Make sure that the Specular color is different than the Diffuse color otherwise you won't see any specular highlight.
  • Connect the output of the Vector to the Specular input of the Material.

Result:
[Linked Image]
[Linked Image]

The sphere color now depends on the view angle, and will look brighter in the spots where it reflects directional light towards the viewer.

3) The Specular Power controls how shiny or glossy the surface is. A very high specular power represents a mirror-like surface while a lower power represents a rougher surface.
Unlike the Diffuse and Specular outputs, the Specular Power output needs a single value, not a vector, so let's place a "Float (1)" node, connect it to the Specular Power output and experiment with its values.
[Linked Image]

Preview of the material with Specular Power values of 1, 10 and 50:
[Linked Image]
[Linked Image]
[Linked Image]

Reflection: I haven't managed to get this output to work yet frown