Now, why hasn't anyone made a POF import/export script for Blender yet? It's Python--it can't be that hard to write, especially with so much documentation on the file format.
Write it then.
Maybe I will!
After studying
POF data structure and
Blender import scripting very carefully (read: after skimming through pages of documentation and hacking together some code), I think I have a small proof-of-concept for a POF import script for Blender. It's obviously incomplete; all it really imports right now is the shield mesh. As I go along with coding the rest of it, I'll try to follow the
Blender to POF guide on the wiki as closely as possible. I'll try to get the import fully-functional (except for texturing) by the end of this week. An export script might have to wait until this summer.
Anyway, please download it and drop it in your Blender scripts folder and let me know if it works. I've tested it on my computer, running Linux with Blender 2.49 and Python 2.6.5, but it should theoretically work on Windows or Mac with any Blender 2.4x release. I've tested it with Fighter2T-02.pof and Bomber04.pof, and the shield mesh came up just fine both times. This proof-of-concept is based on an earlier proof-of-concept that simply ran through all the POF chunks (except BSP data) and printed it to the command line.
I've attached both, if you want to take a look. I'll be keeping the latest version here until I make an actual release.
The archive contains four Python scripts: bsp.py and pof.py simply read BSP and POF information from a .pof file and outputs the info to the command-line. bsp_import.py and pof_import.py go into Blender's scripts folder, and import .pof files into Blender. pof_import.py currently imports object and subobject geometry, shield geometry, a few helper empties (muzzleflashes and center of mass), and texture/uv mapping. bsp_import.py imports BSP sortnorms from the first detail level of a .pof file as bounding boxes, and isn't really of much use, except as a curiosity.
A note on texturing and UV-mapping:
It doesn't seem to import correctly for all files. For one, it should be noted that on Unix-based systems, the texture filenames are case-sensitive. The script looks for (in this order) DDS, TGA, PNG, and JPG textures in "../maps," "./," "./maps," and "./data/maps." I'll try to add something to let it ask for the texture locations and/or remove its case-sensitivity in the future. Also, it seems that some models don't map correctly. On those models, some detail levels, all subobjects, and all debris seem to texture just fine. For example, detail-0 and detail-2 of Fighter2T-02.pof (Herc II) have trouble. The UV map itself has faces in all the right places, it's just that they're not the right faces. interesting note: Capital01.pof (Orion) seems to texture just fine. Lastly, the importer doesn't create materials for the textures, only UV layers. To get the models to render with the textures, you need to assign a material to them with "TexFace" (in the materials buttons, material tab) enabled. You can use the same material for all models, and they'll use their own textures.
[attachment deleted by ninja]