Too real to be a game!™ 

Advanced Users: What’s the trick to adding collision data to a pano field?

Versions: V1 and V2

  • Conceptually, it’s actually pretty easy to do. However, it does required a background and lots of experience with using 3D modeling software Blender3D, AC3D, 3D Studio Max and similar programs. These programs can be found online. Blender3D is free, and like any 3D modeling program it takes considerable time to learn the basics.
  • To setup for making a collision file, using the example above, add the lines below to the PanoExample.fld file.
    Image of pano collision file data
  • Create the file called PanoExample.col and put this in the folder with the fld file. Add some blank lines to the file.
  • You can check the file structure by running the sim. It should run like it did before. There will be no collision data since the collision file is empty.
  • The points that define the collision objects must be in an x-y-z coordinate system that matches the coordinate system of the panorama. FS One uses the NED system (standard for flight simulation), which is North-East-Down where positive X points North, postive Y points East and positive Z points down. To see this work, pick the Big-T Landing pano and click Fly. Press the single-quote key ‘ to get the position widget. With this pano the airplane starts out facing south. Adding throttle moves the plane further south. Pressing the single-quote key ‘ again will show the new position, and the first value (x) will be more negative because the plane is moving south which is in the negative x-direction. Turn the airplane 90 deg to the left to face east (press “C” to see the compass widget). Now move east and press the single-quote key ‘ along the way to see that the second value (y) will increase which is in the positive y-direction. Climb out and press the single-quote key ‘ to see that the third value (z) will become more negative because positive z is down. It might not make the most sense, but that is the convention for a NED system and using the “right hand rule”, z gets more negative going up. We had to pick something, and we picked the standard.
  • An example collision mesh is shown in the first image below. This image shows the collision mesh for the Decatur site panorama. As a point of reference, the frequency board (soon to be obsolete at real flying fields) is highlighted in yellow. The flying field shelter is also clearly discernable in the mesh. This mesh can be compared to the real photo on the right.Image of example collision mesh for panos
    Image of corresponding flying site with collisions
  • Now it’s time to create the collision data and add it to the file.
  • Collisions in panos in FS One are defined by triangle facets that surround the collision objects. These facets are then included in the col file (i.e., PanoExample.col in this examle).
  • Their outward normal must point (as the name implies) outward. So if the collision object were a square, the outward normals must point outward. This way the aircraft cannot go inside the square; instead the aircraft will hit the square and bounce off. If the collision object were the inside of an indoor flying site, then the “outward normals” must point to the inside so that the aircraft stays inside and bounces off of the walls (of the collision object).
  • These outward normals are defined by the right hand rule when following around the face of a triangle facet. Some drawing packages will render the normals and that’s a way to easily check the direction. If the direction is wrong, then reverse the normals. Most drawing packages have a way to quickly reverse the normals of an object or mesh.
  • Using your favorite modeling software, create the collision objects. Save the file as triangles (sometimes the file extension is *.raw). Include these triangle facet data in the col file, add the word “facet” to the beginning of each line (use your editor to do this), save the file and run FS One to test the collision objects.
  • Currently FS One does not separately render the raw triangle facets in FS One. These must be created and viewed along with the panorama image in your own favorite 3D graphics software.
  • Examples of the triangle facet data files are included in this zip file:
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn