Value > MAXWrapper > Material > TextureMap |
All the TextureMap subclasses can access the name property and specify it as a constructor parameter.
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 |
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" |
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.
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.