|
|
Advanced Modeling with ACF2TXT |
- Modeling
asymmetric airplanes and their parts - Part III
|
This
technique can be implemented in different ways and for different
objectives. Thus it was divided in three lessons covering the
positioning of plane parts asymmetrically displaced, the building
of plane parts asymmetrically shaped and the building of plane
parts asymmetrically paired. Seek for the other two lessons at
the Tutorials index page.
Lesson
Three
- the building of plane parts asymmetrically paired:
When
a tank/float part is placed off-center in the airplane's frame,
that is using any lateral arm value different than 0 (zero), that
part is mirrored in both sides of the airplane relative to its
longitudinal center axis. The TXT definition file contains two
set of arrays with nodes coordinates for both the right and the
left part but while modeling in Plane-Maker both parts are shaped
equal.
Fortunately,
both left and right nodes values are saved in separate and X-Plane
engine renders the parts relaying on the data of these nodes,
not forcefully mirroring them. Because this, it is possible to
edit these nodes values directly in the TXT and then build an
asymmetric pair of parts.
As a technique demonstrator I used a beautiful FA-18 model from
Greg Hofer. It was modified to transport an asymmetric payload
below its wings: one fuel tank and one GBU bomb, shown in the
following image.
Caution:
Once the plane is modified and converted back to ACF format it
cannot be saved through Plane-Maker because doing so will reset
the left part to be symmetric mirrored for the right one.
How-to
steps:
- Start
a fresh ACF file in Plane-Maker (let's call it "gbu-bomb.acf")
and model one of the parts desired, in this example the GBU
bomb. This will create a symmetric part (as usual). See the
following left image;
- Start
another fresh ACF file in Plane-Maker (let's call this one the
"fuel-tank.acf") and do the same of step 1 for the
other desired part, in this example the fuel tank. This will
too create a symmetric part. See
the following right image;
 |
|
 |
- Use
the ACF2TXT utility to convert both these ACFs files and also
the plane ACF file to TXT format;
- Search
the TXT files for the set of arrays named "body_XYZ"*.
These arrays are tridimensional where the first element relates
to the plane's part, the second element relates to each part
section and the third element relates to each section node.
The values that go along with them are the respectively "X",
"Y" and "Z" coordinates for that node;
(*) For the tank/float pair, the target arrays would be the
ones named "body_XYZ[23]" and "body_XYZ[24]";
- For
this plane part only the section elements from #0 to #6 are
used by X-Plane render engine (they correspond to the seven
section ribs of the part) and all node elements from #0 to #15,
for each section;
- Copying
the values of the arrays elements that define the tank/float
part* from both TXT files and pasting them in the correspondents
arrays elements in the plane TXT file will result in having
a different pair of tank/float parts;
(*) For this demonstrator, values from array "body_XYZ[23][1][0]"
to "body_XYZ[23][6][15]" were copied from "fuel-tank.txt"
and values from array "body_XYZ[24][1][0]" to "body_XYZ[24][6][15]"
were copied from "gbu-bomb.txt" and they all were
pasted into "FA18.txt" file in the respective sets
of arrays.
- Finally
convert the plane TXT file back to ACF format. Opening the modified
plane in Plane-Maker will show both tank/float parts equal because
it uses only one set of array to identify the part's shape,
but when opening the plane directly in X-Plane it will be possible
to see the asymmetric results, as shown in the following image;
|
|
|
Almost
everything here done by me: Marcelo M. Marques - codename 31 M.M.M
mmarques@frontier.com.br
|
|