Saturday, January 05, 2008

Panel texture in weird places

X-Plane 8 didn't care much whether you used ATTR_cockpit in scenery objects or other strange places. It would simply show the cockpit panel texture, and if it hadn't been updated, you might see an old one, and if it had never been used, maybe you'd see the random (but colorful) contents of memory. Similarly if you could get close enough to another airplane to look in the window, you'd see your own panel, since there is only one panel texture (for the user's airplane) in the entire scenery system.

This is a bigger problem in X-Plane 9.
  • Because the panel texture can be expensive for big panels, we are a lot more aggressive about not setting up the panel texture if we can avoid it. This means that sometimes the texture doesn't exist at all. This is why in beta 14 you get an error if you do a formation flight having only been in "w" (forward 2-d) view...the panel texture doesn't yet exist, but the exterior view of the Cessna tow plane uses it.
  • With panel regions there can be up to four panel textures, so you can see the potential for anarchy.
  • Panel textures aren't even the same size any more, causing the wrong-panel-in-AI-plane problem to look even weirder than before.
So in beta 15, the panel texture is replaced with a dummy white texture for:
  • Any cockpit object for an AI plane.
  • Any scenery objects that are illegally using the panel texture.
This prevents crashes and other nasty stuff. If you want to make the panel be visible in your AI plane, consider using LOD to make a non-panel-texture "fake" cockpit image (at a very small res) at farther LODs. My guess is that in normal usage of the sim you'd really have to do something dangerous to get close enough to see the hack.

We did discuss live panels for all planes (for all of about 3 seconds), but the live panel texture in 3-d is so expensive that it'd be prohibitive to most users for even one AI airplane, let alone 20!

1 comment:

Jamie Cole said...

Given that most cockpit panels are grey, brown or some other dark shade, would it not have made more sense to use a darker shade for the dummy panel (rather than white)?