OK, this is pretty much how I went about fixing the ground textures.
You need to split your map/photos into 50x50m squares which OFP/VBS uses. It is important that the photo squares match the OFP cell coordinates as they are placed exactly on top of the cells. This can be a problem depending on where you get your DEM data and photos/maps from.
Each square must be of the right pixel size, 256 I think is pretty reasonable (20cm resolution), although you can also do 512x512 or 1024x1024. Each square must then be mirrored around the vertical axis. (I don't know why they did this) Then save the squares as 32 bit TGA files!
For example in my case the aerial photos were of 500x500m areas each 2500x2500 pixels. Fortunately the photos used the same coordinate system as the DEM data I used. I used Photoshop. I first converted each photo into 2560x2560 pixels, then split them into 100 sections which I then saved as separate files. I then used a macro which reads in a file, mirrors the image and saves it again and ran it on all the files in a directory. If I remember rightly I had to save the sections as separate files to be able to use a macro, but I am no Photoshop guru.
The next problem is converting them into .paa files. Yes you can do that by hand using texview or some other tool but this is mind-numblingly tedious and boring. I found a tool called png2pac which can be run from a batch file; despite its name it works on tga files. My simple batch file is
Code: Select all
rem Convert all the files in this directory
FOR %%t in (%~1*.tga) DO png2pac %%t
rem %%~n1.paa
So after generating all the tga files I run my script and get some coffee.
Some things to remember:
1. Use some logical scheme to name the terrain sections or you will never find them. I ended up with 2300 files!
2. Don't forget that you can only use 512 terrain textures in a wrp file. Wrptool will happily allow you to use many more but you must remember to remove them or else the wrp file is screwed.
I hope this helps. It is all a bit vague as it was a while back when I did it.