Vertex color for render applications

More specifically - keyshot.

Keyshot is looking at the mesh information in the viewport (I think).

I was hoping to use an ObjectID node with vertex color to make every objects different colors, while being able to use only one material. But the vertex color comes through as black.

I can export to another program, like blender or 3dsMax, and adjust vertex colors there via a script or something, but if there’s a way to do it in Rhino, that’d be better.

The mesh is created. How are vertex colors stored? Is there a way to change them? And if so, is there a way to have them match something specific, like wire color all in one step? (or random might also be nice)

Hi @kalamazandy,

They are stored in the mesh geometry, for every mesh vertex, there can be one color.

Rhino currently only has one built in command to change the vertex colors of a mesh: _ComputeVertexColors which assigns the colors of an applied texture to the vertices of the mesh. But you can use scripting to change them as you like.

This script asks for some meshes, you can choose a color and assign it as vertex color for all vertices:

MeshSetAllVertexColors.py (772 Bytes)

This script assigns random vertex colors (one color per mesh):

RandomVertexColorsPerMesh.py (988 Bytes)

_
c.

Btw, to remove VertexColors, first run below command, then post-select the mesh(es):

_RebuildMesh _PreserveTextureCoordinates=_Yes _PreserveVertexColors=_No _Enter

_
c,