Vertex color

From polycount
Revision as of 12:18, 11 October 2014 by Caustic (Talk | contribs)

Jump to: navigation, search

Vertex color

Each vertex in a mesh can optionally store a RGB color value, called vertex color. These can be used for a variety of interesting effects and shader inputs.

Vertex color can be used for multitexturing, transparency, or ambient occlusion for example.

Vertex alpha

Because vertex alpha is simply a monochrome set of values it can be used for other purposes, like providing transparency, per-vertex sound effects in response to collisions, controlling foliage bend amount for a tree's animated vertex shader, etc. The alpha channel works similar to the RGB channels otherwise.

Depending on the game engine and mesh format, a single vertex can be assigned multiple vertex alpha values. This duplicates the vertex, once for each alpha value, which allows the alpha to change suddenly from one triangle to the next, creating a hard alpha edge.

Usage

Vertex color is typically multiplied against the Diffuse Color, colorizing/darkening the color map.

Vertex color can also be used for controlling blends between different texture sets, providing per-vertex sound effects in response to collisions, controlling which foliage vertices are affected by a "wind" vertex shader, etc.

When used for non-color effects, typically each color channel is treated as a separate monochrome set of values, so for example RGB vertex color can control three different per-vertex effects.

Multiple Colors per Vertex

A single vertex can be assigned multiple vertex colors, depending on the game engine and mesh format. This duplicates the vertex when it is loaded into the game, once for each color, slightly increasing the memory cost. When vertices along an edge contain two different vertex colors, the color may change suddenly from one triangle to the next, creating a hard color edge instead of the typical blending normally seen across vertices. This is typically done by applying color to a face selection rather than vertices. In Maya, Vertex Faces allows for applying color in a vertex/face hybrid mode.

Tutorials

Vertex painting for UDK @ Eat3d
Foliage Vertex Color
Ambient-Occlusion Vertex Color
Removing Vertex Colors
Vertex Color Tutorial for 3ds Max
Vertex Color Use in Maya Questions

Personal tools
Namespaces

Variants
Actions
Navigation
Tools