Genome
RSS< Twitter< etc

<<Back To Data Conversion Modifiers

Selection To Color

3ds Max does not provide a native modifier to convert the Vertex Selection (esp. Soft-Selection) channel of a mesh to vertex colors (although a free modifier is available).

This workflow can be useful when applying vertex selection modifiers (both Genome-based and the built-in MeshSelect and Vol.Select modifiers), but the selection has to control for example the blending of two materials.

In the following example, we will use the Selection of a 3ds Max Vol.Select modifier to control a Blend Matertial.

  • Start a new 3ds Max scene.
  • Create a Torus with Radius1 of 60.0, Radius2 of 15.0,  64 Segments and 24 Sides.
  • Add a Vol.Select modifier, set to Vertex Selection Level, Select By Sphere mode.
  • Go to sub-object Gizmo level and scale the Sphere gizmo to approximately spherical shape
  • Move the Gizmo to select a portion of the Torus vertices.
  • Enable Soft-Selection and leave it at default settings.

  • Add a Genome modifier to the stack, switch to "Face Corners" iteration mode.
  • Open the Magma Editor and press Ctrl+[O] to create an Output node. Set it to Color channel.
  • Press SHIFT+[S] to create a Selection InputChannel node.
  • Press [C] and then [V] to insert a Convert > ToVector operator.
  • Hold Ctrl and click the InputChannel node to add it to the node selection, then press [SPACEBAR] twice to connect the Y and Z input sockets.

RESULT: At this point, the Vertex Color channel of the mesh is set to the Soft Selection value as grayscale gradient. Checking "Vertex Color Display" in the Object Properties dialog would show it in the viewport:

  • Open the Material Editor and create a new Blend Material.
  • Set the first slot's Standard Material to Checker Diffuse Map channel with Blue and White colors and 4.0x16.0 UV Tiling.
  • Set the second slot's Standard Material to pure Green Diffuse color.
  • Set the Mask map slot to Vertex Color map set to channel 0 (Vertex Color).
  • If using Nitrous viewports in 3ds Max 2012 and higher, switch the Show Shaded Material In Viewport flyout icon of the Blend Material to Show Realistic Material In Viewport. (using hardware shading).

RESULT: The Torus will be shaded using the two Standard Materials blended by the Selection channel converted to Color and passed to the Vertex Color map.

 

  • Click the 3ds Max Render button and render using Scanline Renderer. 

 

  • Set the second Standard Material to Facetted mode, set the Specular Color to Red, Specular Level to 100 and Glossiness to 10.
  • Render again 

RESULT: Since we are blending two independent materials and not just maps, we can have completely separate shading settings based on the vertex selection.