Thursday, November 29, 2007

Obects and Liveries

In X-Plane 9 betas 2, you can use the livery system to provide alternate textures for misc objects attached to your plane, but not the cockpit objects. Beta 3 will address this, allowing cockpit objects to reference the livery system too. We'll get some examples posted for how this all works soon.

Austin and I were discussing this last night - here's a few thoughts on the difference between the misc. objects and the cockpit object:
  • Because you can have multiple misc. objects, you can effectively use more than one texture for your airplane. These days plane designers want a lot more than one texture.
  • We're working on optimizations for attached objects - basically by breaking your plane carefully into a few objects, you may be able to optimize frame-rate. A lot of this code is not in the sim yet, but will go into a later beta.
  • Using multiple objects with different LODs is a much more efficient way to improve fps than simply having multiple LODs of the entire plane.
For example, make an interior object with a low LOD (0-500 meters) and an interior texture. Attach it. Then make an exterior object with an exterior texture and a longer LOD (0-50000 meters). When you back away from the plane, X-Plane can entirely skip the interior object, which means that neither the geometry nor texture have to be moved to VRAM. That's a big performance win.

The cockpit object is also different:
  • The cockpit object induces the sim to make a texture out of the 2-d panel. (And it is the only object where the panel texture is legal.)
  • Mouse-click analysis is only done on the cockpit object. If you load up the cockpit object with all of the animation for your landing gear, X-Plane has to wade through all of that animation to update the mouse cursor in the 3-d cockpit.
  • The cockpit object can be swapped for an alternate object in the exterior view (we'll provide more control of this for misc objects soon).
So my general advice is: use the cockpit object only for the real panel itself!

However, we have provided livery support. You can't livery the 2-d panel, and the livery system is not meant to reskin cockpits, but there are probably some planes out there that used the cockpit objet to model exterior plane features (from before we had misc objects). The livery system in beta 4 will let you reskin these planes without changing how your obects work.

No comments: