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 ensure it’s unique.
renderMap <TextureMap> [into:<bitmap>] [size:<point2>] [filename:<string>] [scale:<float>]
[filter:<boolean>] [display:<boolean>] [hdr:<boolean>] [time:<time>]
[range:<point4>] [disableBitmapProxies:<boolean>]
Provides access to 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. Otherwise, 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 slower to rescale bitmaps with filtering on. Defaults filter:
value is false
.
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
.
If the hdr:
argument is true, the resulting bitmap is an HDR bitmap. The default hdr:
value is false
.
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.
If the range
: argument is supplied, only that range is sampled instead of rendering the whole texture. Available in 3ds Max 2019.2 Update and higher. By default range:
is [0,0,1,1], which specifies the whole map.
If the disableBitmapProxies
: argument is true
, the proxy system is disabled for this render, and only the full resolution bitmap is used. Available in 3ds Max 2019.2 Update and higher. The default is false
.
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"
rm = renderMap meditmaterials[1].diffuseMap range:[0,0,0.8,0.8] size:[1024,1024] \ fileName:"foodifuvrange.bmp" save rm close rm
The above will render only a sub-range of the material, and save it to the file "foodifuvrange.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
tm = checker() mat = standardMaterial diffuseMap:tm mm = multimaterial() mm[1] = mat 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.