Prop Disc RFC

NOTE: This RFC has been implemented in a modified form in X-Plane 9.40; docs coming soon.

This is an RFC for a plugin interface to prop disc drawing.

= Background =

Some of the more advanced aircraft authors are building prop discs as OBJs, in an attempt to gain more control over prop disc drawing.

However, this has a down-side:


 * Prop discs require some OpenGL drawing tricks that, if available in the OBJ system generally, would be a burden on the entire system.
 * It is useful for the sim to be able to identify what drawing is the prop disc and provide some special casing.

= Proposal =

The proposal is to provide a dataref-based interface to the prop disc, allowing plugin authors to "program" the sim's built-in prop disc behavior to achieve tricks similar to what can be done now with an OBJ.

This proposal does not target non-plugin airplanes. This RFC should be considered a first step - a second step would be to later provide a plane-maker interface to fairly simple algorithms that can currently only be done with plugins.

Prop Disc Image
The prop disc images would be controlled by four dataref values (per engine):


 * Number of images vertically
 * Number of images horizontally
 * Cell number (vertically)
 * Cell number (horizontally)

This divides the prop disc into multiple cells.

Features:


 * The horizontal cell number would be a floating point number, used to blend two images together. No vertical blending would be available - vertical space is intended to provide separate space for tail rotors and main rotors.
 * Different engines don't have to use the same grid. Not sure how useful this is, but theoretically a 3-prop plane could use a 50-25-25 texture-space split.
 * Cell numbers &lt; 0 or &gt;= cell count would draw nothing, allowing the disc to fade out.
 * Each engine is individually controlled.
 * Default values are 1, 1, 0, 0 for legacy behavior.

Open Issue: do these "overrides" get reset on plane-load? (Probably yes.)

Side Billboard
The engine could optionally also have a "side-billboard", showing the prop disc from the side view.


 * Side view billboards would have both separate cell selectors and separate grids, allowing one large cell to be used as multiple side-view cells.
 * Default values of 1, 1, -1, -1 would cause no billboard to be drawn.

Prop Disc Override
An override would allow a plugin to control two new datarefs:


 * Is prop disc - set to 1 for the disc, 0 for blades. Normally this switch is made by X-Plane.
 * Prop disc angle - the angle now of the prop disc. Normally X-Plane makes the prop disc a multiple of the prop's actual angle based on a heuristic.