map format in mental ray

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 06 June 2005   #1
map format in mental ray

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
 
Old 06 June 2005   #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"
 
Old 06 June 2005   #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
Attached Images
File Type: jpg 1.jpg (24.7 KB, 169 views)
 
Old 06 June 2005   #5
Can you upload the JPG to the web so I can try it on my computer?
 
Old 06 June 2005   #6
This the jpeg. See if you can convert it to a map file that renders correct. Big THX
Attached Images
File Type: jpg test.jpg (69.2 KB, 139 views)
 
Old 06 June 2005   #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?
 
Old 06 June 2005   #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.
__________________
Colin Strause
http://www.hydraulx.com/
 
Old 06 June 2005   #9
Originally Posted by Jackdeth: 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.


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...
 
Old 06 June 2005   #10
Right from the manual:

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.
__________________
Colin Strause
http://www.hydraulx.com/
 
Old 06 June 2005   #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.
__________________
Colin Strause
http://www.hydraulx.com/
 
Old 06 June 2005   #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?
__________________
Are you warm, are you real, Mona Lisa?
 
Old 06 June 2005   #13
Originally Posted by undseth: Does anyone have any experience with using grayscale-like textures as .map files?

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..).
__________________

Astro Man
!!!!!!!

Six Tuts On Light And Shade
 
Old 06 June 2005   #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.
__________________
Are you warm, are you real, Mona Lisa?
 
Old 07 July 2005   #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
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:14 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.