Targetware: 3D Dev Guide


Exporting and Re-Assembling Your Airplane

You have finished your airplane: the geometry is complete, all the parts are cut out and capped, and the texture mapping is finished. You're ready to get it into the game. You need 2 things, in addition to your 3D files: a Flight Model file (.acm), and an assembly file (.anm). The flight model file is probably not something you're going to want to write yourself, unless you are also an aeronautical engineer. If you are going to build it by yourself, start with Wells' write-up. If you are working with a Target Rabaul plane, an FM will be provided for you. Contact Yak if you haven't been given one yet.

The assembly .anm file, however, is yours to build. Don't worry, it's not as complicated as it looks. All you need is a text editor, your modeling program, and a Targetware app set to run in a window (so you can make changes on the fly as you test your .anm file).



Exporting Non-Moving Parts

Before starting this process, check to make sure you have the plane measured correctly at a 1:1 ratio. If you export it at the wrong size, you will have to redo a lot of work at the point you go back and resize it.

For objects that do not need to move (fuselage chunks, wing sections, stabilizers, guns, etc.), the procedure is very simple: simply export (save) the object in it's own file. For example, in Lightwave, I would select the polygons that make up the outer half of the right wing, copy them, and paste them into a new file. I would save this file as "a6m2_wing_right_outer.lwo" (or something similar). The file names you choose are largely up to you, but they need to make sense to you later when you look at a huge list of them. Repeat this process with each non-moving part.

Illustration 2.61_1: Prepping a fixed part for export.



Exporting Moving Parts

Some objects that will need to move in the game, such as elevators, rudders, flaps, gear assemblies, etc., may need to be moved back to the origin point (0,0,0) before they are exported. Objects that will move, but will only move on an 90 degree axis do not need to be moved to the origin point before export; all you have to do is tell the engine where their point of axis will be. Examples:

  • an elevator on an airplane with perfectly level horizontal stabilizers
  • a gear spar that only needs to move in one axis, and that axis is straight up and down
  • a canopy that slides back on a perfectly horizontal track

On the other hand, objects whose axis of movement is not perfectly aligned with the basic X, Y, and Z axes, must be moved to the origin point and rotated so that their axis of movement is aligned perfectly with either the X, Y, or Z axis.

Before moving the object, mark down on paper the exact coordinates of the part--you'll need those later when building the animation file. Now rotate the object to that it lies flat against an axis. For example, if you had a flap, and it was angled a few degrees in each direction, you'd need to rotate it in your modeler until it was flat, then export it. It is crucial at this point to record the number of degrees you rotated the flap, because you'll need to punch that data into the .anm file (see 2.7).

Illustration 2.62_1: Prepping a control surface for export.