MAXScript Language Reference > 3ds Max Objects > TextureMap : Material >

# TextureMap Common Properties, Operators, and Methods

Value > MAXWrapper > Material > TextureMap

| Materials and Maps - Quick Navigation

Properties

    <TextureMap>.name

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

Methods

    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>] [time:<time>]

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.

If the time: argument available in 3ds Max 2010 and higher is supplied, the map will be rendered at the specified time. If it is not supplied, the map will be rendered at the current time. Calling the function inside an at time <time> context will also evaluate the map at the specified time.

EXAMPLE
    rm = renderMap $foo.material.diffuseMap size:[640,480] \
    fileName:"foodif.bmp"
    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, optionally the texture map in that material to be controlled, and a boolean argument to turn the display on or off. For multi-materials, you need to specify the appropriate sub-material to be affected.

If the second argument is omitted, the Show Map In Viewport checkbutton will be pressed at the level of the material specified as first argument, thus implicitly showing supported maps inside that material.

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

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

This method provides control over the visibility of hardware textures in the shaded viewport. (The Show Hardware Map in Viewports is a flyout of the Show Map In Viewports icon).

Available in 3ds Max 2008 and higher.

See Show Map In Viewports Function for details.

#### See Also

- Material Common Properties, Operators, and Methods

- MAXWrapper Common Properties, Operators, and Methods

- Value Common Properties, Operators, and Methods