Vertex colors on meshes ?

Hi all.

I have a simple question about vertex colors. When people talks about using vertex colors in shaders or something, did they talk that a mesh have color information on every vertex of the mesh ??

Like:

Vertex nº 234
-Point (1,1,1)
-Normal (0,1,0)
-UV1 (0,0)
-UV2 (1,0)
-Color (R,G,B,A)

Is this correct ? or i am wrong ?

And if this is correct, how can you set up colors per vertex on a mesh ? Did you need to set up on 3D Studio MAX or you setup on Unity ?

Thanks for your help

LLORENS

Vertex colors are defined in the asset authoring tool. There is a tool in 3ds max that allows you to paint vertex colors onto a mesh, and iirc Maya has a similar tool. I’m also pretty sure Blender introduced a tool to do this in a version a couple years ago, but I can’t swear for that. Edit: Blender 2.5 introduced the Vertex Paint panel (here)

The vertex colors can then be picked up by the shader to affect things like specular values, transparency, etc. There are ShaderLab methods to access these, some listed here.

Btw, there should be one color per face, per vertex.

Thx for your help, i can see in Max a modifier called ‘Vertex Paint’ that let you to apply colors to vertex.

Do you know how can yow bake light color from a directional light to vertex color ?

I searched into forum and founded that there are some shaders wich take this color into account when rendering. But i don’t know how to bake this color into vertex automaticaly on MAX.

Thanks in advance.

LLORENS