map format in mental ray


#1

I convert my jpeg images to *.map files for them to be more memory efficant. But when I use the -p flag in imf_copy my maps turn black. Is there anyone out there how are used to converting images to *.map files and has seen this problem before?

/D


#2

Strange… I never had this problem and I converted around 200 images from JPG and other formats.

Try this. Import the JPG file in photoshop, save it as uncompresed TIF and then try to convert it.

“imf_copy -p image.tif image.map”


#3

try this
http://www.cgtalk.com/showthread.php?t=194935

neo


#4

thanx… I tried to convert if to a .tif first but that didnt work out. The map gets distorted somehow. The script by Franscesca seams nice but I get an error in PS when using it. Please look at the attached image and see if you have any clues


#5

Can you upload the JPG to the web so I can try it on my computer?


#6

This the jpeg. See if you can convert it to a map file that renders correct. Big THX


#7

Hi. I just converted the jpg file and done the test render and it works.
Can you explain your process of converting, and which maya do you have?


#8

First off, how big is that JPEG anyways? Unless is over 10,000 pixels, you might actually make your render slower because instead of the image being in RAM, it’s in a pseudo-swap file.

I’m using .map textures right now for getting three 20,000x20,000 texture maps rendering, and it’s working amazingly well. Now the only problem is copying the images to render farm, which can take a long time.


#9

This isn’t true. Read the documentation and you will see that it suggest that you convert to MAP every image bigger than 100 kb. Every image in other format needs to be loaded to ram and converted to the internal mentalray image format which is MAP. This takes time and memory. So why to let render bother with this when you can convert it before you start to render and save a lot of memory and time.
The only situation where the reading of texture is slower is the tiled version (-r) but it is more memory efficent…


#10

Right from the manual:

[i] If the texture and scene are not large and fit into memory, and if the texture is accessed frequently, memory-mapped textures are slightly slower than regular textures because the swap would not have been used, but for textures that are larger than perhaps a hundred kilobytes (uncompressed), memory mapping is a much more efficient way of loading textures.

This is especially important for mental ray 3.x, which manages memory as a cache. Non-memory mapped textures are a big drain on the cache because they tend to take up large portions of cache memory. mental ray 3.x has a separate virtual cache manager that loads and unloads memory-mapped textures efficiently without blocking the regular cache.[/i]


#11

Not to mention, there is a big hassle copying the files to an entire render farm (and making sure that when up dating the images they are all done so you don’t get any version problems), so .map textures should only be used when it’s really needed. Also, on Linux I have lots of issues with MR and tifs, so we use SGI images out of photoshop.


#12

"Note that memory mapping is based on the concept that the image data on disk does not require decoding or data type conversion, but is available in the exact format that mental ray uses internally during rendering.

Normally mental ray will attempt to auto-convert image data formats; for example if a color image file is given in a scalar texture construct, mental ray will silently convert the color pixels to scalars as the texture is read in.

Most data types are auto-converted to most other data types. This does not work for memory-mapped textures because it would defeat the purpose. This also applies to the byte order."

I want to throw in a question here:
I wonder about something with the use of maps for bump and reflectivity, where you only need a grayscale like image for texture. I use rgb images converted to the .map format (memory mapped textures), but as these rgb files are larger than a grayscale-like image, I wonder how one goes about making such .map files, where the files are only about a third in size as they are grayscale-like-based and not based on a three channel image.

I know about converting rgb images to the .st format (scalar texture) (in 8 or 16 bit), but I cant get this to render as expected when doing an additional conversion from .st to .map.

Does anyone have any experience with using grayscale-like textures as .map files?


#13

Yes, and it didnt work. Tif is able to hold a grayscale channel only for example. But this subformat of tif is explicitly not supported by mentalray/imf_copy. Png and sgi seem to get converted to rgba internally upon imf_copy treatment. And openEXR doesnt handle grayscale only for now (I guess?).
To come around this, paint your gray textures into the separate rgba channels, and extract that information later on in maya by using only the r, g, b or a channel as an input for your attributes, depending on where you put the info (you could paint reflection into r, bump into b for example…).


#14

Thanks. I was about to ask about just that trick you mention with using the rgba channels for holding several maps.

I tried this trick earlier, but because I got some kind of noise when rendering the bumpmap (I guess I did something wrong in photoshop) I gave up (its just a hobby for me).

I wonder if I should have painted the maps directly into the channels as you specifically typed, and not paste stuff into the channels from maps already made in the rgba format. Hmm. Eh well, I guess I should check up on this.


#15

InTerceptoV!!! CAn you mail me your converted map file. Also what flags do you use in the imf_copy. Hate to be this silly, but I dont get it to work. THX everyone for the useful info. Keep it röcki´n… mail. daniel@tussilago.se


#16

i’m having the same texture layout problems in MR now… In the viewport texturelayout of the object seems fine. But in the rendered image its all scrumbled.

anyone got a hint…


#17

Im having the same problem, in that the textures in the viewport are fine, but when I render the positioning is way off, as if the UV coords are all screwy just for the .map files.

I’ve been using .map textures for a while too, and this has never happened. Any suggestions?

EDIT: Just found the problem. Don’t use the -r flag in IMF_copy when making your textures. Doesn’t seem to like it! Not sure why?


#18

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.