Difference between revisions of "POF Constructor Suite"
(→Tips / Common Problems: removed vandalism)
Revision as of 05:39, 21 February 2008
POF Constructor Suite, or PCS, is a program created by Kazan, and is one of the two main pieces of software used in the creation and editing of POF files (the other being ModelView). This program is capable of converting truespace .COB files into POF files. POF fils are the model file format that Freespace can read and use in-game. Additionally, the POF format contains data solely for Freespace 2. This data includes the center of the object, dockpoints, eyepoints, engine glows, primary and secondary gunpoints, mass, fighter insignias, paths, shields, subsystems, textures, turrets, subobjects and FS_Open glowpoints.
POF Constructor Suite 2 is an up coming major update to this application, coded by Kazan and Bobboau.
====> The latest build of PCS can be downloaded here
====> Bobboau's Auto-Facet build (explained below) of PCS can be downloaded here
The Auto-Facet build & smoothing explained
Note: The Auto-Facet build should ONLY be used for converting. For all actual POF editing, use the latest standard version.
Bobboau's Auto-Facet build is a slightly older PCS build (1.3.41) that has a single difference from the standard PCS version. Where the standard PCS will either completely smooth geometry or leave it completely faceted depending on the material settings in Truespace, the Auto-Facet build will, as it's name suggests, apply an auto-facet instead.
The image below illustrates the differences between the three types of smoothing: (left to right) Faceting, Auto-Facet and Smooth shading.
The settings needed to achieve each type of smoothing in each build are as follows:
Standard Build: In Truespace, set the smoothing to either Faceted or Smooth. (Both settings achieve a faceted type of shading) Setting it to Auto-facet with an angle value of 0 will also achieve faceted smoothing.
Set the smoothing to Faceted. Again, setting it to Auto-facet with an angle value of 0 will also achieve faceted smoothing.
Standard Build: (Unable to achieve as far as I have been able to tell)
Set the smoothing to auto-faceted and enter in an appropriate angle value.(You may need to experiment to find the ideal angle. They range between 0 and 120)
Standard Build: In Truespace, set the smoothing to auto-faceted.
Auto-Facet Build: (Unable to achieve as far as I have been able to tell. Setting the auto facet value to 120 gives poor and buggy smoothing)
When you start PCS, you will notice another window has opened. This is a render window of whatever model is open - you can see where things are, what your ship looks like etc.
If you do want to be able to see your model in PCS, keep in mind that the render window will be taxing on your system. It will usually consume 100% of your CPU's runtime, often choking other applications including PCS itself in some cases. (This will be fixed with Kazan's upcoming release of PCS2, which has a model viewing window integrated into it in the same way ModelView32 does.)
Additionally, getting PCS to display textures is unpredictable at best. They will usually display as a solid white object. For just viewing and some pof editing, ModelView32 is generally a better choice. At least until PCS2 is out anyway.
Setting up the Options screen is quite important, because it tells PCS the default directories for things like models, maps, and cobs/scns. To get to it, go to Conversion > Options. A small options window will appear.
- In the 'Default Model Directory' section, select the COB/SCN type from the drop down list and set it to the path to which you have installed Truespace, or wherever you save all your cob or scene files from.
- Select POF from the drop down list and set it to wherever you want PCS to find your FS2 model files (this will be the default folder PCS will save files to and open files from. (Typically "C:\Games\Freespace2\data\models")
- The scaling factor refers to how many FS meters to turn EACH trueSpace meter into during cob->pof conversions. This should usually be set to 20, but it can be anything you want really. (This is the setting you can fiddle with to fix the "Too many polygons in same average location!" error. For more information on this, read the tips section at the bottom of this page.)
- The Texture Path field seems to be only partially functional. Setting it to your root FS2 directory (typically "C:\Games\Freespace2") allows you to view some textures, but I haven't found all that much of a pattern to it.
COB to POF Conversions
This is a general guide to converting only. For a more complete guide to getting a ship in-game, have a look at Karajorma's Turreting Tutorial
Let's suppose you already have your COB or SCN file modelled and waiting in Truespace. You want to see how it works in-game.
You should now be ready to do your first model conversion. Go to Conversion > COB to POF. Select your model (if it's a SCN file, tell PCS to look for SCN files instead of COB). Hit OK.
If all goes well, depending on the complexity of your model and the power of your CPU, the conversion process may take anywhere from an instant to 10 minutes. Assuming it fits the geometry and hierarchy requirements of the Freespace 2 engine (and PCS), a message box shows up with general model and conversion information. This means the model has been successfully converted, and is now waiting to be saved. Do that first. (If you converted using the Auto-Facet build, save and switch over to using the standard version now)
POF to COB conversions
The opposite of COB to POF conversions, this feature allows you to convert a Freespace POF file into a COB file - for use in things like renders, or just general model editing. From the COB format, you can convert it to just about any other 3d model format for use in just about any 3d program.
To do this, just open up the POF file you want to convert, go to Conversions > POF to COB, and decide on a place (and filename) to save your new COB to.
Remember that when you convert from POF to COB, all the centres of everything in the model are ignored, an annoying bug in PCS that should get fixed with Kazans PCS 2.
This means that though your objects will still be in the right places, their centers and the lights glued to them will be at 0,0,0, meaning that in all likelihood, nothing will rotate correctly. If you plan to reconvert back to POF after some editing, you'll need to manually fix the centres of all affected objects.
Before you can create a fully working Freespace model, you must add POF data to your new POF file. This is the data that controls things like the center of the model, dockpoints, eyepoints, engine glows, primary and secondary gunpoints, mass, fighter insignias, paths, shields, subsystems, textures, turrets, subobjects and FS_Open glowpoints. (You'll recognise most of these as the various tabs in PCS' main window)
A brilliant guide on each of these 'chunks' can be found here; in Bobboau's PCS tutorial.
Tips / Common Problems
- If PCS gives a "You forgot to group those objects!" error message during COB > POF conversions, it just means that you need to glue a local light to the main hull object in Truespace. (This usually only occurs when PCS encounters a piece of geometry not glued to anything, such as a test hull for conversion or a forgotten bit just lying about your workspace)
- If PCS gives a "Too many polygons in same average location!" error, it can mean one (or both) of two things. Either there is a duplicate of one of the objects in the SCN in the EXACT same position as another of the EXACT same shape and size, or your object is too small in TS for PCS to be able to clearly tell the difference between two polygon locations during conversion. (This is a common problem for fighters and bombers because of how small they will appear in TS in order to fit the standard conversion ratio of 20 FS meters to each TS meter.)
To fix the first problem, find the duplicate object and delete or move it. To fix the second, scale the whole ship up in TrueSpace to the size you want it to appear as in Freespace - meter for meter. Then, before converting, set PCS's scaling to 1 rather than 20 and convert.
This should fix it by effectively giving PCS more accuracy when it gets to really small numbers. The up-scaling of your model is counteracted by telling PCS that one TrueSpace meter should equal one Freespace meter, so you don't end up with cruiser sized fighters and the like.
- Only the latest versions of PCS (those above 1.1) have correct collision detection calculations during conversion. Older versions will often have problems such as weapons fire going through them, suns showing through them or even other ships going through them.
- If PCS crashes during the conversion, or spits out any other sort of error, there is a problem with the model's geometry and/or hierarchy. If you don't understand the error and a search on HLP doesn't return anything helpful, post your question in the Freespace Modding section of HLP.
- In the Misc menu, there is a "Global data import" function. This is a very handy tool that will import all pof data from one model file into the one that is open. Very useful if you completely POF a particular ship and then notice that you forgot something before conversion. You can simply re-convert and then import all the data you painstakingly entered.
- PCS is unable to view or edit the moment of inertia (MOI) data. This is the data (a tensor) that controls how the model physically rotates and reacts to kinetic impacts. PCS sets it all to 0 upon conversion, which will prevent your model from spinning around when hit at all. Currently, the only way to edit this data is in [[ModelView][32. The best way to set it is to find a similar sized standard craft and use it's values here.
- If you have any other questions/problems, ask in the Freespace Moddingforum, but don't forget to search first, since chances are the problem has been encountered before.