Mip Maps in 3DS Max with Mental Ray

Mip Maps in 3DS Max with Mental Ray

Mip Maps are pre processed texture maps for use in rendering. They take more hard drive space, but can help reduce processing by storing multiple,
preprocessed resolutions of the same texture in one file. This allows a renderer that supports them to quickly load the file and not waste time on preprocessing/filtering. In addition, renderers such as Mental Ray can load portions of these maps as needed and unload them at render time. In contrast,
3DS Max’s scanline renderer loads all maps into memory at once. Loading maps as needed can add to render times, but loading all maps at once on a scene with many large texture maps will choke or crash your software making it impossible to render the scene.

Mental Ray supports Mip Maps through a “.map” file format that can be converted to from various bitmap files (uncompressed TIF, TGA files, etc) using a utility it ships with called imf_copy.exe.

Unfortunately 3DS Max does not directly support the use of “.map” files in Mental Ray, so below I will describe a work around to use them in 3DS Max 2011.

1. Some Mental Ray Setup changes:

First you’ll need to edit a Mental Ray file called base_mix.mi in order to access the map type needed to use “.map” files. Go to:

Change: This button goes through all BitmapTexture maps in the scene and replaces them with Mental Ray Texture Lookup 2 maps containing the corresponding .map file if it exists.

Reverse: Changes map files back to bitmaps.

Make Scene Matlib

Make Scene Matlib: This creates a temp material library in the Material/Map Browser containing all scene materials, which you can save manually. Useful for keeping a set of materials with BitmapTexture and one with .map files.

Mat Changer

I use this to take a set of materials made for one character and apply it to another. This is more name dependent so it may not work for everyone. Material libraries need <src_char>_map or <src_char>_bmp names. Swaps the src string for trg string in each filename.

Src Char: Source String

Trg Char: Target String

Mtl_Type: Map or Bmp (Looks for matlibs named <src_char>_<Mtl_Type>)

Mat Path: Folder containing your matlibs.

Render Setup

In your Mental Ray render settings, under Processing set the Memory Options to the following.

This will allow you to take advantage of Mental Rays Object and Texture loading efficiencies. That’s all, now you can render scenes with more textures and geometry than you could before.

In Case you want to know how this works for your own customizations, here are some manual instructions to do what the script does to create .map files. You don’t need to do any of this if you use the script.