From BlenderWiki

Jump to: navigation, search
Blender3D FreeTip.gif
2.6 Work in Progress
Please don't edit 2.6 manual "Material" pages until further notice. (sculptorjim, 01/01/2013)



Page status (reviewing guidelines)

Copy This page is a copy of the same page in 2.4 manual, need to be updated
Proposed fixes: none

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
  • Camera Data

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

Tutorials-NTR-ComValueIn.png

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

Tutorials-NTR-ComRGBIn.png

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 anywhere along the rainbow Color Ramp.


Texture Node

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

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

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.

Use this node to feed the Normal vector input on the Material node, to see how the material will look (i.e. shine, or reflect light) under different lighting conditions. Your choices are:

Global
Global position of the surface.
Local
Local position of the surface.
View
Viewed position of the surface.
Orco
Using the Original Coordinates of the mesh.
UV
Using the UV coordinates of the mesh.
Normal
Surface Normal; On a flat plane with one light above and to the right reflecting off the surface.
Note
These are exactly the same settings as in the Mapping 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.


Extended Material

Adds additional input and output channels to the material node.

Input

Color
Includes a color swatch, allowing you to select the color directly on the node.
Mirror Color
 ?
Ambient
 ?
Emit
 ?
SpecTra
 ?
Ray Mirror
 ?
Alpha
 ?
Translucency
 ?

Output

Diffuse
 ?
Spec
 ?
AO
 ?


Camera Data

View Vector
 ?
View Z Depth
 ?
View Distance
 ?