POL File Specification

Revision History: 2/06/10  Fixed Typos 9/27/08  Added new 920 commands. 1/7 /06  Updated for 860 7/19/06  Initial Draft

Intro
Draped polygons (.pol) define how a DSF polygon should be turned into pavement or some other ground that is draped over the existing terrain mesh. One use is to make custom taxiways, but any texture could be used.

.pol files are used via bezier polygons. Multiple windings may be used to specify holes in the pavement. The polygons should have two coordinates (lon,lat) for line segments or four coordinates (lon,lat, control lon, control lat) for bezier curves. The parameter is used as a rotation of the texture in degrees. For a .pol file to be valid, it must contain a texture command (either TEXTURE or TEXTURE_NOWRAP) and a SCALE command.

Note that .pol file textures are not aligned to any particular coordinate system so they are only appropriate for repeating texture, not orthophotos.

[New in 860:] Starting with X-Plane 860, a polygon's texture coordinates may be specified in the DSF file. To do this:


 * Set the polygon instance's parameter to 65535 in the DSF.
 * Pass two (or four for bezier curve) ST coordinates at the end of each vertex that will be used as ST coordinates.
 * X-Plane will ignore the SCALE command.

The header of a .pol file is: A 850 DRAPED_POLYGON

Commands
The rest of the file is made of commands, or # for a comment line. The commands are:

TEXTURE &lt;texture name&gt;
This defines the texture to use - the texture name is relative to the .pol file.

TEXTURE_LIT &lt;texture name&gt;
If present, this defines a night lighting overlay to use, again relative to the .pol file.

SCALE &lt;horizontal scale&gt; &lt;vertical scale&gt;
This defines how large one iteration of the texture is, in meters.

(860: if the polygon has specific ST coordinates in the DSF, the scale command is ignored.)

LAYER_GROUP &lt;group name&gt; &lt;offset&gt;
This specifies which layer group (z order) to draw the polygon in. The definition is the same as the ATTR_layer_group command in the OBJ8 spec.

SURFACE &lt;surface type&gt;
If present, this defines the type of hard surface that the polygon will create. Surface codes are the same as for ATTR_hard in the OBJ8 spec.

TEXTURE_NOWRAP &lt;texture name&gt;
[New in 860:] This command is the same as the TEXTURE command, except the texture's edge blending is set to "clamped" as opposed to "wrapped". This will cause the texture to correctly tile when it is a subsection of an orthophoto, but not when the texture repeats like a land-use.

TEXTURE_LIT_NOWRAP &lt;texture name&gt;
[New in 860:] This command is the same as the TEXTURE_LIT command, except the texture's edge blending is set to "clamped" as opposed to "wrapped". This will cause the texture to correctly tile when it is a subsection of an orthophoto, but not when the texture repeats like a land-use.

NO_ALPHA
[NEW in 860:] This command tells X-Plane to ignore the alpha channel of the texture. Some textures may have special "noise" alpha channels that aren't useful for basic texturing; this command can be used to strip out the alpha data in the sim, allowing the texture to be used for multiple purposes.

LOAD_CENTER
X-PLANE 920: This command establishes that this texture will be used at a certain location, specified by the lat/lon taken to be the texture's center. By also specifying the texture's size (in pixels) and approximate terrain size when placed (in meters), X-Plane will load the texture with variable resolution based on the general distance from the user to the texture. As the user flies, X-plane will periodically reload the texture.

LOAD_CENTER affects loading of the base texture and night texture if it exists. A texture that uses LOAD_CENTER should only be referenced once by one art resource per DSF tile. For optimal performance, the texture should be in DDS format, so that reloads at lower resolution are fast. LOAD_CENTER LOAD_CENTER 42.70321 -72.34234 4000 1024

Example file:
A 850 DRAPED_POLYGON TEXTURE concrete.png SCALE 25 25 LAYER_GROUP taxiways 0 SURFACE concrete