TextMap : textureMap

TextMap - superclass: textureMap; super-superclass:material - 34:0 - classID: #(1535262031L, 956839498L)

   

NEW in 3ds Max 2017: Renders a TextPlus object as a procedural texture map.

   

Properties:

Parameters Rollout

Filtering Group Of Controls

<TextMap>.filter     BooleanClass    default: true   --  Boolean

Get/set the state of the "Filter Result" checkbox.

   

<TextMap>.mipmap     BooleanClass    default: true   --  boolean

Get/set the state of the "Mip Mapping" checkbox.

   

Cropping/Placement Group Of Controls

<TextMap>.applycrop     BooleanClass    default: false   --  boolean

Get/set the state of the "Apply" checkbox.

   

<TextMap>.croporplace    Integer    default: 0   --  integer

Get/set the state of the "Crop / Place" radio buttons.

Possible values are:

0 - Crop (default)

1 - Place

   

<TextMap>.crop_u     Float    default: 0.0   --  animatable; float; Clip_U_Offset

Get/set the value of the "U" spinner.

   

<TextMap>.crop_v     Float    default: 0.0   --  animatable; float; Clip_V_Offset

Get/set the value of the "V" spinner.

   

<TextMap>.crop_w     Float    default: 1.0   --  animatable; float; Clip_U_Width

Get/set the value of the "W" spinner.

   

<TextMap>.crop_h     Float    default: 1.0   --  animatable; float; Clip_V_Width

Get/set the value of the "H" spinner.

   

<TextMap>.Jitter     BooleanClass    default: false   --  Boolean

Get/set the state of the "Jitter" checkbox.

Used only when .croporplace is set to 1 – Place.

   

<TextMap>.jitteramt     Float    default: 1.0   --  animatable; float; Jitter_Placement

Get/set the value of the "Jitter" spinner.

Used only when .croporplace is set to 1 – Place.

   

Mono Channel Output Group Of Controls

<TextMap>.monoOutput     Integer    default: 1   --  integer

Get/set the state of the "Mono Channel Output" radio buttons.

Possible values are:

0 - RGB Intensity

1 - Alpha (default)

   

RGB Channel Output Group Of Controls

<TextMap>.rgbOutput     Integer    default: 0   --  integer

Get/set the state of the "RGB Channel Output" radio buttons.

Possible values are:

0 - RGB (default)

1 - Alpha as Gray

   

Alpha Source Group Of Controls

<TextMap>.alphasource     Integer    default: 2   --  integer; Alpha_Source

Get/set the state of the "Alpha Source" radio buttons.

Possible values are:

0 - Image Alpha

1 - RGB Intensity

2 - None (Opaque) (default)

   

Text Parameters Rollout

<TextMap>.textobject     UndefinedClass    default: undefined   --  node

Get/set the TextPlus object used to generate the map.

No other object classes are allowed.

Corresponds to the "Text Object" pickbutton in the UI.

   

<TextMap>.usefillcolor     BooleanClass    default: true   --  Boolean

Get/set the state of the "Fill Color" checkbox.

   

<TextMap>.fillcolor     Color    default: (color 0 0 255)   --  animatable; RGB color; Controller Scaling: ([1,1,1] : (color 255 255 255))

Get/set the value of the "Fill Color" color.

   

<TextMap>.outlinecolor     Color    default: (color 0 0 0)   --  animatable; RGB color; Controller Scaling: ([1,1,1] : (color 255 255 255))

Get/set the value of the "Line Color" color.

   

<TextMap>.bgcolor     Color    default: (color 255 255 255)   --  animatable; RGB color; Controller Scaling: ([1,1,1] : (color 255 255 255))

Get/set the value of the "Background Color" color.

   

<TextMap>.fillbg     BooleanClass    default: true   --  boolean

Get/set the state of the "Fill Background" checkbox.

   

Characters Group Of Controls

<TextMap>.glyphoption    Integer    default: 2   --  integer

Get/set the selection of the "Characters" radio buttons.

Possible values are:

0 - Glyphs Only

1 - Extras Only

2 - Glyphs + Extras (default)

   

<TextMap>.filledcharacters     BooleanClass    default: true   --  Boolean

Get/set the state of the "Render Fill" checkbox.

   

<TextMap>.outlinedcharacters     BooleanClass    default: false   --  Boolean

Get/set the state of the "Render Outline" checkbox.

   

<TextMap>.stricthierarchy     BooleanClass    default: false   --  Boolean

Get/set the state of the "Strict Hierarchy" checkbox.

   

Outlines Group Of Controls

<TextMap>.outlinewidth    Float    default: 1.0   --  animatable; float

Get/set the value of the "Width" spinner.

It defines the thickness of the outlines.

   

Hierarchies Group Of Controls

