ScriptSpot

Script

mental ray .Map Converter v1.1

By maxplugins · Credited author: David Baker · 2007-05-07

Version
v1.1
Version requirement
Max 9
Other software required
<p> Most importantly, you need the program imf_copy.exe from mental images.<br /> imf_copy comes with XSI and Maya, but not with Max.<br /> There are however learning versions of both XSI and Maya, both of which include imf_copy.<br /> </p> <p> You also need to make a change to your base.mi (in maxfolder/mentalray/shaders_standard/include).<br /> First of all make a back-up copy of your base.mi file before making the change!<br /> Then search for the text &#39;gui &quot;gui_mib_texture_lookup2&quot; {&#39; and then put a hash (#) in front of the word &#39;hidden&#39; </p>
Date updated
2007-05-07
Votes
21
Download
Download
Description


This MAXScript collects all of the bitmaps in your scene, converts them to mental ray .map files, places them into
a directory of your choice, and replaces all bitmap textures with a 'mib_texture_lookup2' shader containing the new
.map files.

Additional Info

If the backup option is checked, the script automatically saves a backup of your file (filename_backup.max), and when it has finished converting the bitmaps, automatically saves a new copy of the file (filename__mr_maps.max).

The 'Update Scene' option converts all bitmaps and then replaces all of the bitmaps with a mib_texture_lookup2 shader containing the .map file.

If you save the maps to a network drive, you also have the option of converting the mapped path to a UNC path.

If you notice that some bitmaps aren't being converted, it is probably due to the file format of the bitmap. For example, imf_copy doesn't like LZW-compressed TIF files.

Tags: mental ray, map, file, convert, .map

Comments (5)

futbol4 · 2009-10-12

If you are wanting to use this for Max 2010 we learned the shader you need to unhide "gui_mib_texture_lookup2" is in your "C:\Program Files\Autodesk\3ds Max 2010\mentalray\shaders_standard\include\base_max.mi" file and NOT "base.mi".

same instructions just use that file.

quickaboo · 2007-05-24

Great!

jhn · 2007-05-08

Dave, what are the advantages of map files over tga/tiff/etc..?

-Johan

maxplugins · 2007-05-08

.map files are uncompressed memory mapped textures, which means that mental ray never needs to load the whole bitmap into memory like Max does. It just fetches the bit it needs for the bucket it's rendering form the hard drive, and then dumps it when it's finished with it.

This can be useful when rendering very large images with huge texture, but the problem is the missing support in Max for this type of image. mental ray can render them, but there is no way of setting up the tiling, UV offsets etc.

Dave

Ooh, that's really cool, I

jhn · 2007-05-08

Ooh, that's really cool, I didn't know that! Thanks, I learn something new every day!

 Cheers,

-Johan