From BlenderWiki

Jump to: navigation, search

Material Input Nodes

A starting material is created in the Materials Panel. The Nodes button is enabled to add that material to the list of noded materials shown in the Node Editor window header. Other inputs to the node map include:

  • A value
  • A color
  • A texture
  • Geometry

Material Node

Panel: Node EditorMaterial Nodes

Menu: ⇧ ShiftAInput → Material

Material node

The Material node is used to add a material to the node program. Materials can be anything from pure shading to fully layered with textures. It inputs the main attributes of a material (color, alpha and normal vector) into the map.

Output

Materials can output color (which includes shading and any textures assigned to it), alpha, and the final normal calculated from any textures it has.

  • Color
  • Alpha
  • Normal

Input

Materials can take inputs for colors, inputs for diffuse color and specularity color, a value for reflectivity, and a normal.

  • Color - The base color of the paint. Can be set
    • manually by LMB Template-LMB.png clicking on the color swatch applet next to the socket, choosing a color using the control panel that pops up, and pressing ↵ Enter
    • based on an Active Material which is specified using the material panels, or
    • plugged in from an RGB color generator.
  • Spec - The color that is reflected as you get perpendicular to the light source reflecting off the surface. The color can be
    • plugged in from another node or
    • set manually by LMB Template-LMB.png clicking on and using the color swatch applet.
  • Refl: - The degree to which the material reflects light and gives off its color. The value can be provided by another node or set manually.
  • Normal - The lighting condition.

Controls

MA:Material field 
You can browse and select materials here.
Diff toggle 
Turn on/off Diffuse Color.
Spec toggle 
Turns on/off Specularity calculation.
Neg toggle 
Inverts the material input normal when activated (which, of course, is a combination of the 3D normal given to it by the 3D object plus the normal input point).
Normal Override
The normal input socket does not in any way blend the source normal with the underlying geometry. Any plugged in Geometry here overrides the Normal lighting conditions.


Using the Material Node with Specularity

Material Node using Specularity

To make a material node actually generate a color, you have to specify at least a basic input color, and optionally a specularity color. The specularity color is the color that shines under intense light.

For example, consider the mini-map to the right. The base color, a dark blue, is connected from an RGB color generator node to the Color input socket. The specular color, yellow, is connected to the Spec input. Under Normal lighting conditions on a flat surface, this material will produce a deep blue color and, as you approach a spot perpendicular to the light, you will see the yellow specular color mix in.

Enable Spec
To see specularity, you have to enable it by clicking the blue Spec button located just below the material color swatch in the node.


Value Node

Panel: Node EditorMaterial Nodes

Menu: ⇧ ShiftAInput → Value

Value Node

The Value node has no inputs; it just outputs a numerical value (floating point spanning 0.00 to 1.00) currently entered in the NumButton displayed in its controls selection.

Use this node to supply a constant, fixed value to other nodes' value or factor input sockets.

RGB Node

Panel: Node EditorMaterial Nodes

Menu: ⇧ ShiftAInput → RGB

RGB Node

The RGB node has no inputs. It just outputs the Color currently selected in its controls section; a sample of it is shown in the top box. In the example to the right, a gray color with a tinge of red is slected.

To change the brightness and saturation of the color, LMB Template-LMB.png click anywhere within the square gradient. The current saturation is shown as a little circle within the gradient. To change the color itself, click anwhere along the rainbow Color Ramp.

Texture Node

Panel: Node EditorMaterial Nodes

Menu: ⇧ ShiftAInput → Texture

A texture, from the list of textures available in the current blend file, is selected and introduced through the value and/or color socket.

Library
Please read up on the Blender Library system for help on importing and linking to textures in other blender files
Manual-Material-Node-Texture-example.png

In the example to the right, a cloud texture, as it would appear to a viewer, is added to a base purple material, giving a velvet effect.
Note that you can have multiple texture input nodes. In the (old) panel way, multiple textures were assigned to channels and each channel was checked on or off to be applied to the material. With nodes, you simply add the textures to the map and plug them into the map.

Geometry Node

Panel: Node EditorMaterial Nodes

Menu: ⇧ ShiftAInput → Geometry

Geometry node

The geometry node is used to specify how light reflects off the surface. This node is used to change a material's Normal response to lighting conditions.


Note
These are exactly the same settings as in the Map Input panel for Textures, though a few settings - like Stress or Tangent - are missing here. Normally you would use this node as input for a Texture Node.


Geometry Node Example using a UV image

Setup to render an UV-Mapped Image Texture.

E.g.: To render an UV-mapped image, you would use the UV output and plug it into the Vector Input of a texture node. Then you plug the color output of the texture node into the color input of the material node - which corresponds to the setting on the Map To panel.