View Full Version : Best image format?
07 July 2007, 02:24 PM
I was playing around with an object that has loads of high res maps ( 3k-4k res) Now coming from a LW background I know that if I optimize all the grey scale images to indexed color png's I can save mountains of ram. It works like a charm in LW since if you don't need 24 million shades of grey then you can strip them out and leave only the 128 or 64 that are really there. I assumed that would work in XSI but it appears that it doesn't like indexed images. Is this true or am I just doing something wrong? Also what format are you all using on your models? I've tried to stay away from .jpg since its not a lossless format.
07 July 2007, 04:35 PM
i usually go for .pic, .tga or .map
as far as i know any format will use an equal amount of ram in mental ray except .map files, so if you use .png or .pic doesnt matter as far as memory usage goes..
.map on the other hand will be "streamed" from the disk rather than being loaded into ram like the other formats..
open the xsi command prompt and type imf_copy to find out how to convert your files to .map
07 July 2007, 07:05 PM
.map is the way to go as wurp said. There is a batch file floating around that simplifies the process and makes it a drag and drop affair. It will produce large files, but .maps are used efficiently in mr in that they only sample what is needed from the given viewpoint. If I remember correctly .map files also contain several different resolutions of the image- and those are use appropriately as well by mr- mip mapping in a sense if I understand it correctly.
There is an option in the render preferences that allows this process to be automated- I believe you can tell it to generate a .map file for any file over X resolution. In my experience this slows down the first frame of a render a bit since it's generating it at that time (I think at least) but saves time/memory on the other frames.
07 July 2007, 09:50 PM
...There is a batch file floating around that simplifies the process and makes it a drag and drop affair...
Can anybody tell us where to find this ?
07 July 2007, 06:42 PM
@IF %1 == "" GOTO end
imf_copy -p %1 "%~d1%~p1%~n1.map"
Copy and paste that into a txt file and rename the file WhateverYouWant.bat
07 July 2007, 06:47 PM
Also, here is the imf_copy help if you want to tweak that bat file:
image file copy and conversion utility for mental ray.
usage: imf_copy [-vegqfpLBrkx]] inimage outimage [outformat [outtype]]
imf_copy -c [-vgfr] inimage* outimage.map
-v verbose output
-e perform error diffusion
-g G gamma correction with exponent G, default 1.0
-q N if outformat is jpg: compression quality N=1..100
-f F if outformat is map: filter value F, default 1.0 (experimental)
-p if outformat is map: create filtered image pyramid
-L if outformat is map: output little-endian files
-B if outformat is map: output big-endian files
-r if outformat is map: use tiles (remap pixels)
-k K if outformat is exr: select compression algorithm:
K=none, piz, zip, rle, pxr24, default is rle
-c collate up to 20 images to pyramid map, largest first
-x N extract image N=0..19 of pyramid map, largest is 0
07 July 2007, 08:42 PM
Thank you so much visualboo !
I had no idea I could drag and drop on a .bat file
Thanks again !
07 July 2007, 08:42 PM
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.