Painted line files (.lin) define taxiway markings that can be draped over DSFs, although they could can be used for other purposes too.

Painted line files are standard X-Plane 8 text files starting with a header and then commands. The # defines a comment.

A
850
LINE_PAINT

Painted lines are defining polygons in the DSF file. The polygon may have windings – only lat and lon coordinates are needed. The polygon parameter is used to indicate a closed loop (1) or open chain (0).

If two coordinates are provided (lon, lat) then the line is made of line segments. But if it is made of four coordinates (lon, lat, control lon, control lat) then it is interpretted as bezier curves.

The commands define the line:

TEXTURE <texture>

The texture command specifies the texture to be used for the painted lines. It is located relative to the .lin file. Night lighting is not available for painted lines.

SCALE <horizontal> <vertical>

The scale command defines how large the texture is in meters when applied. The parameters are in meters and represent the size of the entire texture.

TEX_WIDTH <pixels>

The horizontal coordinates are specified in terms of a texture of this width. In other words, this defines the scale in which horizontal coordinates are specified. So if your TEX_WIDTH is 1024, your middle pixel is 512, even if your whole texture size is only 16 pixels wide.

S_OFFSET <layer> <s1> <sm> <s2>

Each line is drawn in multiple layers, numbered consecutively starting at 0. Each line has three horizontal texture coordinates – a left, middle and right. The middle coordinate is aligned with the DSF line. The texture is simply repeated from top to bottom.

LAYER_GROUP <offset> <name>

[XP930:] 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.

MIRROR

[XP930:] Normally a rounded or bent line is made by stretching the texture, forming trapezoids out of the lines. However when the mirror command is present in the file, X-Plane may reverse the texture direction to form clean cuts at sharp corners. This lowers the artifacts due to sharp corners in lines with lateral markings, but is in appropriate if the line has a clear longitudinal “direction” (e.g. a line with text in the texture along the long axis).

ALIGN <segments>

[XP1135:] Normally the texture for a .lin is repeated vertically over and over based on the vertical resolution parameters, and then it stops. To aid in alignment with end-caps, the ALIGN directive divides the line texture vertically into one or more segments. The line’s vertical texturing will then be stretched or shrunk to ensure that the line starts and ends on a segment boundary. If end-caps are used, they are subtracted out of the line before the stretching is done.

Note: ALIGN_SPLITS and MIRROR are incompatible – only one can be used at a time.

START_CAP <layer> <s1> <sm> <s2> <t1> <t2>

[XP1135:] This defines a start cap – a square of texture that will be used once before the line is drawn. Besides the horizontal positioning (left, middle and right), two vertical parameters (t1, t2) define the bottom and top of the cap. The start cap is applied to the “beginning” of the line, defined in a DSF as the first point in the polygon in DSF file order.

END_CAP <layer> <s1> <sm> <s2> <t1> <t2>

[XP1135:] This defines an end cap – a square of texture that will be used once before the line is drawn. Besides the horizontal positioning (left, middle and right), two vertical parameters (t1, t2) define the bottom and top of the cap. The end cap is applied to the “ending” of the line, defined in a DSF as the last point in the polygon in DSF file order.

Note: start and end caps are not used if the DSF file specifies a closed loop.

TEX_HEIGHT <pixels>

[XP1135:] This tells X-Plane the height of your texture in pixels.  All “t” (vertical) coordinates int he file are interpreted in terms of this directive, not the actual texture height.

Example file:

A
850
LINE_PAINT

TEXTURE taxilines.png
SCALE 10.0 2.5
S_OFFSET 0   0.03125  0.046875 0.0625
S_OFFSET 1   0        0.015625 0.03125

Meta

Topic:

  • Scenery

Article type:

  • File Format Specification