Thursday, July 27, 2006

The Guilty Parties (e.g. why 850 is slow for now)

In the past two blogs I described the difference between efficiency and overall speed and the effects of VRAM, textures and objects on scenery. So now we can finally answer the question: why is X-Plane 850 beta 4 slower than X-Plane 840? (And can we fix this?)

The answer is: the biggest single thing slowing down 850 is the orbital rendering of the planet! It turns out that the planet is pretty expensive to draw, and even more so in 8.50. Why is the planet more expensive and why are we drawing it? It turns out that we needed to for the new water reflection textures.

In X-Plane 8.40 you can only see the ground about 25 miles away. This is because we don't have enough scenery loaded to draw any farther out - and if we did it'd be a real drag on framerate. But the sunset goes out to the horizon, which can be a lot more than 25 miles away, even at low altitudes. To address this, we decided to (1) make sure the whole-planet view had the new water as well and (2) draw that planet behind the main scenery to extend the sunsets out to the horizon.

So...X-Plane 850 is drawing the planet all the time (and drawing it with sun-textured water) and that's dragging down the framerate. For the next beta we'll make the planet code smarter so it draws as little planet as possible. This should get back almost all of the framerate 840 had, depending on weather and altitude.

The new water does cost a few fps - the framerate hit is very minor - but you may be able to get some more speed back by turning off "reflections and shadows" in the rendering settings. This
will make the water look like 840 and should bring back a few fps. Like 840, turning off the high-res planet textures rendering setting will also improve framerate a little bit.

So hopefully framerate should be pretty close to full speed in the next beta. There may be other parts of the sim that are slower, but the planet was the big one. But of course be aware of things in the sim now that weren't in the sim before:
  • Cars on the roads.
  • Flocks of birds.
  • Reflective water.
Even if X-Plane 8.50 is as fast as 8.40 (efficiency-wise) these new features do work that didn't need to be done before, slowing down frame-rate. You'll have to decide if you'd rather have the improved graphics or the framerate.

4 comments:

Bosse said...

I would appreciate if the release notes were a bit more detailed about settings, e.g. framerate versus "looks". It's not obvious what setting affects performance most.

-Bo

Bosse said...

I would appreciate if the release notes were a bit more detailed about settings, e.g. framerate versus "looks". It's not obvious what setting affects performance most.

-Bo

Kaminari said...

Although the reflective water is a welcome feature (albeit not nearly as convincing as a real water shader), I can't help but smile when I read "improved graphics". Anyway, the big question I never found an answer for is, why is 8.40 so much slower than 8.30? The latter was almost the perfect XP8 in terms of performance. And I'm talking about a P4 2.7 GHz with a Radeon 9600 here. Then all of a sudden, and without any logical explanation, 8.40 comes out of the blue with half the framerate of 8.30. In my book, this is not optimization but regression. It's rather sad that 8.40 is now used as a low-end benchmark for 8.50. Not even mentioning the constant frustration of hearing "the next release of X-Plane will require a new hardware upgrade". I think the XP team doesn't realize that this is the single main reason why so many talented aircraft and scenery designers have left the XP community during the last five years. This time, I'm really concerned that XP8 will be the last version for me too. Time will tell soon enough. Bah, just another bitter rant that will go down the drain...

Benjamin Supnik said...

Kaminari,

I did some investigation regarding 830 vs 840...after 840 shipped it was brought to my attention that some users believed 840 to be slow. (I saw that because we did not receive ANY bug reports on this during the beta, which was frustrating. 850 beta feedback has been much better!!)

Anyway, after extensive testing I could find no indication of lowered sim efficiency vs. 832. We look at sim efficiency in every release and I don't think we've had a step backward in the entire v8 run*. So I can only conclude that users are running 840 vs 832 with different settings in some subtle way.

It should be noted that we do not consider global scenery as slowing the sim down - we view it as raising the amount of work the sim does. You will have to run global scenery on a lower setting than the older scenery to get the same speed, but then you'll still be getting more detail, even on lower settings.

*The only exception I know of is: cards that do not support the OpenGL "VBO" extension but do support display-list optimizations may be slower in newer releases, as we move to using VBOs as our primary OpenGL interface. But the only cards I know of with this problem are Intel integrated graphics chips, which can't run 850 with any kind of speed anyway, and Matrox cards, which have poor OpenGL support.

*cheers*
Ben