A texture map statement names an image file, with options before it. The file name is everything after the last option, so names with spaces work where a program allows them. Texture maps multiply the matching value in the material.
map_Kd -s 2 2 1 -o 0.5 0 0 diffuse.png
map_d -imfchan m alpha.png
bump -bm 0.4 bumps.png
refl -type sphere room.png
The map statements
| Statement | Meaning |
|---|---|
map_Ka | A colour texture for the ambient colour, multiplying Ka. |
map_Kd | A colour texture for the diffuse colour. |
map_Ks | A colour texture for the specular colour. |
map_Ns | A scalar texture multiplying the specular exponent. |
map_d | A scalar texture multiplying the dissolve. |
map_aat on | Anti-aliases this material’s textures. Takes on or off, and no file. |
decal | A scalar texture that blends the texture colour over the material colour. |
disp | A scalar texture that displaces the surface to add roughness. |
bump | A bump texture that perturbs the surface normals. Also seen as map_Bump and map_bump. |
refl | A reflection map, with -type saying its form. |
Colour textures in the specification are .mpc or .cxc
files, or images. Scalar textures are .mps or .cxs, or
images. Bump textures are .mpb or .cxb, or images.
Maps from extensions
| Statement | Meaning |
|---|---|
map_Ke | Emissive colour. |
map_Pr | Roughness. |
map_Pm | Metallic. |
map_Ps | Sheen. |
norm | A normal map, in which red, green and blue hold the X, Y and Z of the surface normal. |
map_RMA, map_ORM | One image holding roughness, metalness and ambient occlusion, from a DirectXMesh extension. |
Options
| Option | Meaning | Default |
|---|---|---|
-blendu on|off | Blending across the texture, horizontally. | on |
-blendv on|off | Blending across the texture, vertically. | on |
-bm mult | Bump multiplier, for bump only. Values from 0 to 1 work best. | not given |
-boost value | Sharpens mip-mapped textures. Not negative. Higher values can cause crawling in animation. | not given |
-cc on|off | Colour correction, for map_Ka, map_Kd and map_Ks only. | not given |
-clamp on|off | Limits the texture to the 0 to 1 range. | off |
-imfchan r|g|b|m|l|z | The channel a scalar or bump texture reads. | l, or m for decal |
-mm base gain | Adjusts the range of the texture’s values. | 0 and 1 |
-o u [v] [w] | Moves the texture’s origin. | 0 0 0 |
-s u [v] [w] | Scales the texture. | 1 1 1 |
-t u [v] [w] | Adds turbulence. | 0 0 0, none |
-texres value | The texture’s resolution. | the largest power of two no bigger than the source image |
-type | The form of a refl map: sphere, with one file, or cube_top, cube_bottom, cube_front, cube_back, cube_left and cube_right, with one file each. | not given |