ColorMap - superclass: textureMap; super-superclass:material - 6:0 - classID: #(329196230L, 334932244L)
Offers a simple way to pass a solid color into any map slot, allowing for example the instancing of a color value among independent Materials and Maps. Available in in 3ds Max 2017 and higher.
ColorMap...
Properties:
<ColorMap>.solidcolor Color default: (color 127.5 127.5 127.5) -- animatable; fRGBA color; Solid_Color; Controller Scaling: ([1,1,1,1] : (color 255 255 255))
Get/set the color value of the Solid Color swatch.
<ColorMap>.mapEnabled BooleanClass default: true -- boolean; Map_Enable
Get/set the state of the map enabled checkbox.
<ColorMap>.map UndefinedClass default: undefined -- texturemap
Get/set the texture map to be used in place of the solid color value.
<ColorMap>.gamma Float default: 2.2 -- animatable; float
Get/set the Gamma value.
<ColorMap>.gain Float default: 1.0 -- animatable; float
Get/set the Gain value.
<ColorMap>.ReverseGamma BooleanClass default: true -- animatable; boolean; Reverse_Gamma
Get/set the state of the Reverse Gamma checkbox.
Example |
( resetMaxFile #noprompt --reset the scene --define an array of material classes and their base color map properties: theMatClasses = #(#(Standardmaterial, #diffuseMap), #(Architectural, #diffuseMap), #(Autodesk_Material, #Generic_Image), #(RaytraceMaterial, #diffuseMap), #(PhysicalMaterial, #base_color_map), #(InkNPaint, #paint_map) ) cm = colorMap() --create a color map instance for i = 1 to theMatClasses.count do --loop through the list of material classes ( m = theMatClasses[i][1]() --create a material instance setProperty m theMatClasses[i][2] cm --set its base color to the color map geosphere radius:25 pos:[i*60,0,0] material:m --create a geosphere offset along X if theMatClasses[i][1] == InkNPaint do m.paint_map_on = true --if the material is InkNPaint, also enable the Paint Map showTextureMap m true --enable the display of the material's maps in the viewport (does not work for InkNPaint) ) max zoomext sel all --zoom all cm.solidcolor = red --set the color of the colorMap to red and render bmp1 = render() cm.solidcolor = green --set the color of the colorMap to green and render bmp2 = render() --As you can see, we can control the solid color of multiple independent material types --using an instances colorMap! ) |