PDA

View Full Version : .map files in Max


arditti
October 24th, 2006, 19:18
Does anyone know if there is a way to use memory mapped images in 3ds Max? (.map) I used them in Maya and worked like a charm, I didnt need to worry about texture resolution. Now I am working on a project in Max, and I am trying to use mental ray displacement with high res displacement maps as well as textures. But it is running out of memory. I was able to convert the textures to .map, but when I try to load them in Max, it doesnt recognize the file format.

Thanks

morbid angel
November 17th, 2006, 21:57
I would say, thought not a max/mr user, that in such case there should be a custom texture map loader, which can recognize .map file. For example in maxwell, there is an mxi_texture file which can read mxi texture. Perhaps search for that...

dashkevicz
May 2nd, 2007, 11:18
I haven't tried it yet, but I've read that mental ray detects a map file even if the extension isn't right. you could try mislableing the map file and loading that into max..... maybe. I would love it if max supported map format officially, even better if it Properly used the map format for storing the frame buffer.

maxplugins
May 2nd, 2007, 19:09
There is a way to use them in Max, but first you need to edit your 'base.mi' and find the GUI settings for 'mib_texture_lookup2'. After making a backup copy of your 'base.mi', add a # in front of the word "hidden".

gui "gui_mib_texture_lookup2" {
control "Global" "Global" (
# "hidden"
)
}


Now open Max, and everywhere you would normally use a bitmap, you can use mib_texture_lookup2 and put your .map file in the texture slot. The factor setting is for tiling, so 1.0 is the standard setting.

I've written a MAXScript that automatically goes through your scene and converts all of the bitmaps to .map files, and then replaces all of the bitmaps with mib_texture_lookup2 + .map. It works great (and scenes render faster), but the problem is that if you've used UV offset, mirror, blur etc in your bitmap, I haven't found a way to transfer these settings to the .map file.

Dave
http://www.maxplugins.de

maxplugins
May 8th, 2007, 01:00
I've just put the script I mentioned in the previous post online, you can find it here: http://www.anidesign.de/mapcon/mapcon.htm

Maybe it'll be useful for someone.

Dave
http://www.maxplugins.de

Brian Bradley
May 8th, 2007, 04:00
Thats Cool,

Thanks for your generosity. :)

Regards
Bri

dashkevicz
May 18th, 2007, 01:21
I've found that the Texture Lookup (base) seems to work (sort of...) with the UV Generator. Put the UV Generator in the "coord" slot, uv gen is actually documented in max's help file. I haven't had a chance to test it much, but it lets you select the mapping channel and looks like it lets you set tiling, blur, etc.

Thanks maxplugins, I've tried your script, but it dosn't seem to generate the map files for me, that's fine though, I just convert manualy.

maxplugins
May 18th, 2007, 19:18
Doesn't the script do anything?

I've tried it on a load of different systems, and have also had other people tesing it for me, and up to now it has worked fine (except with LZW-compressed TIF files)

So what happens when you run the script? If it's a bug then I would like to fix it...

Dave
http://www.maxplugins.de

dashkevicz
May 19th, 2007, 05:57
Hi maxplugins,

Well, the script seems to call a dos window for each bitmap it finds. It also retargets the new materials to where the images should be. The only thing it doen't do is create the map files. We store our texture files on a file server and acces them from there FYI. Let me know if there is anything else I can tell you to help.

-D

maxplugins
May 19th, 2007, 19:20
Are you using the UNC path option in the script?

And have you tried saving the .map files to a local folder? If that works, then there is a problem with writing the .map files to the fileserver.

I'd be grateful if you could try this out and let me know...

Thanks,

Dave
http://www.maxplugins.de

dashkevicz
May 20th, 2007, 09:50
OK- I'll try monday.

Hve a good weekend!

Edit: So, I tried the unc option, still nothing. I created a test scene with only local bitmaps and it did work, so it looks like a problem with textures on a network.

dashkevicz
May 24th, 2007, 05:08
See Above Post:

Also, the map files were always set to save localy, but the source textures were. When I tried the script with local sources and local "map" files it worked. I have yet to try writing maps to the sever using your script.

maxplugins
May 24th, 2007, 08:18
I tested the script with maps on network drives, which is also the reason why I added the UNC option, in case the drive wasn't mapped on all render slaves. It works OK here, but maybe something is different in my setup.

