This page is not yet finished. Information may be incomplete! If you have information on this topic, you may be able to help complete the article.

Polygon Offset is an OBJ modeling feature that allows you to stack multiple layers of polygons on top of each other without flicker. Polygon offset is set in an OBJ file via an ATTRibute (ATTR_poly_os) but is usually set using a plugin or script for your modeling program.

Legal polygon offset values are 0 (no offset) or positive integers.

The polygon offset value does not define a layer order. It does define the “strength” of anti-Z-thrashing applied; generally you should use the smallest number you can get away with to avoid other artifacts.

Draw Order and Polygon Offset

It is critical that the draw order of any geometry with polygon offset is:

  1. The base geometry.
  2. All overlay layers, in the order they should be overdrawn. All overlay layers should have the same polygon offset values!
  3. Any geometry that appears on top of the overlay (e.g. 3-d elements on top of the flat elements).

Within an Object

Within an object, X-Plane respects the draw order you pick, so be sure to order your geometry based on the above rules.

Within an Airplane

Within an airplane, the draw order is based on:

  1. Outside cockpit object
  2. Outside-lighting objects, by order in the attachment dialog box.
  3. Inside-lighting objects, by order in the attachment dialog box.
  4. Inside cockpit object
  5. Glass-lighting objects, by order in the attachment dialog box.

Within Scenery

Objects are sorted by the ATTR_layer_group directive; within a layer group, the order is determined by X-Plane.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do not report bugs in the blog comments.
Only bugs reported via the X-Plane Bug Reporter are tracked.