<TextMap>.renderchildren     BooleanClass    default: false   --  Boolean

Get/set the state of the "Render Children" checkbox.

   

<TextMap>.renderroot     BooleanClass    default: true   --  Boolean

Get/set the state of the "Render Root" checkbox.

   

<TextMap>.mergeshapes     BooleanClass    default: false   --  Boolean

Get/set the state of the "Merge Shapes" checkbox.

   

Map Boundary Group Of Controls

<TextMap>.boundstype     Integer    default: 0   --  integer; _BoundsType

Get/set the state of the "Map Boundary" radio buttons.

Possible values are:

0 - Shape Bounds (default)

1 - Manual

2 - Pick

   

<TextMap>.manualwidth    Float    default: 100.0   --  float

Get/set the value of the "Width" spinner.

Used only when .boundstype is set to 1 – Manual.

   

<TextMap>.manualheight     Float    default: 100.0   --  float; ManualHeeight

Get/set the value of the "Height" spinner.

Used only when .boundstype is set to 1 – Manual.

   

<TextMap>.boundsobject     UndefinedClass    default: undefined   --  node

Get/set the scene objects to define the bounds.

Used only when .boundstype is set to 2 - Pick.

   

<TextMap>.hwbitmapsize     Integer    default: 256   --  integer

Get/set the value of the "HW Bitmap size" slider.

Controls the size of the hardware bitmap used for viewport display.

   

Coordinates Rollout

<TextMap>.coords     StandardUVGen    default: MtlBase:Placement   --  maxObject; Coordinates; SubAnim

See UVGenClass class for related properties.

   

<TextMap>.output     StandardTextureOutput    default: MtlBase:Output   --  maxObject; SubAnim

See TexOutputClass class for related properties.

   

TextMap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

   

Methods:

   

Actions:

EXAMPLE:

(
resetMaxFile #noprompt --reset the scene
	
local tp = textPlus() --create a TextPlus object to guide the texture map

tp.size = 25.0 -- make sure the size is set to default
tp.ResetString()--reset the string
tp.SetFont "Arial" 0	
tp.SetBold true
tp.AppendString "D"	
tp.SetBold false
tp.AppendString "oN't\n"	
tp.SetItalic true
tp.AppendString "Pa"	
tp.SetBold true
tp.AppendString "N"	
tp.SetBold false
tp.AppendString "iC!\n"	
tp.SetItalic false
tp.SetFont "Wingdings" 0	
tp.AppendChar 74

tp.layouttype = 1 --enforce Region Layout Type
tp.length = tp.width = 100 --enforce width and height of 100.0

tp2 = textPlus pos:[0,-87,0] --create another TextPlus object
tp2.parent = tp --parent to the first one
tp2.ResetString() --reset the string
tp2.SetFont "Arial" 0	--set the font to Arial
tp2.AppendString "megadodo publications" --set the text
tp2.size = 8.0 –change the size 

local tm = textMap() --create a new text map
tm.textobject = tp --set the shape of the map to the TextPlus object
tm.fillcolor = color 0 255 100 --set the character fill color to green
tm.fillbg = false --do not fill the background
tm.outlinecolor = orange --set the outline color to yellow
tm.filledcharacters = true --enable filling 
tm.outlinedcharacters = true --enable outlines 
tm.outlinewidth = 5 --set the outline thickness
tm.alphasource = 0 --enable alpha 
tm.renderchildren = tm.renderroot = true --render both TextPlus objects in the hierarchy

local mm = multiMaterial numsubs:6 --create a new mutli-sub material
mm[1] = standard() --create a standard material for the front
mm[2] = mm[3] = mm[4] = mm[5] = mm[6] = standard() --create a second standard material for all other sides
mm[1].diffuse = mm[2].diffuse = color 0 10 25 --set the sides to the same dark blue color 
mm[1].diffusemap = tm --set the textMap in the diffuse map slot

meditMaterials[1] = mm --display the material in the first slot of the Material Editor 
matEditor.mode = #basic --set the Material Editor to compact mode
matEditor.open() --open the Material Editor if it is not open yet

local b = box width:200 length:300 height:10 pos:[200,0,0] --create a box primitive
b.material = mm --assign the material
b.mapcoords=true --enable texture coordinates

showTextureMap mm[1] tm true --show the map in the viewport
hide tp --hide the TextPlus object
select b --select the box
max zoomext sel all --and zoom extents selected

local splt = splat() --create a Splat texture to abuse as a sky map
splt.size = 0.01 --make very small splats
splt.iterations = 1 --do only one iteration
splt.threshold = 0.1 --keep the threshold very low
splt.color1 = black --star color
splt.color2 = white --space color
environmentMap = splt --set the environment map to the Splat texture

render outputsize:[1280,720] --render

OK
)