At the request of a couple of island editors out there, I'm making an attempt at a somewhat more formal write-up a process of importing an OFP island into ArmA. Please note that all I have had time to do is a proof of concept import - I have not completed this process myself and it may involve errors in the latter stages that I haven't become aware of. Sorry about the typo in the topic title...
Known Limitations :
- It is still heaps of work! Do not underestimate the amount of time required.
- V2 is only able to import Binarized OFP WRPs with at least 1 object. I'm not absolutely sure about this. For help binarizing an OFP WRP, seach these forums.
- Objects lose their scale and tilt angle, new values are created from the V3 object "template". This is due to a V3 script language limitation.
- Some object types (~5% of total) seem to be lost during the V2 import WRP step. This is presumably caused by the lazy object "template" creation I used, and might be overcome with more work.
Required Software :
- Visitor 3 + ArmA
- (de)PBO tools
- Visitor 2 + buldozer + OFP + addons (search for V2 installation process, there's 5 years worth of attempts, issues and solutions on these forums)
- A good text editor.
Process Outline :
1) Import the OFP WRP into a V2 PEW.
2) Open the V2 PEW in V3 and extract heightmap and objects.
3) Create a new V3 PEW, import the heightmap and objects, then polish.
Step One - Importing a OFP WRP into V2
This may be skipped if you have a source PEW.
- De-pbo the required OFP content. Install Visitor 2 and buldozer. This step may take a long time, I was lucky/wise enough to still have all my OFP tools sitting on my hard disk. Search for help if you are stuck, this process can be hard and explaining it is beyond the scope of this article.
- Set up the system preferences. Since we only want to export objects rather than make a working OFP island, I created a single "dummy" folder to simplify the export process. I then copied every single P3D file from the required de-PBO'ed OFP content into this dummy folder. There is should be no subfolders or files other than P3Ds in this folder. Here are my system preferences (_REZINA_ENV is the dummy folder):
This step allows a very quick object template set-up rather than setting up each object type individually. Using this lazy method is probably the reason for lost objects in the import.
- Create a new "world project" of the same dimensions of the desired WRP to be imported (eg, 256x256, 512x512).
- Select "Nature Objects..." (or Artificial Objects) from the "Tools" menu. Click "Add...". Select all the P3Ds in the list (these are the P3Ds in your dummy folder). Click "OK", and wait a little while for V2 to read the objects. Click "OK" when it finishes. Save your PEW file. You can re-use this PEW as a "blank" to import other islands.
- Connect to buldozer (Ctrl+F7).
- Select "Import World..." from the "Project" menu. Select the WRP you wish to import. Buldozer will crash with a "Landscape dimension 4125125x153151 not rectangular" error. Click "OK" to dismiss the error message.
- Disconnect V2 from buldozer (buldozer has crashed but V2 doesn't know about it). Reconnect to buldozer. Select "Reload buldozer" from the "Project" menu in V2. V2 will now import the WRP information from buldozer (watch the HDD activity). In my experience, it is best to wait in V2 rather than switching focus to buldozer (switching may cause it to crash). If it works you should get an "Import Done" message in V2 and no error message in buldozer.
- Close buldozer. Visitor2 should now have visible objects and terrain. Save your PEW file (using a different name would be wise) and close V2.
Step Two - Extract the good stuff in V3
- Load V3. Load your V2 PEW. You will likely get a couple of error messages, but it is safe to ignore these. Loading may take V3 a couple of minutes.
- Select "Export Terrain Into Picture" from the "Project" menu. Enter a new PBL filename (this file will be created, not read). V3 will create a new PBL and PNG file of the heightmap. The sea level and magnitude of the map may not exactly match your OFP terrain, but that can be easily fixed later.
- Select "Select All" from the "Edit" menu. V3 should do some thinking. The objects are there, but you can't see them since V3 can't read the V2 object template data. This doesn't matter.
(this step isn't really essential but its fun and it confirms that you have objects on your island).
- Select "Add & Run Script" from the "Scripts" menu. Select "ExportObjects.vis". It should load a dialogue. Choose the "Selected object" box, and enter a suitable name for the object list. "Z rel" or "Z abs" may give better results depending on how close your ArmA terrain heights will match the original OFP heightmap (+ noise). The script will do some thinking...
- Close the V2 project in V3. Your ArmA island should be created from scratch using a V3 pew.
Step Three - Creating a V3 PEW
This will be by far the most time-consuming step. I haven't actually done this myself either, so this contains some untested theory. I have achieved an import of object locations and
- Start a new project in V3, with appropriate settings. It would be easiest to import your OFP WRP into a ArmA PEW of exactly the same overall dimensions. There is no reason (other than simplicity) to restrain you ArmA terrain to OFP's 50m terrain grid resolution. Since the ArmA engine has lost OFP's on-the-fly interpolation and noise routines, I intend to increase the heightmap resolution of my island.
- Manipulate your heightmap and PBL to achieve the required results. I have used the source heightmap for my OFP WRP rather than an exported version, so I haven't done this myself. Importing it should be familiar process.
- Set up suitable object templates for your island, including suitable random size, angle and orientation as desired.
- Manipulate you objects list. The p3d name in quotations should be replaced with desired V3 object template name. This will take a lot of time and testing. Object origins points may need to be manipulated. Many OFP objects have made it into ArmA, but not all. The nice people over at PMC Tactical have created list of equivalent objects which may be a useful reference. Import your manipulated list with the ImportObjects.vis script. Objects may require some further manipulation within V3/buldozer.
- Finish your terrain by creating a satellite and layer mask. I am not aware of any direct method of exporting an OFP WRP's surface textures, not that it would help much anyway.
Please let me know if any of this is not understandable, or if you know of any better/easier method of importing OFP WRPs. Good luck!
This peice of software I wrote a couple of days ago may reduce the pain ...
Originally Posted by (fasad @ Dec. 27 2007,09:23)
<span style='font-size:10pt;line-height:100%'>V-OBJECT SWAPPER</span>
See PMC Post
Nice Tut there fasad, but since I've never installed V2 (only ever used WrpTool) I've just used a XYZ and a Object position dump provided by Snake Man to start again on my Water World.
Problem is of course I have to rely on Snake Man providing the data because I don't have the tool that exports the XYZ of a OFP Wrp file (Did V2 provide that?).
The OFP Object positon dump was of limited value also because there was no valid "orietation" value.
V2 has no object output function that I'm aware of, but I never really used it much either.
Originally Posted by ([APS
I might be willing to accept requests for the output files since I still have about half of all OFP addons ever on my HDD, and it seems not many people still have or ever used V2. I know it's a PITA to get running properly. With a correctly set up template PEW, extracting the heightmap and object list from the WRP only takes a minute or so. The problem is many WRPs use different addons, possibly requiring a specific "dummy" folder.
But for now I'm trying to resolve the missing objects for my island... It might not be caused by the dummy folder, but some kind of buldozer/V2 error.