Difference between revisions of "Vertex color"

From polycount
Jump to: navigation, search
(Ambient occlusion vertex color link)
(Tools: Painting Per Channel Vertex Color in XSI)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Vertex color =
+
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 [[Shaders|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 color and vertex alpha can be used for [[MultiTexture|multitexturing]], [[Transparency map|transparency]], [[Ambient Occlusion Map|ambient occlusion]], etc.
  
= 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 ==
 
Vertex color is typically multiplied against the Diffuse Color, colorizing/darkening the color map.  
 
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.  
+
Vertex color can also be used for controlling blends between different texture sets, controlling [[Transparency_map|transparency]], providing per-vertex sound effects in response to collisions, controlling which [[Foliage Vertex Color|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.
+
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|left|Vertex color can be used to add volume to unlit [[Foliage]] geometry. Image by [http://ericchadwick.com Eric Chadwick].]]<br clear="all"/>
  
{| border="1" cellpadding="2" cellspacing="0"
 
|-
 
|}
 
  
 
== 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. 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.
+
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.
 +
 
 +
 
 +
== Tools ==
 +
 
 +
* [http://www.synoptic-entertainment.com/downloads/item/56-unity3d-advanced-vertex-painter Advanced Vertex Painter] for Unity
 +
* [http://forum.unity3d.com/threads/vpaint-advanced-vertex-painting-released.192711/ VPaint] ($) for Unity
 +
* [https://www.assetstore.unity3d.com/en/#!/search/vertex%20paint Asset Store search "vertex paint"] for Unity
 +
* [http://polycount.com/discussion/180619/painting-per-channel-vertex-color-in-xsi Painting Per Channel Vertex Color in XSI] Polycount Forum thread
  
 
== Tutorials ==
 
== Tutorials ==
{| border="1" cellpadding="2" cellspacing="0"
+
* [http://eat3d.com/free/vertex_painting Vertex painting for UDK @ Eat3d]
|<#000000>| [http://eat3d.com/free/vertex_painting Vertex painting for UDK @ Eat3d]
+
* [[Foliage Vertex Color]]  
|-
+
* [[Ambient occlusion vertex color]]  
|<#000000>| [[Foliage Vertex Color]]  
+
* [[Removing Vertex Colors]]  
|-
+
* [http://www.polycount.com/forum/showthread.php?t=41232&page=274 Vertex Color Tutorial for 3ds Max]  
|<#000000>| [[Ambient occlusion vertex color]]  
+
* [http://www.polycount.com/forum/showthread.php?t=80166 Vertex Color Use in Maya Questions]  
|-
+
|<#000000>| [[Removing Vertex Colors]]  
+
|-
+
|<#000000>| [http://www.polycount.com/forum/showthread.php?t=41232&page=274 Vertex Color Tutorial for 3ds Max]  
+
|-
+
|<#000000>| [http://www.polycount.com/forum/showthread.php?t=80166 Vertex Color Use in Maya Questions]  
+
|}
+
  
 
----
 
----
[[Category:Texturing]] [[Category:TextureTechnique]] [[Category:Texture Types]]
+
[[Category:Texturing]] [[Category:TextureTechnique]] [[Category:TextureTypes]]

Latest revision as of 21:41, 7 December 2016

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.

Vertex color can be used to add volume to unlit Foliage geometry. Image by Eric Chadwick.


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.


Tools

Tutorials


Personal tools
Namespaces

Variants
Actions
Navigation
Tools