View Single Post
11-08-2007   #1 (permalink)
sgraae
Operator
 
Join Date: Nov 2007
Posts: 1
sgraae has disabled reputation
Hey All,

I am new to programing as I am to this forum (that new for those interested).
I am not a programmer by profession but I do defently like to tumble around with the codes once in a while - but on a every day basis I deliver graphic design for freelance client.


So here is the question:

I am working with Autodesk Maya / Mental Ray (for rendering) and I am also using zBrush to generate what is known as Displacement maps for my low res models in maya.

To do so I need to do as following (this portion is take from a thread at zBrush central - the zbrush forum
also imf_copy

in osx, it is located inside the maya application. find the application and right click it. you will see a list of options on of which is "show package contents". imf_copy is located in contents, bin folder. change anything in any of vthese folders at your own peril. this is what makes maya work.

if you double-click imf_copy, terminal will open and spit out some data:

/Applications/Alias/maya7.0/Maya.app/Contents/bin/imf_copy; exit
image file copy and conversion utility for mental ray.
usage: /Applications/Alias/maya7.0/Maya.app/Contents/bin/imf_copy [-vegqfpLBrkx]] inimage outimage [outformat [outtype]]
/Applications/Alias/maya7.0/Maya.app/Contents/bin/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
logout
[Process completed]

this tells you everything you need to know, if you can understand it.
so you use this by typing in terminal:

/Applications/Alias/maya7.0/Maya.app/Contents/bin/imf_copy -v -p -L Documents/maya/projects/bird/091906/111306/111806/bird_repeltdisp.1001-R32.tif bird.map

so what's going on here. the first bit-
/Applications/Alias/maya7.0/Maya.app/Contents/bin/imf_copy
tells it what application to run

the second bit-
-v -p -L
is a list of options for imf_copy, their meaning is listed in the little printout above. -v = verbose output -p = pyramid map -L = little endian file
little endian is a bit order

the third bit-
Documents/maya/projects/bird/091906/111306/111806/bird_repeltdisp.1001-R32.tif
the file to converted

the fourth bit-
bird.map
the output file name

notice the spaces, they are important.


But in order for me to generate a displacement map that can be used in Maya / Mental Ray I need to do a little work around since I am on a mac - and I have been provided with a script which I am suposed to type in the terminal and that in it's self is okay but I wanted to create a GUI for this command.

And here is as I had imained:

1. Open the Converter.
2. Select which file to convert
3. Select distanation place and file name
4. Convert.
5. Finished

Now that sound simple in my head but I don't know where to start or what to look for - I got Xcode installed but with out a starting point there is no progress :-)

The script which I need to type is:


If you got any information on this matter or tutorials / case studies you want to share I would be really glad - Plus I am not afraid to get my hands dirty and learn a bit...

Thank you in advance...
Sofus
sgraae is offline   Reply With Quote