X-Plane Scenery Files Notes and Info

This page contains various random info and notes for scenery authors.

Naming Conventions for ENV files and folders.

Scenery files (.env) files are named after the latitude (north-south position) and longitude (east-west position) of their southwest corner.  Each .env file covers a 1x1 degree "square" of the Earth (or Mars).  The first number in the .env file name is the latitude, the second the longitude.  Positive latitudes are north of the equator, negative are south.  Positive longitudes are east of the prime meridien, negative are west.  Latitudes and longitudes of zero are given a plus sign.  Every file name must have a plus or minus sign for the latitude and longitude and use two digits for the latitude and three for the longitude.  Some examples:

File Name
Western Edge
Eastern Edge
Northern Edge
Southern Edge
+42-072.env
72 degrees west
71 degrees west
43 degrees north
42 degrees north
+50+010.env
10 degrees east
11 degrees east
51 degrees north
50 degrees north
-40-012.env
12 degrees west
11 degrees west
39 degrees south
40 degrees south
+00-001.env
1 degree west
0 degrees east (prime meridien)
1 degree north
0 degrees north (the equator)

Remember that if you are in the western hemisphere, the longitude of the file will be larger than the point you are interested in.  For example, the point 42.30 north, -71.50 west is in the file +42-072, not +42-071.  The same applies to latitude in the southern hemisphere.

The Earth nav data folder is subdivided with a single folder for each 10x10 degree square of the earth.  These folders are always aligned to a multipel of ten degrees.  Just like the .env files above, the folder is named for the southwest most file that woudl live in the folder.  Some examples:

Env File
Folder
+42-072.env
+40-080
+50+010.env
+50+010
+40-012.env
+40-020
+00-001.env
+00-010

Again, when in the western hemisphere the folder name will be larger than the .env file.  For example, the file +42-072 is in the folder +40-080, not +40-070.

Missing Files

X-Plane and WorldMaker will fill in pure water (ocean) for a missing .env file.  So by convention .env files that contain only water are simply omitted to save disk space.  If a subfolder does not contain any .env files, it may be omitted as well.  This is normal for a distribution of scenery.

About Custom Scenery Packages

Starting with X-Plane version 6.50 scenery can be 'packaged' as a single folder of folders and files.  This folder is dragged directly into the Custom Scenery folder; there is no need to move various files to various random locations.  This offers a big improvement in installation.

Custom Scenery Structure

The custom scenery folder contains a single folder for each package.  Each package in turn contains zero or more of the four following folders:
These folders correspond to the folders in the old resources folder.  The Earth nav data folder should contain subfolders for the 10x10 degree areas of scenery you cover, with individual .env files inside the subfolders.

Texture, terrain and object paths are resolved relative to these 'Custom' folders in your scenery package.  If you have an object that has a texture path of 'taxiways:signs.bmp', then you must place the signs.bmp file inside a folder called 'taxiways' inside the Custom Object Textures folder.  In essense the scenery package is your own mini-resources folder.

You can still have arbitrary subfolders for bitmaps and objects inside the 'Custom' folders, but since your scenery package is entirely isolated from all other scenery packages, there is no longer a risk of naming conflicts for bitmaps.

Custom Scenery Load Order

Custom scenery is loaded in alphabetical order by the name of the package's folder.  Where the same .env file or airport is specified in multiple packages, the alphabetically first one takes priority.  All custom scenery takes priority over scenery installed in the 'resources' folder.

What Can Be Overriden and Edited

You can include custom objects, their textures, custom terrain textures, .env files, and an apt.dat file in a custom scenery package.  The apt.dat file is merged into the X-Plane world by replacing any airport that occurs in your apt.dat with your data, wholy overriding the default navigation database.  .env files entirely override preexisting .env files on a 1x1 degree basis.  Custom object and terrain textures and custom objects are only used when referred to by your .env files.  If another package refers to objects of the same name, it will not see your objects even if it does not provide them itself.

When editing in WorldMaker, WorldMaker will edit the .env files from the scenery package that contains them and is first in the alphabetical list.  WorldMaker will not (as of this writing - X-Plane 650) edit the apt.dat files in a custom scenery package; to edit them you must edit the main apt.dat fiel and then copy the airport information into your scenery packages apt.dat file using a text editor.

About Custom Objects

Maximizing Performance with Custom Objects

The single biggest factor for custom objects is the sharing of textures.  X-Plane can render a lot of custom objects that share the same texture, but using multiple textures slows things down.  It is better to use one bigger texture than multiple smaller ones.  Since X-Plane 640, the sim only uses type-II objects (objects with one texture).

'Solid' quads (code 5) are slower than normal quads (code 4) because X-Plane must do collision detection to determine whether the aircraft can land on the quad.

It is faster to draw a single bigger object than many smallers ones, but if an object is so big that most of it is off screen it is faster to break it into pieces so that the ones that are off screen don't have to be drawn.  Consider breaking into pieces objects that become larger than one .env quad (533 meters).  For an airport, consider making each terminal its own object.

Bugs with Placement of Custom Objects

Currently custom objects are rotated according to the current Z axis and not relative to true north.  As a result, as the OpenGL coordinate system shifts in X-Plane, objects may rotate ever so slightly due to round world problems.  Given a long enough object (like a terminal), its ends will rotate as the user flies through the area, possibly altering their position relative to other objects.

Currently custom objects face up along the current Y axis, rather than straight up from the earth.  The point 0,0,0 on the object is placed on the earth's surface.  If the Y axis and up are misaligned enough (which happens at the edge of loaded scenery), the object may 'hang off the earth' into space a little bit.  This may be evident through phenomena like being able to see under buildings.

Hopefully both of these bugs will be addressed in a future X-Plane release.