Any information about your network, OS etc. could be helpful in sorting this out. If you want to take this to email, my address is dave@maxplugins.de.

One thing that I just thought of: are your maps in different mapping channels? Like are you using channels other than channel 1? Because this is a known problem, and I haven't got round to fixing it yet...

Dave
http://www.maxplugins.de

bart
May 24th, 2007, 13:32
Just to clarify some potentially misleading mental ray terminology.

A mental ray texture when specified as 'local' means that its pathname makes sense locally. It doesn't necessarily mean that it has to be physically on the machine.

This is important for distributed network rendering when more than one machine is working on a frame. When the texture is classified as local, the texture is accessed directly from each rendering machine rather than through the master render machine. So the pathname must make sense for more than just the master. It will also reduce network traffic, so that portions of textures traverse direct non-stop to the machine that needs the portion of texture.

dashkevicz
May 25th, 2007, 02:06
Thanks Bart, mr's terminology can be misleading at times. When I said "local texture" I ment on my machine's hard drive...

Thanks for the invite Maxplugins, but if you don't mind I'd rather keep it on this thread: I don't like to check my email "on the clock" and this way others can see the solution. (I hate when I'm following a thread and the solution never makes it to the thread.)

Yes, I put maps on multiple uvw channels on a regular basis (I've found that the UV generator shader works, but only with "Texture Lookup (base)" ), but I think one of the test scenes I used didn't use mapping channels above one.

Our workstations are a mix of Windows XP (sp2) and Windows 2000 (sp4). Our file server is Windows 2000 server. All workstations can see the file serve and all also have the same drive mapping.


May 11 09:52:16 2007
.20: raylib[816] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\NetRender\\Maps\\Concrete\\conc rete07-r.jpg
May 11 09:52:16 2007
.20: raylib[1192] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\00-Ryan's-Net Folder\\00-Ryan's-Project Files\\15585-DishnerMoore-ChapelHillAni\\Textures\\S-GrassMask.jpg
May 11 09:52:16 2007
.20: raylib[3900] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\00-Ryan's-Net Folder\\00-Ryan's-Project Files\\15585-DishnerMoore-ChapelHillAni\\Textures\\15585-Traffic.jpg
May 11 09:52:16 2007
.20: raylib[2804] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\00-Ryan's-Net Folder\\00-Ryan's-Project Files\\15585-DishnerMoore-ChapelHillAni\\Textures\\S-GrassMask.jpg
May 11 09:52:16 2007
.20: raylib[2608] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\NetRender\\Maps\\Concrete\\conc rete07-r.jpg
May 11 09:52:16 2007
.20: raylib[3552] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\NetRender\\Maps\\Concrete\\conc rete07-r.jpg
May 11 09:52:17 2007
.20: raylib[3388] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\NetRender\\Maps\\Concrete\\conc rete07-r.jpg
May 11 09:52:17 2007
.20: raylib[2600] MAIN fatal: imf_copy: cannot open Artserv\\drawings\\NetRender\\Maps\\Concrete\\conc rete07-r.jpg


That is a snippet from the raylib.log file on my machine. Also, my command prompt seems to not like UNC paths.

hot chip
September 23rd, 2007, 11:08
hi

we have found a solution for using the map-format + bilinear filtiering: we use mib_texture_vector, mib_texture_remap, mib_texture_filter_lookup.

thread: http://forum.german-mentalray-wiki.info ... =6175#6175 (http://forum.german-mentalray-wiki.info/viewtopic.php?p=6175#6175)

demofile is here in the attachment, you must registered for download the max9 file: http://forum.german-mentalray-wiki.info ... =6293#6293 (http://forum.german-mentalray-wiki.info/viewtopic.php?p=6293#6293)


english:
http://forum.german-mentalray-wiki.info/userpix/2_Elipticfilter_1.jpg

german new version:
http://forum.german-mentalray-wiki.info/userpix/5_bo_mapfiltering_3.jpg

intensität: itensity
aa qualität: aa quality
max. Pixel: max. Pixel
Oberflächenkrümmung: Surface curvature
Kachelung: Tiling
Verschieben: offset
Bilinear an/aus: on /off
transparenz aus/an: transprency on/off, because the map-format + bilinear don´t work 100% in 3dsmax.

mfg
hot chip