Fig. 1 Pilots panel. In the foreground, the altimeter, with a new barometric read-out for QFE/QNH as a rolling display.One of my ambitions has been to reduce reliance on “panel.png”. Originally intended for 2D panels, which could be edited easily and effectively via Plane Maker, its use was extended for 3D cockpits where it has become a frame-rate hog. It’s also easier to manage consistent lighting effects if everything is modelled the same way.
Further use of polytext (see today’s earlier posts) and adding more sophisticated animation undoubtedly reduces frame rates, but the changes are small and proportional. Changes in the overall size and number of things on panel.png has an enormous effect. After reducing it from 2048x2048 to 1024x512 pixels there was a net gain of 20% in speed, or +6 FPS on my computer. Last week, I reduced it to the absolute minimum: just the weather radar scope and a single hot-spot for autopilot speed hold (annoyingly, I can’t find another way to make speed hold work). Panel.png is now only 256x128 pixels and I gained a further 5%, or +2 FPS.
Part of this work was transferring the digital read-outs from Plane Maker to rotating scales. This is completely accurate for the Comet. Fig. 1 shows the barometric pressure reading for QFE/QNH adjustment as a rolling gauge. Fig. 2 shows the animated parts: four cylinders representing the original tumblers, each with an independent axis of rotation.
Fig. 2 Barometric roller-gauge component parts.
The lowest cylinder can be conventionally animated so that 10 digits = 360 degrees. Higher cylinders must remain fixed until their lower neighbour reaches 9 (or perhaps 9.5) then click up to the next value.
Fig. 3 (Foreground) Autopilot heading selector, also with a rolling gauge.
Fig. 3 shows the heading selector for the autopilot. The OBJ8 animation code for the middle cylinder (showing “8” in the picture) is:
ANIM_rotate_begin
-1.000000 0.000000 0.000000 sim/cockpit2/autopilot/heading_dial_deg_mag_pilot
ANIM_rotate_key 0.000000 0.000000
ANIM_rotate_key 9.500000 0.000000
ANIM_rotate_key 10.000000 36.000000
ANIM_rotate_key 19.500000 36.000000
ANIM_rotate_key 20.000000 72.000000
ANIM_rotate_key 29.500000 72.000000
ANIM_rotate_key 30.000000 108.000000
ANIM_rotate_key 39.500000 108.000000
ANIM_rotate_key 40.000000 144.000000
ANIM_rotate_key 49.500000 144.000000
ANIM_rotate_key 50.000000 180.000000
ANIM_rotate_key 59.500000 180.000000
ANIM_rotate_key 60.000000 216.000000
ANIM_rotate_key 69.500000 216.000000
ANIM_rotate_key 70.000000 252.000000
ANIM_rotate_key 79.500000 252.000000
ANIM_rotate_key 80.000000 288.000000
ANIM_rotate_key 89.500000 288.000000
ANIM_rotate_key 90.000000 324.000000
ANIM_rotate_key 99.500000 324.000000
ANIM_rotate_key 100.000000 360.000000
ANIM_keyframe_loop 100ANIM_rotate_end
Note the essential use of
ANIM_keyframe_loop at the end, which makes sure the cylinder continues to click round ad infinitum.
Fig. 4 (Foreground) Modern NAV controllers (actually supposed to be DME controllers, but they are locked to the NAV frequencies in X-Plane), also with a rolling gauge.
Fig. 5 (Foreground) Fuel used per engine as a rolling gauge with zero-reset knob. This will need a plugin to work.
Next step: texture baking for the Galley.
--
GMM-P (26/02/2011)
Tags: Cockpit, Rolling Displays