ZBrushCentral

.tif to .map solution

I used the search button, but i still cant fix this.

I cant get .map’s to come out of the convertfile.bat
here are my file names.( dispnorm1001Normal32.tif & dispnorm1001R32.tif )
it flashes the comand prompt then nothing.
do i have to edit this code in the .bat?
is there something i have to change in the .bat that needs to correspond with my computer?
quick codes used ( DE-LBEK-EAEAEA-R32 and DE-LCEK-FAIAJA-Normal32 )

:convertfile
@IF %1 == “” GOTO end
imf_copy -p %1 “%~d1%~p1%~n1.map”
@SHIFT
@GOTO convertfile
:end
@ECHO.
@ECHO Done!
@pause

i get this message in maya :
// Warning: Failed to open texture file D:/TEXTURES/dispnorm1001R32.tif

It sounds like you are executing the .bat like you would a normal file, i.e double clicking it. I believe you should do the following (note I have no experience with the .map process so I might be wrong).


  • Open a command prompt by pressing ‘Run’ on the start menu and typing ‘cmd.exe’.
  • Change the directory to where your .bat file is, for example, ‘cd E:/MayaUtils/convertmap
  • Execute the .bat file with the .tif as a parameter, for example, ‘convertfile C:/Mytextures/dispnorm1001R32.tif’.

You .map file will appear in one of the two directories (I hope).

If that works could you direct me to where I can find the convertmap utility? It should be quite easy to implement as a button press in ZBrush.

if you make a .txt file then paste this in it:

:convertfile
@IF %1 == “” GOTO end
imf_copy -p %1 “%~d1%~p1%~n1.map”
@SHIFT
@GOTO convertfile
:end
@ECHO.
@ECHO Done!
@pause

…save then close it. then rename that .txt you just made to
“convertfile.bat” then you got it. then what i read a ton of times is,
all you do is drag and drop files into that .bat but that isnt working right for me.
i get this in your method, which was the text that flashed in a millisecond, during the drag and drop into the .bat from what i was last night.
cmd.JPG

I can see the problem now. The convertfile.bat cannot find the program it uses to actually convert the file.

You need a file called inf_copy.exe which is located in the Maya /bin folder. Make sure convertfile.bat and inf_copy.exe are in the same folder and you will be able to click and drag files to convertfile.bat.

tried it, still nothing came out.

cmd1.JPG

ok after a long struggle i found a way.
i have included a zip file with all the stuff needed to make a .tif into a .map
all i did was test/figure out the procedure, rewrite the install notes,
compile it into a zip and post it here. so thank them not me.

credits:
1.scott spencer - for the color settings/management tip
2.francescaluce - for the code in photoshop.
3.atwooki - for the link on his thread to francescaluce’s thread on cgsociety
tveyes - for giving me ideas on my thread here to get the answer.

THX!:slight_smile: :+1:

links :
1 http://www.zbrushcentral.com/zbc/showthread.php?t=25542&highlight=.map
2 http://forums.cgsociety.org/showthread.php?t=194935&page=1&pp=15
3 http://www.zbrushcentral.com/zbc/showpost.php?p=236569&postcount=77

I’m following the instructions exactly as said but when I go to Set Option Flags in Photoshop I get an error at the “Appent optional flags for Imf_copy” after I Type in “-P” It says “Errors occoured during conversion” I’m confused because I’m following everything perfectly :confused: EDIT: Nevermind! the problem was I needed to change the image mode to RGB instead of grayscale. I got it to work :smiley:

Photoshop won’t open my .tif file. It says the bit depth is unsupported. What’s up wit dat?

What do I do now?
tanks.

I struggled with this for a while too. I ended-up using the cmd line (not convertfile)

what was missing was the fact that you have to specify an input filename AND and output filename, which none of the Previous posts had mentioned (unless I missed them).

Anyway my solution was:
imf_copy.exe -p filename.tif filename.map

which assumes that the .tif is in the same directory as imf_copy.exe (or a copy in my case)

Ok Guys I finally after 3 days got the solution.

THe main problem here is when you export your displacements. I highly recomand Scott Spencer’s tutorial because he is like king of this subject. Rendering displacements.

Ok so after you created your displacement maps. What you want to do in Z brush is to go to alpha-DE options. Makes sure your r32 is on and the rest off. Then make sure you use these settings. on the quick code, type. DE-LDEK-EAEAEA-r32. Than Export.

So when u put it in ur displacement map file you will get an error. I know. What you go to do is download a convertfile.bat. which can be found in some of the forums here( srrie i dint provide) However. Jus search on how to convert the tif to a map file. Basically the error is beacuse maya wont read that tif file u exported for some technical reason i dunno. But what you gots to do is conver that file to a map. Than when you insert it in just tweak ur alpha gains and some rendering editors and u shud be good to go.

However to understand fully on this matter Please check out Scott Spencer’s tutorial.

Hope that helps.

I managed to convert my .tif to a .map, but when I into Maya to load it into the displacement file node, the .map is not recognized in the Open box. I tried all of the “Files of type” view options, but the only files I could see were the .tif’s. Other than that I think I have my ZBrush-Maya displacement working (though when I use the .tif in the displacement node, nothing is changed in the render. I’m hoping the .map file fixes this).

Thanks
Chris

Ok, aside from copying the path and editing the environment variable: The thing that hung me up for a couple hours, is that not only should you make sure your file within photoshop is set to RGB, but when you save it out as a .tif, it must be uncompressed. Then the convertfile.bat works.

Easiest way to convert .tif file using convertfile.bat is to drag your .tif file over the convertfile.bat icon. The converted .map file will appear in the same folder as your .tif file. Hope this helps.

Just thought I’d mention what worked for me.

Open the Command Line in the window that contains your .tif textures. On a Windows machine, by shift + right clicking and choosing “Open Command Window Here”.

Once that’s done you have to specify the exact file path that the imf_copy.exe is located. It’s in your Maya bin folder in your Program Files. To easily get the path into the Command Window, you can click drag the icon onto the command window. Afterwards, just specify the name of the .tif file and the new name of the .map file.

So, like this:

“(File Path)\imf_copy.exe” filename.tif newName.map