ArmA 3 Convert Layers\*.png Fast
ArmA 3 Forum, ArmA 3, ArmA 3 Config, ArmA 3 Missions, ArmA 3 3D Modeling, ArmA 3 Scripting, ArmA 3 Terrain, ArmA 3 Texturing, ArmA 3 Tools
Using ArmA 3 ImageToPAA.exe - HOWTO convert satellite texture/mask PNGs to PAAs very quickly.
If you get tired of waiting Terrain Builder buldozer to finish converting layers directory PNG files to PAA format, then you can setup ImageToPAA to run this faster. The more COREs your processor has, the more quickly you can convert.
Make a .bat file in your MyTerrain\data\ directory, copy paste the following.
_run_png2paa-start_3_core.bat:
for /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKEY_CURRENT_USER\SOFTWARE\Bohemia Interactive\imagetopaa" /v "Tool"') DO SET ImageToPAAPath=%%B rem satellite texture START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_00?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_01?_???_lco.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\s_02?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_03?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_04?_???_lco.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\s_05?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_06?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_07?_???_lco.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\s_08?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_09?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_10?_???_lco.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\s_11?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_12?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_13?_???_lco.png rem mask - quick, as they are simple images with few colors START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_00?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_01?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_02?_???_lca.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_03?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_04?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_05?_???_lca.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_06?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_07?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_08?_???_lca.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_09?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_10?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_11?_???_lca.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_12?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_13?_???_lca.png rem normal map - if you dont use it no problem, its just skipped START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_00?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_01?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_02?_???_nohq.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_03?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_04?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_05?_???_nohq.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_06?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_07?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_08?_???_nohq.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_09?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_10?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_11?_???_nohq.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_12?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_13?_???_nohq.png
Now run the batch file. What happens now is that three (3) ImageToPAA processes are run at the same time. You can see the PNG's get converted much faster than what buldozer does, or single ImageToPAA would do alone.
The trick is that when buldozer does one PNG at the time, these ImageToPAA's will convert three at the time. This means that you need to have Quad Core processor or better so it spreads out the load to the separate CPU cores.
The “/WAIT” parameter of the command line tells “start” to pause until all commands have been executed to that point. If you move the /wait parameter you can add more imagetopaa processes to run (see below).
If you use too many imagetopaa processes it will cause your windows desktop to be very sluggish to the point that you cannot use other software as imagetopaa's are hogging all the CPU resources. Do not add more processes than you have cores in your CPU, also take into consideration other software you run which uses cores.
People with more CPU cores of course can convert even more PNG ranges at once. Below is example of crazy 7 core bat file.
_run_png2paa-start_7_core.bat:
for /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKEY_CURRENT_USER\SOFTWARE\Bohemia Interactive\imagetopaa" /v "Tool"') DO SET ImageToPAAPath=%%B rem satellite texture START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_00?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_01?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_02?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_03?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_04?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_05?_???_lco.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\s_06?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_07?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_08?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_09?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_10?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_11?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_12?_???_lco.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\s_13?_???_lco.png rem mask - quick, as they are simple images with few colors START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_00?_???_lca.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_01?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_02?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_03?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_04?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_05?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_06?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_07?_???_lca.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\m_08?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_09?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_10?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_11?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_12?_???_lca.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\m_13?_???_lca.png rem normal map - if you dont use it no problem, its just skipped START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_00?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_01?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_02?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_03?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_04?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_05?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_06?_???_nohq.png START "" /D"%CD%" /B /WAIT "%ImageToPAAPath%" layers\n_07?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_08?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_09?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_10?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_11?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_12?_???_nohq.png START "" /D"%CD%" /B "%ImageToPAAPath%" layers\n_13?_???_nohq.png
Greetings to Pennyworth for the high tech registry path reading magic.
Reference original arma2 howto convert layers\*.png fast.