Difference between revisions of "Vertex color"
m |
(Merging VertexAlpha page + small edits) |
||
Line 1: | Line 1: | ||
− | |||
= Vertex Color = | = 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. | 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 [[Multitexture|multitexturing]], [[Transparency map|transparency]], or [[Ambient Occlusion Map|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 == | == Usage == | ||
Line 19: | Line 22: | ||
== Multiple Colors per Vertex == | == 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. | + | 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. |
− | + | ||
− | 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 | + | |
== Tutorials == | == Tutorials == | ||
Line 37: | Line 38: | ||
---- | ---- | ||
− | [[Category:Texturing]] [[Category:TextureTechnique]] [[Category: | + | [[Category:Texturing]] [[Category:TextureTechnique]] [[Category:Texture Types]] |
Revision as of 14:31, 17 August 2014
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
Foliage Vertex Color |
Ambient-Occlusion Vertex Color |
Removing Vertex Colors |
Vertex Color Tutorial for 3ds Max |
Vertex Color Use in Maya Questions |