Chapter 25. Real-time Materials

Table of Contents
25.1. Vertex Paint
25.2. TexturePaint
25.3. The UV Editor
25.4. Bitmap text in the game engine

Materials for Blenders game engine are applied with vertex-paint or UV-Textures.

With VertexPaint you can paint on Meshes, giving them solid colors or patterns of color. VertexPaint is also a very valuable tool to make the suggestion of light on faces and even more important to vary textures. Without using the CPU intense real-time lighting you can create the impression of a colored lamp shining on objects, darken corners or even paint shadows.

Textures have a big impact on the look and feel of your game or interactive environment. With textures, you are able to create a very detailed look even with a low poly model. With alpha channel textures, you are also able to create things like windows or fences without actually modeling them.

25.1. Vertex Paint

To start VertexPaint press VKEY or select the VertexPaint icon in the 3DWindow Header. The selected object will now be drawn solid. You can therefore now draw on the vertices of the object while holding LMB, the size of the brush is visualized by a circle while drawing. RMB will sample the color under the mouse pointer.

Figure 25-1. Vertex Paint related Buttons in the Paint/FaceButtons



Enter the Paint/FaceButtons to see the sampled color. Here you can also find more options to control VertexPaint:

R, G, B (NumSli)

The active color used for painting.

Opacity (NumSli)

The extent to which the vertex color changes while you are painting.

Size (NumSli)

The size of the brush, which is drawn as a circle during painting.

Mix (RowBut)

The manner in which the new color replaces the old when painting: the colors are mixed.

Add (RowBut)

The colors are added.

Sub (RowBut)

The paint color is subtracted from the vertex color.

Mul (RowBut)

The paint color is multiplied by the vertex color.

Filter (RowBut)

The colors of the vertices of the painted face are mixed together, with the opacity factor.

Area (TogBut)

In the back buffer, Blender creates an image of the painted Mesh, assigning each face a color number. This allows the software to quickly see what faces are being painted. Then, the software calculates how much of the face the brush covers, for the degree to which paint is being applied. You can set this calculation with the option "Area".

Soft (TogBut)

This specifies that the extent to which the vertices lie within the brush also determines the brush's effect.

Normals (TogBut)

The vertex normal (helps) determine the extent of painting. This causes an effect as tough you were painting with light.

Set (But)

The "Mul" and "Gamma" factors are applied to the vertex colors of the Mesh.

Mul (NumBut)

The number by which the vertex colors are multiplied when "Set" is pressed.

Gamma (NumBut)

The number by which the clarity (Gamma value) of the vertex colors are changed when "Set" is pressed.