Vertex Color Map

Overview

  • The Vertex Color map can be used to convert either the Vertex Color Channel or any of the 99 Mapping Channels to a color value.
  • In general, this approach is slower than using a Krakatoa Magma Modifier to convert the data, but is useful if the output of a Magma has to be plugged into an existing Shader tree - since Magmas on the object’s stack are always evaluated before the Material, it is possible to pass color data from the Magma to the Material this way.
    • The same applies to passing additional channels to Materials applied to a Particle Flow that uses Krakatoa PRT Birth and Update operators.
    • Magma Modifiers applied to the object’s stack can be passed as Mapping channels to Particle Flow and converted to colors in a Material using the VertexColor map.

Examples

Passing Color To Material

  • Let’s take a PRT Volume created from a standard Teapot primitive.
  • Let’s also assume that the Color channel of the PRT Volume has to be set to the Normal channel of the particle - we can add a KCM and set up a MagmaFlow to read the Normal channel and output to the Color channel:
../../../_images/krakatoa16_vertexcolormap_prtv_kcm_normal_color.png
  • But what if now we have to assign a Standard Material which will be controlling several aspects of the particle appearance including SpecularLevel and SpecularPower, Opacity, Absorption and Emission while keeping the Color of the particles defined by the KCM?
../../../_images/krakatoa16_vertexcolormap_prtv_standardmaterial.png
  • In that case, we can put a Vertex Color Map into the Diffuse color slot of the Standard Material and thus pass the Color channel of the particles to the material:
../../../_images/krakatoa16_vertexcolormap_prtv_kcm_normal_color.png
  • The Vertex Color Map can be placed at any level of the shader tree, for example it could be multiplied with another map using an RGB Multiply to produce a more complex Diffuse Map:
../../../_images/krakatoa16_vertexcolormap_prtv_rgbmultiply.png

Passing Arbitrary Vector Data To Material

  • Since the Vertex Color Map can read channels 0 to 99 (where 0 corresponds to the particle’s Color channel, 1 to the TextureCoord channel and 2 to 99 to the Mapping2 to Mapping99 Channels), it is possible to pass arbitrary data stored in the mapping channels by KCMs to the Material sub-system of 3ds Max.
Note: Many of these operations could be performed directly in a Magma Modifier, for example the loading and mixing or multiplying of texture maps. The passing of data to the Material via Mapping Channels and Vertex Color Map is an alternative approach when the artist wants to use the 3ds Max Material Editor instead of the Krakatoa Channels Modifier to control the shading.