imf_copy question


#1

hi

trying to convert a jpg image to .map by entering “imf_copy file.tif file2.map” in the command line but keep receiving the message “cannot find procedure imf_copy”.

another question, can someone point to a (good yet simple) tutorial on rendering in layers to get started?

thanks


#2

You need a path to the Maya bin location in your environment. Do you know how to extend the PATH environment variable on your machine, assuming you have Windows?

Once you have added the path typically something like, C:\Program Files\Autodesk\Maya 8.5\bin, then it should work. Check that directory to see that imf_disp is there. And don’t forget to create a new command shell to take pick up the modified environment variable.

Finally, if using 8 or 8.5, make sure to use at least the -r option to get textures which can use texture caching. And -p will add pyramid/mipmap abilities.

imf_copy -p -r file.tif file2.map

[Also, you said jpg, but I assume either you mean tif, or your imf_copy example should have had file.jpg as the source file. :)]


#3

wish there is a was way to batch a series of images :)).


#4
Do you know how to extend the PATH environment variable on your machine, assuming you have Windows?

Dont know. And im using windows.
the path exists and i copy paste it when asked by PS, tried either -r and -p, same results, last step PS gives the info that it cannot find the path.

and yes i meant file.jpg :slight_smile:


#5

you can batch things on windows from the command line by:

all tif files:

 for %1 in (*.tif) do imf_copy -p %1 %1.map

all files:

 for %1 in (*.*) do imf_copy -p %1 %1.map

you will get double extensions but it works.

/Smaragden


#6

Daniel Rind posted this batch file ages ago to do just that. Put it on your desktop and drag and drop multiple files on to it. I can’t remember where he posted it and I can’t find it on his site but here it is. I hope he does not mind me sharing it here. (You’ll need to change the maya path for your own and modify the parameters as necessary).

http://animus.brinkster.net/index.html


REM @ECHO OFF
REM Simple mass file conversion using imf_copy
REM by Daniel Rind, enjoy
REM modify the imf_copy line to change parameters
:convertfile
@IF “%1” == “” GOTO end
C:“Program Files”\Alias\Maya7.0\bin\imf_copy -p -v %~f1 %~d1%~p1%~n1.map
@SHIFT
@GOTO convertfile
:end
@ECHO.
@ECHO Done!
@pause


#7

there was another thread on how to use it with photohsop
you can also do an entire folder with that method as well


#8

Seeing this scripts, remember not to forget the -r option if you are using Maya 8.5.
This is the tiled format option which allows textures to be cached, ie, flushed in and out of memory. Otherwise, once they are read in, they take up room in the scene cache for the entire render.


#9

i made a simple mel that convert selected filenodes or alle file node to map with the -r -p option

i will update it later when i got some time :slight_smile:
but her it is, it should work fine.


#10

On my x64 system the -r option gives me garbled map files (on maya 7 anyway). Has this been changed in 8.5?


#11

In Maya 7, it was the maya_file node that did not know how to use tiled texture maps. It could cause file reading artifacts especially when changing the uv control. Maybe that was what caused it to be garbled?


#12

Thanks for the tip, it is bang on. Setting up a MR file texture and using a map file seems to work where as the maya file texture is garbled. Hmmm… maybe it is time to upgrade after all.


#13

Humm I tired your mel today…and i got the file got converted but I t’s not there in my texture folder ?

Edit
I thin k Ifound the problem
it’s the name space
for example if the file is located in c:\My Documents\ect…, it dosn’t like “spaces” so it won’t do it


#14

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.