Render color per vertex in mental ray® for Maya®using the mentalrayVertexColors node. It can be used in a shading network for rendering color per vertex. As a result, you
can store shading and lighting information on mesh vertices (rather than shading networks), simplifying your scene and making
it more efficient to render.
To use the mentalrayVertexColors node
- Create color sets. For more information, see Polygon color sets in the Polygonal Modeling guide.
- Create a mentalrayVertexColors node. For more information, see Create a node.
- In the , load the shape node that contains the color set you want to use into the column. For more information, see Connection Editor.
- Load the mentalrayVertexColors node into the column of the .
- Connect the output of the color set (colorSet[n].colorName) to the cpvSets input on the mentalrayVertexColors node.
- Make connections from the mentalrayVertexColors node out color to the input nodes of a shader, as necessary. For more information,
see About shading networks.
Additional notes
- When a mesh has a connection between the meshShape.colorSet[n].colorName to the mentalrayVertexColors node, the color per
vertex data of the mesh is exported as custom data for each vertex. In the case of multiple CPV sets, all of the CPV values
are exported.
If you want to force the export of all the CPV data for all the meshes in your scene, you can turn on the attribute in the Render Settings: mental ray tabs, tab, section. Exporting CPV data can be process-intensive, so do not turn on this attribute unless necessary.
- Vertex colors are exported as user data for vertices and are accessible from a shader.