BitmapTexture : TextureMap

Bitmaptexture - superclass: textureMap; super-superclass:material - classID: #(576, 0) 

Value > MAXWrapper > Material > TextureMap > BitmapTexture



Materials and Maps - Quick Navigation




<Bitmaptexture>.bitmap Bitmap default: Bitmap: 

The bitmap of the texture map.

The script can perform any bitmap operations on this bitmap and the changes will be reflected in the texture map.

In order to see the results of changing the bitmap in Material Editor and in the viewports, you need to modify any one bitmapTexture property in the Material Editor user interface.


<Bitmaptexture>.filename Filenamedefault: "" -- alias: file_name 

The name of the bitmap file.


<Bitmaptexture>.filtering Integer default: 0 

The method of pixel averaging used in anti-aliasing the bitmap:

0-Pyramidal (Requires less memory and is adequate for most purposes.)

1-Summed Area (Requires much more memory, but yields generally superior results.)

2-None (Turns off filtering.)


<Bitmaptexture>.monoOutput Integer default: 0 

Some parameters, such as opacity or specular level are a single value as opposed to a material’s three-value color components. Controls in this group determine the source of the Output mono channel in terms of the input bitmap:

0-RGB Intensity (Uses the intensity of the red, green, and blue channels for mapping. The color of the pixels is ignored and only the value or luminance of the pixels is used. The colors are computed as gray values in the range between 0 (black) and 255 (white).)

1-Alpha (Uses the intensity of the alpha channel for mapping.)


<Bitmaptexture>.RGBOutput Integer default: 0 

The RGB Channel Output determines where the output RGB part comes from. The controls in this group affect only maps for material components that display color: Ambient, Diffuse, Specular, Filter Color, Reflection, and Refraction.

0-RGB (Displays the full color values of the pixels.)

1-Alpha as Gray (Displays tones of gray based on the levels of the alpha channel.)


<Bitmaptexture>.apply Boolean default: false 

Turn on to use the cropping or placements settings.


<Bitmaptexture>.cropPlace Integer default: 0 

Set whether cropping or placement is active:




<Bitmaptexture>.clipu Float default: 0.0 -- animatable, alias: clip_u_offset 

Adjusts the bitmap location along the U-axis.


<Bitmaptexture>.clipv Float default: 0.0 -- animatable, alias: clip_v_offset 

Adjusts the bitmap location along the V-axis.


<Bitmaptexture>.clipw Float default: 1.0 -- animatable, alias: clip_u_width 

Adjusts the width of the bitmap.


<Bitmaptexture>.cliph Float default: 1.0 -- animatable, alias: clip_v_width 

Adjusts the height of the bitmap.


<Bitmaptexture>.jitter Float default: 1.0 -- animatable, alias: jitter_placement 

The amount of random offset. At 0, there is no random offset.


<BitmapTex>.useJitter Boolean default: false -- boolean 

Apply the .jitter value.


<Bitmaptexture>.alphasource Integer default: 0 

Controls in this group determine the source of the Output alpha channel in terms of the input bitmap:

0-Image Alpha (Uses the image’s alpha channel.)

1-RGB Intensity (Converts the colors in the bitmap to grayscale tonal values and uses them for transparency. Black is transparent and white is opaque.)

2-None (Opaque; does not use transparency.)


<Bitmaptexture>.preMultAlpha Boolean default: true 

Determines how alpha is treated in the bitmap. When turned on, the default, premultiplied alpha is expected in the file. When turned off, the alpha is treated as non-premultiplied, and any RGB values are ignored.


<Bitmaptexture>.starttime Timedefault: 0f 

Get/set theframeof the scene time rangewhere theanimated bitmap (multi-frame file like AVI, MOV or IFL describing a sequence of single frames) will play back its first frame.


<Bitmaptexture>.playbackrate Float default: 1.0 

Get/set the playback rate of an animated bitmap (multi-frame file like AVI, MOV or IFL describing a sequence of single frames). This property lets you speed up and slow down the animation-for example, 1.0 is normal speed (one bitmap frame per scene time frame), 2.0 is twice as fast (every second bitmap frame shown on each scene time frame), .333 is one third of the original speed (each bitmap frame held for three scene time frames) and so on.


<Bitmaptexture>.endcondition Integer default: 0 

These controls determine what happens after the last frame of the animation:

0-Loop (Causes the animation to loop over and over again.)

1-Ping Pong (Causes the animation to be played backwards, making every animated sequence "loop smoothly")

2-Hold (Causes the last frame of the animation to be frozen on the surface until the end of the scene.)


<Bitmaptexture>.tieTimeToMatIDs BooleanClass default: false -- boolean; Tie_Time_to_Mat_IDs 

Corresponds to the Sync Frames to Particle Age checkbox in the Time rollout.


<Bitmaptexture>.coords StandardUVGen -- alias: coordinates 

See UVGenClass for the StandardUVGen properties.


<Bitmaptexture>.output StandardTextureOutput 

See TexOutputClass for the StandardTextureOutput properties.




Reload the bitmap. Corresponds to pressing the Reload button in the UI.



View the image source. Corresponds to pressing the View Image button in the UI.

NoteThese methods are identical to what is exposed in the bitmapTex interface.


-- get the diffuse map from the first material in Material Editor
dif_map = meditMaterials[1].diffusemap
-- if the diffuse map is a bitmap texture, show it
if classof dif_map == BitmapTexture do dif_map.viewImage()


Associated Methods

enumerateFiles [<MAXWrapper_obj>] <function> [<arg>][#inactive] [#videoPost] [#render] [#missing] [#localOnly] 

Lets you run through all the bitmap files currently used in the scene or in an individual object. You can filter this so it just gives you the bitmap files that are inactive or missing.

See Bitmap Files for a description of this method’s parameters.



Frees up all the memory used by the image file bitmap caches. This is useful if memory is fragmented with a lot of different bitmaps and you want to have just the ones currently active reloaded.



This method returns an array containing the filename strings of all bitmap textures used by the current scene.


Bitmap textures present only in the Material Editor but not assigned to the scene are excluded.

There is an optional MAXWrapper argument to this method:

usedMaps [<MAXWrapper>] 

If a MAXWrapper is specified, the method returns a list of all bitmap textures used by that object. In order to include all Material Editor bitmap textures, you can use:


fn allUsedMaps =
sceneMaps = usedMaps()
for m in meditmaterials do join sceneMaps (usedMaps m)

bitmapTexture interfaces:

Interface: bitmapTex 



Reloads the bitmap file using the same name and path. You don't need to use the file browser to reload the bitmap after you've updated it in your paint program.

Clicking reload for any instance of the map updates the map in all sample slots and in the scene.



Displays a Virtual Frame Buffer that shows the bitmap surrounded by a region outline. The region outline has handles at its sides and corners. When cropping is on, dragging the handles changes the size of the crop area. You can also drag within the region area to move it.

The VFB editing window has U/V and W/H (width/height) spinners on its toolbar. Use these to adjust the location and size the image or crop area.

When Place is turned on, dragging the region area handles changes the scale of the bitmap (hold down Ctrl to preserve the bitmap's aspect ratio), and dragging the image changes its location within the tile area.

When Crop is turned on, the UV or XY button at the right of the virtual frame buffer toolbar lets you switch between using UV or XY coordinates in the toolbar spinners. Also, you can zoom out by pressing SHIFT+Z and zoom in by pressing Z .

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License