TextureObjMask : textureMap

TextureObjMask - superclass: textureMap; super-superclass:material - 13:0 - classID: #(1398407114L, 2770506888L)

   

This texture map can apply different textures based on a primitive control object (above/below a Plane, or inside/outside of a Box or Sphere). Available in in 3ds Max 2017 and higher.

   

Constructor:

TextureObjMask...

   

Properties:

<TextureObjMask>.object     UndefinedClass    default: undefined   --  node

Get/set the Control Object defining the texture mask color distribution.

Possible objects are Plane (Above/Below), Box or Sphere (Inside/Outside).

   

<TextureObjMask>.color0     Color    default: (color 0 0 0)   --  animatable; RGB color; Controller Scaling: ([1,1,1] : (color 255 255 255))

Get/set the Above/Inside color.

   

<TextureObjMask>.subtex0     UndefinedClass    default: undefined   --  texturemap; SubMat0

Get/set the Above/Inside texture map.

   

<TextureObjMask>.map1Enabled     BooleanClass    default: true   --  boolean; Map0Enable

Get/set the enabled state of the Above/Inside texture map.

   

<TextureObjMask>.color1     Color    default: (color 255 255 255)   --  animatable; RGB color; Controller Scaling: ([1,1,1] : (color 255 255 255))

Get/set the Below/Outside color.

   

<TextureObjMask>.subtex1     UndefinedClass    default: undefined   --  texturemap; SubMat1

Get/set the Below/Outside texture map.

   

<TextureObjMask>.map2Enabled     BooleanClass    default: true   --  boolean; Map1Enable

Get/set the enabled state of the Below/Outside texture map.

   

<TextureObjMask>.transitionrange     Float    default: 1.0   --  animatable; float

Get/set the Transition Range value.

   

<TextureObjMask>.transitionbias     Float    default: 0.0   --  animatable; float

Get/set the Transition Bias value.

   

<TextureObjMask>.displaceamount     Float    default: 1.0   --  animatable; float

Get/set the Transition Displacement Amount value.

   

<TextureObjMask>.displacetex     UndefinedClass    default: undefined   --  texturemap

Get/set the Transition Displacement texture map.

   

<TextureObjMask>.displaceEnabled     BooleanClass    default: true   --  boolean; DisplaceEnable

Get/set the enabled state of the Transition Displacement texture map.

   

<TextureObjMask>.coords     StandardXYZGen    default: MtlBase:Placement   --  maxObject; Coordinates; SubAnim

See XYZGenClass for default coords properties.

   

EXAMPLE:

(
resetMaxFile #noprompt --reset the scene

local s = sphere radius:50 segs:32 --create a sphere (note that geosphere is NOT supported!)
local p = plane width:200 length:200 --create a plane

local tom = TextureObjMask() --create a object mask texture 
tom.object = s --assign the sphere as the control object of the texture

local ct = cellular() --create a cellular map
ct.cellColor = red --set the 3 colors of the map to bright colors
ct.divColor1 = yellow
ct.divColor2 = blue
tom.subtex0 = ct --assign the cellular map to the Outside texture

tom.subtex1 = noise size:5.0 --assign a Noise to the Inside texture
tom.transitionrange = 25.0 --set the Transition range to more than zero to create a smooth transition

local pmat = standard() --create a standard material for the plane
pmat.diffusemap = tom --assign the texture to the diffuse map slot
p.material = pmat --assign the material to the plane

local smat = standard diffuse:red --create a standard material for the sphere
s.material = smat --assign it to the sphere
smat.opacity = 25.0 --set it to 1/4 opacity
smat.wire = true --set the material to wire so we can peek inside the sphere

meditMaterials[1] = pmat --set the first slot of the Material Editor to the plane's material
render() --render the scene
)