Hey guys,
Been looking into doing modular assets and I came across vertex colors; I'm not sure I understand what exactly it is. As I understand, it can be used to blend maps in UDK or for transparency, but I'm unclear....how it works?
Is it like an alpha map that you can change on the fly? How is it more efficient and what are some other instances it can be used?
I keep having this impression that it just applies a color or whatever at the actual vertex point. So for example, on a cube, if only one vertex is colored, that corner of the mesh has a colored gradient that blends outwards into the other connecting vertices, but this seems wrong, so if someone could explain this in layman terms that would be awesome
![:) :)](https://polycount.com/plugins/emojiextender/emoji/twitter/smile.png)
references:
http://www.philipk.net/tutorials/modular_sets/modular_sets.htmlhttp://www.thiagoklafke.com/modularenvironments.html
Replies
Each vertex can holds a colour and this can be used like any other textures. Vertex/textures merely being something that contains data it makes perfect sense.
There are lots of uses for vertex colors, you can bake lighting into them, AO, you can use them as mask (for blending of different textures.)
Before lightmapping came, it was (still is in some platforms) the most used way to light environments. You can use it to blend between textures, you can use it as a color overlay (you can create color variations on the same texture, as you can see in Mino's tutorial.), you can do a lot with it.
So if i want more detail using vertex colors to influence things, do i have to have more verts on the mesh?
Thanks for the replies guys
If you use Zbrush. Give it a try on low poly models and than High poly ones.
Im not 100% about all of this as I use Mudbox.
kinda most poeple who use it for blending between textures will also have a mask texture, too so it dosnt blend with a perfect gradient.
if your interested i cna show you a shader network that does this to blend moss over brick, where im useing my heightmap as a mask so it fills in the cracks before everythign else.
because of the interpolation most people will use some sort of mask to control how it blends in, or they will use it very subtly for co lour variation.
it also helps to consider if you want to do this kinda material ass you make your assets too, that way you can tessellate the mesh to give enough verts to hold the data you want.
i took it a bit farther and use 2 vert colours with my, useing the red channel, to blend between 2 texture, and using the green channel to effect how hard or soft the transition is.
http://www.laurenscorijn.com/vertex-blending-snow.html
i just tend to push it a bit farther by having it deadon the original normals and blend between 2 detail normals along with all the other textures it is blending.
also a other thing i do, because vertex colour can be stored be mesh instance in UDK i iwll use it for darkening or brighting up different modular pieces, and sometimes use a mask for that too, makes things like wall panels look way less repetitive when you can darken up or lighten some of the meshes.