TextureMap Common Properties, Operators, and Methods



All the TextureMap subclasses can access the name property and specify it as a constructor parameter.


assignNewName <TextureMap>

Modifies the name of the specified texture to make it unique. The name is of the form "Map #1" where the number is incremented as required to make ensure it’s unique.

renderMap <TextureMap> [into:<bitmap>] [size:<point2>] [filename:<string>] [scale:<float>] [filter:<boolean>] [display:<boolean>]

Provides access the Render Map function available in the Material Editor. The function returns a Bitmap value containing a rendering of the given texture map. If you specify the optional into: argument, the function renders the map into the supplied bitmap, taking size and other attributes from the existing bitmap. If you don’t, a new bitmap value is created using the size: and fileName: arguments in its creation. Default size value is [200,200].

The scale: argument is a scale factor applied to 3D TextureMaps. This is the scale of the surface in 3d space that is mapped to UV and controls how much of the texture appears in the bitmap representation. Default scale value is 1.

If the filter: argument is true, the bitmap is filtered. It is quite a bit slower to rescale bitmaps with filtering on. Defaults filter value is false/off.

If the display: argument is true, the resulting bitmap is displayed using the virtual frame buffer; otherwise it is not. Default display value is false/off.


rm = renderMap $foo.material.diffuseMap size:[640,480] \


save rm

close rm

The above will render the diffuse map assigned to the material of object $foo to a bitmap of size 640x480 and save it to the file "foodif.bmp"

Associated Methods

showTextureMap <material> [<texmap>|<material>] <boolean>

This method provides control over the visibility of textures in the shaded viewport. You specify the material containing the texture map, the texture map in that material to be controlled, and a boolean to turn the display on or off. For example:

showTextureMap $foo.material $foo.material.diffuseMap on

tm = checker()

mat = standardMaterial diffuseMap:tm

mm = multimaterial()

mm[1] = mat

$box01.material = mm

showTextureMap mm[1] tm on


that for multimaterials, you need to specify the appropriate sub-material (using [] indexing, for example).

See showTextureMap() function for details.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods