Wednesday, June 11, 2008

3d Cockpit in the Forward No Panel View: The Untold Story

There is a bug in X-Plane 901 where, when you pick a "forward no panel view" (forward with HUD, forward no HUD) you see the 3-d cockpit in the Cirrus Jet.  The forward no panel view is typically used to make the center display for a multi-sim setup where one computer drives each "window" of the cockpit, or three computers make a wrap-around set of screens.  

(You would actually use forward-no-HUD for all of these views, with the view offset rendering controls creating the view-angle effect.)

It turns out that this bug reveals some pretty weird sim behavior; the rest of this post explains what's going on and how it affects authors.

View Settings - What They Do

These fifteen check boxes can be found in the PlaneMaker "viewpoint" settings screen, under the "view" tab.

Each row controls the drawing of some part of the aircraft: the top row controls the drawing of the 3-d cockpit object, the middle row the inside surface of all aircraft parts, and the bottom row the outside surface.  Since most aircraft parts have no holes in them (unless you "draw" them with alpha) usually it's the exteriors you need drawn.  Back in the old days, some authors wanted to have the interiors be drawn, but with X-Plane 8 and 9 authors usually create attached objects to draw the interior of the airplane.  So that middle row is basically legacy.

Now the columns represent the different types of views, and this is where it gets confusing, because the labels are not so obvious.
  • The first column applies to the forward 2-d panel view ('w' view).
  • The second column applies to the 3-d cockpit view ('ctrl-o' view).
  • The third column applies to the forward no-panel view (shift-w view).
  • The fourth column applies to the side 2-d panel views (q and e views).
  • The fifth column applies to external views ('a' view, etc.).
Here are some notes by number:
  1. If you check this, the 3-d cockpit will be used in the 2-d panel forward view.  This is handy if you only want to make a 3-d cockpit.  The F-22 that ships with X-Plane does this - the 2-d panel is really the 3-d cockpit viewed head-on.
  2. You always want to check this, otherwise the 3-d cockpit will have no 3-d cockpit object.
  3. You never want to check this, because you don't want to see the 3-d cockpit in the forward no panel views!  But see below.
  4. You can check this to use the 3-d cockpit object instead of 2-d side panels.  The default P180 does this.
  5. Check this to draw the 3-d cockpit object in external views.  You probably want this if it's possible to see in through the windows of your plane, otherwise the cockpit will be empty!
  6. You basically never want any of buttons 6-10...
  7. They show the interior of the aircraft geometry, so you'd only want this to see the fuselage from the inside for example.
  8. But the inside of your fuselage will still have the external fuselage texture, which is ugly.
  9. That's why most authors use objects to model the aircraft interior.
  10. So in summary, don't check 6-10...use attached objects to model the inside of your airplane, as well as the cockpit object.
  11. Check this to see your prop disc in the 2-d panel.
  12. Check this to see your prop disc and wings in the 3-d panel as you look around.
  13. You probably don't want to check this unless you want to see a prop disc in the forward no-panel view.  See below.
  14. Check this to see you wings and prop disc from the 2-d side views.
  15. You always want to check this - otherwise you won't see your plane from the outside!
That was a lot of detail, but hopefully it will act as a cheat-sheet for setting these up.  In X-Plane 920, the user interface has been relabeled - those 15 comments are now in the mouse-over help.

How 900 Works

X-Plane 900 and earlier has two very strange quirks:
  1. It ignores all of the "forward-no-panel" check-boxes and simply never draws anything in this view.
  2. It defaults these check boxes to checked when you make a new aircraft.
These are unfortunate behaviors when taken together - it means a lot of aircraft have their forward-no-panel view flags set to true.

How 901 Works

The bug in 901 (and 902b2) is that it honors all view flags - even the forward-no-panel ones.  So for the first time we can see that 3-d cockpit that the Cirrus Jet has been asking to have drawn.

How 902 Will Work

The short-term fix for 902b3 (or 902r1) will be to act like 900 - ignoring the forward-no-panel flags so planes just work.  This is a quick-fix because 902 is just a localization patch.

How 920 Will Work

920 will feature a real solution.  First, 920 will revise the .acf file version number.  This is something we do fairly often - the version number was revised 5 times during the v8 run. Revising the version number does not change backward compatibility; 920 will open all of the aircraft that 902 does.  What it does mean is that aircraft created for 920 will not open in 902. (This is necessary - a number of 920 features, like key-framed generic instruments, simply don't exist in 902.)

This versioning gives us a hook to fix the forward-no-panel view for real:
  • When an older plane is opened in 920, the forward-no-panel check boxes are cleared.
  • 920 will honor those check boxes.
Thus all old planes will show nothing in the forward-no-panel view (that is the expected 900 behavior) because the check-boxes are cleared on load.  But authors will have the option to check the forward-no-panel options and resave as a 920 aircraft, and thus choose to have a prop disc in the forward view, for example.

3 comments:

Peter said...

thank you Ben for these explications.
more clear now

cheers,
shamalouni (pierre)

Nils said...

Great walk through. I have a question though. Can I have rain drops on the windshield drawn behind my 3d cockpit or will they only work for 2d panels?

Thanks,
Nils

Blue side up, Bob said...

Thanks. This explains the apparently random, misbehaving prop disks in 2D forward view in the latest version of my Taildragger plugin.

Blue side up,
Bob