multi-layered texturing / multiple vertex color sets

does unity support multi-layered texturing?
can i read multiple vertex color sets/layers?

i believe fbx does support this.
maya does support this.


found some documentation and another thread
documentation reads…

"For every vertex there can be a normal, two texture coordinates, color and tangent. These are optional though and can be removed at will. All vertex information is stored in separate arrays of the same size, so if your mesh has 10 vertices, you would also have 10-size arrays for normals and other attributes. "

so the answer in short is “no”.

but can you override the mesh data arrays.?
can you double up the data in the arrays that are read in a custom way though the shader?
will this work with fixed function or strumpy?

I needed two sets of vertex colors on my models for my current project; so I decided to use COLOR and TEXCOORD0(xy=rg)+TEXCOORD1(x=b) for my two sets.

To make it possible to see and paint the second set of vertex colors I created a little python script for Blender which allows me to tap Ctrl+Shift+F1 to quickly swap vertex colors with UV coordinates.

Just posting here in case this is of use to anybody; I was unable to find any existing scripts to achieve this.


import bpy

bl_info = {
    'name': 'Swap Vertex Colors with UVs',
    'author': 'numberkruncher',
    'version': (0, 1),
    'blender': (2, 7, 7),
    'description': 'Swaps vertex color data with uv1/uv2 data',
    'category': 'Vertex Paint'

class SwapVertexColorsWithUVs(bpy.types.Operator):
    bl_label = "Swap Vertex Colors with UVs"
    bl_idname = "object.swap_vertex_colors_with_uvs"
    bl_description = "Swaps vertex color data with uv1/uv2 data"
    def execute(self, context):{'INFO'}, "Swapping vertex color data with uv1/uv2 data")
        # start in object mode
        obj =
        mesh =

        # make sure that the object has vertex colors
        if not mesh.vertex_colors:
        # make sure that the object has uv data
        while len(mesh.uv_textures.values()) < 2:

        # grab the active vertex color data layer
        color_layer =  
        # grab the active uv data layer
        uv_layers = mesh.uv_layers.values()

        i = 0
        for poly in mesh.polygons:
            for idx in poly.loop_indices:
                tempR =*.color.r*

tempG =*.color.g*
tempB =*.color.b*
#tempA =*.color.a* = uv_layers[0].data*.uv.x* = uv_layers[0].data*.uv.y* = uv_layers[1].data*.uv.x* = uv_layers[1].data*.uv.y*

uv_layers[0].data*.uv.x = tempR*
uv_layers[0].data*.uv.y = tempG*
uv_layers[1].data*.uv.x = tempB*
#uv_layers[1].data*.uv.y = tempA*

i += 1

# set to vertex paint mode to see the result

return {‘FINISHED’}

def register():
bpy.utils.register_class(SwapVertexColorsWithUVs)[‘Vertex Paint’]‘object.swap_vertex_colors_with_uvs’,value=‘PRESS’,type=‘F1’,ctrl=True,alt=False,shift=True,oskey=False)

def unregister():

if name == “main”: