The script switches any texture file to use a Mental Ray .MAP file instead, but only during rendering. This seems to help with big texture memory consumption.
Since 3ds MAX does not support Mental Ray .MAP, the script temporarily changes the file name to the .MAP file only during rendering and then change it back when rendering is ready.
- Mental Ray is the selected renderer
- "Mental Ray Map Manager" is turned on (Render dialog, Processing tabb)
- "Conserve Memory" is turned on (Render dialog, Processing tabb)
THEN For any texture, in a pre-render callback:
- check if texture name + ".x.map" exists.
- if it does, use that file during rendering
- if it does NOT exist, check if file is larger than 1000 x 1000 pixel
- if it is, call the "imf_copy" DOS command line tool to convert the file
AFTER rendering is completed
- For any texture that ends in ".x.map", set back to original name (without ".x.map")
To convert manually, use Mental Images Command line tool like this
imf_copy -vrp some_file.jpg some_file.jpg.x.map map
This tool does not ship with 3ds MAX, but with other Mental Ray programs like Maya. Ask a friend! :D
The script always searches for file with same name plus ".x.map" at end. They dont even need to be same texture, could be simple placeholder used in max, with only real big texture in ".x.map" version. (I chose ".x.map" as addition becaus it is easy to find for resetting at the end of the render. You can change this in the script if you like.)
The script is very simple. You can put it in your Startup script folder, i.e:
c:\program files\Autodesk\3ds max 2009\scripts\Startup
You can also edit as you like for fun. For exampel choice of automatically convert for anything bigger than 1000 pixel is arbitrary, you can change yourself easy.
Script is public domain.