Difference between revisions of "Vertex color"
EricChadwick (Talk | contribs) (Category:TextureTypes, wiki cleanup, better text) |
EricChadwick (Talk | contribs) (left align the image) |
||
Line 10: | Line 10: | ||
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. Vertex alpha works this way, it is a single channel of vertex color data. | 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. Vertex alpha works this way, it is a single channel of vertex color data. | ||
− | [[image:VertexColor_Tree.gif|frame|Vertex color can be used to add volume to unlit foliage geometry. Image by [http://ericchadwick.com Eric Chadwick].]]<br clear="all"/> | + | [[image:VertexColor_Tree.gif|frame|left|Vertex color can be used to add volume to unlit foliage geometry. Image by [http://ericchadwick.com Eric Chadwick].]]<br clear="all"/> |
== Multiple Colors per Vertex == | == Multiple Colors per Vertex == |
Revision as of 19:44, 2 February 2015
Each vertex in a mesh can optionally store a RGB color value, and/or a vertex alpha value. This can be used for a variety of interesting effects and shader inputs.
Vertex color and vertex alpha can be used for multitexturing, transparency, ambient occlusion, etc.
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, controlling transparency, 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. Vertex alpha works this way, it is a single channel of vertex color data.
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. 3ds Max has this method this as well.
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