Page 1 of 1
Can someone explain vertex color?
Posted: Thu Nov 10, 2005 3:57 pm
by junglist
And is vertex lighting related?
Posted: Thu Nov 10, 2005 9:38 pm
by ^misantropia^
More or less. The vertex color is usually computed by averaging the color of the pixels in the vertex's texture. Vertex lighting means traditional OpenGL lighting, i.e. skipping the lightmap step.
Posted: Fri Nov 11, 2005 2:40 pm
by junglist
Here's where I'm confused: when you say "the vertex's texture", how is a vertex's texture determined?
Posted: Fri Nov 11, 2005 9:33 pm
by obsidian
He means that the pixels of the texture applied to the surface is averaged to yield the vertex color.
Vertex colour and vertex lighting are simply a set of RGB and sometimes alpha values attributed to each vertex point of an object. Lets say that you have a square surface, with the top two vertices with vertex colour white (1 1 1) and the bottom two vertices set with vertex colour black (0 0 0). The surface of the square will have a gradient running from black to white, bottom up.
Vertex lighting and vertex colour work essentially the same way. The only difference being how they are used. You can "paint" static vertex colours onto a model in a 3D modeling app, or you can let the game automatically generate and/or modify the vertex lighting on the model as it moves around (ie. player/weapon models).
Posted: Sat Nov 12, 2005 6:40 pm
by junglist
That makes more sense. It was just hard for me to think of a single point in space as having its own color/texture.
Thanks both.