Personal tools

Prop Disc RFC

From X-Plane Wiki

Jump to: navigation, search
This page contains a Request For Comment (RFC). RFCs are posted to facilitate discussion of possible features; an RFC does not mean that the feature will be implemented, or that the feature will be implemented exactly as specified in the RFC! Do not assume an RFC will be implemented; do not create and post content that uses extensions proposed in the RFC. Wait for the final specification before creating airplanes and models!

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.

Contents

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 < 0 or >= 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.
Navigation