PDA

View Full Version : imf_copy question


giobon
03-30-2007, 06:49 PM
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

bgawboy
03-31-2007, 03:15 PM
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. :)]

royterr
03-31-2007, 07:32 PM
wish there is a was way to batch a series of images :)).

giobon
04-05-2007, 12:14 AM
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 :)

smaragden
04-05-2007, 09:07 AM
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

bmcaff
04-05-2007, 09:27 AM
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

Ash-Man
04-05-2007, 06:05 PM
wish there is a was way to batch a series of images :)).
there was another thread on how to use it with photohsop
you can also do an entire folder with that method as well

bgawboy
04-06-2007, 03:11 PM
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.

Osaires
04-06-2007, 03:43 PM
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 :)
but her it is, it should work fine.

bmcaff
04-06-2007, 07:55 PM
On my x64 system the -r option gives me garbled map files (on maya 7 anyway). Has this been changed in 8.5?

bgawboy
04-06-2007, 10:20 PM
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?

bmcaff
04-06-2007, 11:37 PM
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.

Ash-Man
05-09-2007, 02:59 PM
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 :)
but her it is, it should work fine.

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

CGTalk Moderation
05-09-2007, 02:59 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.