(despite my previous rantings) there is a lot of discussion of performance based on settings (e.g. "I used to get 40 fps with this menu pick, now I need this other menu pick") as opposed to based on what the sim is actually doing, allow me to go off in some detail about what's going on under the hood.
During X-Plane 850 and 860, I tried to fix a number of long-standing "quality" issues, where the sim had small artifacts. There is a fps penalty to fixing these artifacts that I thought was small, but the message is clear:
- Some users are flying X-Plane on lower-end systems and can't spare a single fp.
- A lot of users really don't care about the quality issues and would gladly trade back the visual "improvement" (which doesn't seem like an improvement after living with the issue for 4 years) for those few fps that mean the difference between clear skies and fog.
X-Plane 840 and earlier
In X-Plane 840, lights could be textured or untextured. This was controlled by a simple checkbox "draw textured lights". A few lights (on the airplane, for example) were always textured because we thought they were few in number and important visually. The rest was decided by the checkbox.
No airport light ever had a 3-d "structure" (e.g. you couldn't see the light housing and support rod).
No light was ever drawn using hardware acceleration, even if the graphic card had pixel shaders; we simply didn't have the code. Therefore textured lights ate up a lot of CPU power and thus ate up a lot of framerate. But life was simple!
X-Plane 850
With X-Plane 850 things got a lot weirder.
- We rewrote the lighting engine to optionally use pixel shaders if present. This improves performance of textured lights a lot. In fact, on a given machine with pixel shaders, textured lights with hardware acceleration are faster than non-textured lights without hardware acceleration. (For hardware accelerated lights, the texturing doesn't cost anything compared to hardware accelerated untextured lights.) It's important to note this performance fact!
- Sergio created a bunch of 3-d object lighting fixtures for the runway environment. They have a low LOD, but up close you can see the actual lighting structure.
- Checkbox off, no pixel shaders: we draw untextured lights using software, no objects.
- Checkbox off, with pixel shaders: we draw textured lights using hardware, no objects.
- Checkbox on, no pixel shaders: we draw textured lights using software, with objects.
- Checkbox on, with pixel shaders: we draw textured ilghts using hardware, with objects.
X-Plane 860
With the next X-Plane 860, we're going to use this checkbox to control multiple aspects of the sim, but always with two choices: either prioritizing visual quality, or prioritizing framerate.
So this option will not only pick the fastest (or nicest) light code and turn the objects on and off, but it will also, for example, turn on or off per-pixel fog (something that looks nice but is slower than the old per-vertex fog).
I'm not sure everyone will like this, but I think it will meet some important needs:
- It will make it obvious how to set the checkbox. Either you want speed, or quality.
- It keeps the config interface simple for new users.
- It gives us a way to tie in a number of small optimizations that add up when taken in concert.
2 comments:
I don't think X-Plane has a built-in fps test like Unreal Tournament or Quake have. Perhaps add a built-in fps test to x-plane, so all users can test different hardwares under same simulation conditions. We should then get a fair comparision hardware test. This test should go through both easy and heavy load areas and do exactly the same thing (same angle, environment etc.) at each test operation.
I don't know if X-Plane's fps test is like Unreal or Quake, but it definitely has a fps test. See my post on 10/6/06:
http://xplanescenery.blogspot.com/2006/10/x-plane-850-framerate-test.html
It goes through either ah heavy or lightly loaded area by adjusting settings - the testes are numbered.
Post a Comment