ColorMap - superclass: textureMap; super-superclass:material - 6:0 - classID: #(329196230L, 334932244L)
3ds Max 2017 の
新機能 : ソリッド カラーを任意のマップ スロットに簡単な方法で渡す機能があるため、独立したマテリアルおよびマップの間でカラー値をインスタンス化するなどの操作を実行できます。
ColorMap...
プロパティ:
<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))
ソリッド カラー見本のカラー値を取得/設定します。
<ColorMap>.mapEnabled BooleanClass default: true -- boolean; Map_Enable
[マップ](Map)有効化チェックボックスの状態を取得/設定します。
<ColorMap>.map UndefinedClass default: undefined -- texturemap
ソリッド カラー値の代わりに使用するテクスチャ マップを取得/設定します。
<ColorMap>.gamma Float default: 2.2 -- animatable; float
[ガンマ](Gamma)値を取得/設定します。
<ColorMap>.gain Float default: 1.0 -- animatable; float
[ゲイン](Gain)値を取得/設定します。
<ColorMap>.ReverseGamma BooleanClass default: true -- animatable; boolean; Reverse_Gamma
[逆ガンマ](Reverse Gamma)チェックボックスの状態を取得/設定します。
| 例 |
(
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!
)
|