Render Surface Map

These methods expose the functionality of the Render Surface Map dialog, which can generate various types of surface maps for Editable_Poly objects.

<bitmap>cavityMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>contrast <int>bleed
<boolean>PolyBCavityMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>contrast <int>bleed

Generates a cavity map for the specified Editable_Poly poly object, where width and height is the size of the bitmap (in pixels), mapchannel is the object's map channel, contrast is the amount of extra contrast to apply, and bleed is the number of pixels to add at UVW borders as "padding".

The cavityMap() version returns the generated bitmap as a value, whereas the PolyBCavityMap() displays the generated bitmap in a virtual frame buffer window.

<bitmap>densityMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>bleed
<boolean>PolyBDensityMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>bleed

Generates a density map for the specified Editable_Poly poly object, where width and height is the size of the bitmap (in pixels), mapchannel is the object's map channel, and bleed is the number of pixels to add at UVW borders as "padding".

The densityMap() version returns the generated bitmap as a value, whereas the PolyBDensityMap() displays the generated bitmap in a virtual frame buffer window.

<bitmap>dustMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>bleed
<boolean>PolyBDustMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>bleed

Generates a dust map for the specified Editable_Poly poly object, where width and height is the size of the bitmap (in pixels), mapchannel is the object's map channel, and bleed is the number of pixels to add at UVW borders as "padding".

The dustMap() version returns the generated bitmap as a value, whereas the PolyBDustMap() displays the generated bitmap in a virtual frame buffer window.

<bitmap>subSurfaceMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>accuracy <int>bleed
<boolean>PolyBSubSurfaceMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>accuracy <int>bleed>

Generates a SubSurface map for the specified Editable_Poly poly object, where width and height is the size of the bitmap (in pixels), mapchannel is the object's map channel, accuracy is the amount of blur to apply, and bleed is the number of pixels to add at UVW borders as "padding".

The subSurfaceMap() version returns the generated bitmap as a value, whereas the PolyBSubSurfaceMap() displays the generated bitmap in a virtual frame buffer window.

<bitmap>occlusionMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>accuracy <int>bleed
<boolean>PolyBOcclusionMap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>accuracy <int>bleed

Generates an occlusion map for the specified Editable_Poly poly object, where width and height is the size of the bitmap (in pixels), mapchannel is the object's map channel, accuracy is the amount of blur to apply, and bleed is the number of pixels to add at UVW borders as "padding".

The subSurfaceMap() version returns the generated bitmap as a value, whereas the PolyBSubSurfaceMap() displays the generated bitmap in a virtual frame buffer window.

<bitmap>selectionToBitmap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>isEP <Edit_Poly>EP
<boolean>PolyBSelToBitmap <EditablePoly>poly <int>width <int>height <int>mapchannel <int>isEP <Edit_Poly>EP

Generates black-and-white bitmap based on the sub-object selection of the specified Editable_Poly poly object, where width and height is the size of the bitmap (in pixels), and mapchannel is the object's map channel. If isEP is 0 (the default) the specified poly object is operated on; if isEP is 1 (true), the specified Edit_Poly EP object is operated on.

The selectionToBitmap() version returns the generated bitmap as a value, whereas the PolyBSelToBitmap() displays the generated bitmap in a virtual frame buffer window.

Example

-- create an editable_poly object
t = teapot()
convertto t Editable_Poly
-- add a map channel
addmodifier t (UVWMap())
collapsestack t

-- generate density map
dm = densityMap t 512 512 1 3

-- show bitmap:
display dm caption:"My Density Map"
-- save bitmap:
dm.filename = (getDir #image) + "\\my_density.bmp"
save dm quiet:false