Showing posts with label fsx. Show all posts
Showing posts with label fsx. Show all posts

Thursday, August 7, 2008

The nuts and bolts of multiplayer performance in FSX...

Okay so I've been on something of a crusade when it comes to multiplayer framerates for quite awhile. Anyone who's flown online with me for more than, oh, five minutes, has no doubt heard me bitch about it, and well I haven't exactly made too many friends on this topic over at Avsim's FSX forum in recent debates, but eh, what can ya do? It matters to me because I haven't flown singleplayer for pleasure since October of 2006, not once. There is simply no going back. Not that I ever did much single player flying in FS9 either. It doubly matters to me because if I get less than 30 fps locked I get a little grumpy. ;)

Anyway in my quest to make the L-39 as lean as I possibly can I've been drawing on all my previous game art experience, but I've also been doing a lot of searching and reading on the peculiarities of FSX when it comes to the subject of performance. Torgo3000's blog, and the incredible well of knowledge provided by the very kind people who post at fsdeveloper.com in particular have been very enlightening to me. One of the things I've noticed though is that the issue of draw calls seems to be everyone's favourite whipping boy lately when trying to explain why one model performs better than another. I've seen quite a few developers on various forums pretty much state flat out that polygon counts just don't matter anymore, that it's all about the draw calls now. That kind of statement quite frankly worries me a bit because all of my previous game development experience tells me that just the opposite is true, and that's what I intend to talk about here.

By the way, if you're not interested in a somewhat technical little article about why your FPS always seems to head straight for the single digits in multiplayer then stop reading now! If you are though, or feel that the statement made by one Avsim forum member, that "FSX multiplayer flyers are little more than second class citizens in the eyes of most developers" is true, well, then please read on.

Personally I don't think they consider us second class citizens, rather I don't think most of them have really considered us much at all. There are happily some shining exceptions to that statement though, and not the least of which would be ACES themselves, in their valiant efforts to keep every kind of user happy at the same time.

So why should addon developers consider us you might ask? Well, because multiplayer, in my opinion, and no matter the genre, is *absolutely* the future of PC entertainment. If you're a diehard singleplayer flyer then you'll no doubt disagree with me, but multiplayer is the great feather in PC gaming's cap, and is something that the consoles have yet to even remotely compete with. Multiplayer experiences are growing in popularity at an insane pace, and singleplayer ones are starting to sit on the shelves in a big way. That trend has been going on for years now and is only getting stronger. If you don't believe me I'd recommend you look at the unbelievable popularity of a little game called World of Warcraft. ;) Yes, love it or hate it, the world's most popular and financially successful game contains no singleplayer mode whatsoever. Humans are social animals, give us a chance to play with others rather than play alone and we're drawn to it I guess.

However, on today's hardware, making something work efficiently in a multiplayer environment, massive or not, means dredging up some old school 8-bit era thinking and ingenuity when it comes to graphics, and doubly so when considering FSX content. I've been trying to do just that with my Albatros and in the process I've been doing a lot of comparing and testing, trying to find out just what is it that really kills framerate in FSX. I was pretty surprised at some of the results, so I hope you find what follows interesting.

Ok, so, the new whipping boy: draw calls. The easiest way to sum them up is that FSX needs to break airplanes into chunks when processing them and sending them off to the video card for rendering on your screen. Most game render engines try to make assumptions about parts of a model in order to avoid checking every single property for every single vertex, which is very time consuming and slows performance. If a number of polygons (triangles) share identical properties then it can batch process a whole pile of them together into one big draw call, rather than a bunch of small ones, thus using the available bus bandwidth more efficiently and resulting in higher framerates. That's the general idea anyway. Something about that idea has been bugging me though lately so I decided to do some investigating using a wonderful tool called DrawCallMonitor made by FS guru Arno Gerretsen.

Now, a couple of disclaimers. First, neither this tool nor the numbers I'm going to show from it can tell the whole story about a particular model's performance. There are many other factors that play into it such as the number of textures applied to a model, their sizes and bit depths, and about a million other little issues. However the three biggest players in FSX performance are draw calls, triangle counts, and texture vertices, and that's what the tool does deal with. I'll explain a bit about each later on. I'm also not counting the performance hit from virtual cockpits and gauges or anything else here. Everything that follows is strictly concerning external aircraft models in their highest LOD form (such as you encounter in multi-ship close formation flight), and only the most basic properties of them. However, having said that, everything I'm going to talk about also applies to virtual cockpit models.

Second, I have picked eight small aircraft from my hangar to compare, and in the interest of fairness and peace I've designated them with letters A through H. They range from single engine props to small fighters and warbirds, and one helicopter. The military aircraft involved in the comparison are in their clean configurations, ie: no weapons or fuel tanks, in order to keep things as fair as possible. In each case they are aircraft that I love to fly and have logged dozens or even hundreds of hours in. All are true FSX compiled aircraft and all are of extremely high visual quality both in shape and textures.

Okay, on with the data!

First up, draw call counts. Like I mentioned above, the aircraft is broken into chunks based on parts of the aircraft that have identical properties. By that I mean materials really. Each time you change the material from one type to another, say from matte to chrome on the same object, you're forcing a new draw call. As far as I know FSX has a total budget of somewhere around 5000 draw calls (very system dependent), which includes your aircraft's VC, AI/multi traffic, clouds and scenery. The seemingly generally accepted theory is that the more draw calls a model makes the more demands on the hardware it has, and the slower the model performs... or does it?



Ok, so at first glance aircraft D should be the highest performer, and indeed it is, but, as you'll see in the stats to follow, D has a lot more going for it than just a low number of draw calls. Based on draw calls alone Aircraft G might seem to be the worst performer of the bunch. Ah, but just wait, the plot thickens, or thins, or whatever it is that plots do...

Next, polygon counts. This is pretty straightforward. An airplane is made up of triangles. The more triangles it has the more rounded and refined it looks from all angles. Although the concept of 'size' in computer graphics really has no meaning at all, it does matter in a simulation, since you're going to end up with really large aircraft next to really small ones fairly often. The bigger physically an aircraft is the more polygons it's ultimately going to need to make it look comparably smooth. That's why I've chosen only small size aircraft to compare. Okay, so how many triangles does each contain?



Okay, so now things look quite a bit different. Aircraft H which had a low draw call count turns out to have the greatest number of triangles and Aircraft G which has a high draw call count has only a slightly above average number of polygons. Now the numbers are going to be a little unreliable as all of these models employ visibility tags to show or hide parts of the aircraft at various times. So not all of the polys in each are displayed all the time, but most are.

So let's look at the final count, Texture Vertices. Now basically texture vertices are a combination of the number of vertices that make up the polygons of the aircraft and the number of independent uv coordinates attached to them, which can be shared or not depending on how the airplane is texture mapped. Without getting too technical, the number of texture vertices (when compared to the number of polygons) is a very very loose indication of how efficiently texture mapped a model is, how many vertices share their uv coordinates. The real things we're looking at here are the number of texture vertices a model has in total, but also the ratio of the texture vertices to its polygon count. Anyway I say it's a very loose indication because it doesn't tell the whole story, not by a long shot. Every aircraft has its own unique texture mapping problems, and every artist tends to tackle them differently. Some of those problems simply can't be avoided due to an object's shape. But here you go...



Now, for better or worse, this is where these aircraft all start to show their true colours I think. Based on my own experience in multiplayer with each aircraft it's the texture vertices graph which most accurately portrays their respective performance hits when flying in close formation.

In order to prove to you that I'm not loony (or maybe that I am) I've done a series of tests on each aircraft, using an identical flight situation in which the cpu/videocard load caused by all other elements of the sim are negated to the maximum extent possible. The tests are done using nothing but a camera platform in slew mode, no user aircraft is loaded. The test is over the middle of the Pacific Ocean under clear skies and all scenery settings are at minimum. Multiple copies of each aircraft are placed in a closely spaced array via FSRecorder tracks. The test literally is this: How many copies of each aircraft can I have on screen at once and still maintain 30 frames per second?

Below is a screenshot of what the test looks like. For the keen, only one of the tested aircraft contains LODs and textures with mip maps. In that case I compressed the view to force each copy on screen into its highest LOD and mip state.



And the results? An almost exact mirror reflection of the texture vertex and polygon counts. The fewer polygons and texture vertices an aircraft has the higher its real world performance. In the graph below Aircraft H is the one to look at especially since it had a below average number of draw calls but a very high poly count. If polygons don't matter anymore then I should have been able to get quite a few more H's on screen before suffering in performance. In real world use I usually can't even have ONE type H aircraft on screen without dropping to single digit FPS. Conversely aircraft G with its very high draw call count should cause a lot of performance damage but in real world play with high settings I can usually have at least 3 flying with me.



The bottom line? Texture vertices and polygon counts still seem to be quite a bit more important to performance than they're being given credit for lately.

Once you put virtual cockpits (which are often far more damaging, and to be fair, necessarily so, than external models), gauges, flight models, scenery and all that back into the equation you can pretty much knock two to eight planes off any of those formations if you're trying to keep 30 fps. In the cases of aircraft C and H you're looking at major reductions in scenery settings to get even one on screen along with your own aircraft and still keep a decent framerate.

So when comparing the stats against real world demonstrated performance it seems that draw calls aren't quite the big deal they've been made out to be, at least for aircraft. Do they matter? Definitely. But having even an incredibly low number of draw calls doesn't let you get away with murder in the polygon and texture vertex count departments. For scenery, which concerns thousands of objects at once rather than just the few which make up an aircraft, I can see this kind of test panning out very differently, but the poly count there still matters a lot too. For airplanes though it seems that texture vertices are killer #1, followed very quickly by total polygon count, and lastly by draw calls. Texture vertices are entirely dependent on poly count though. There are a lot of mapping tricks that can be used to get the texture vertex count way down, even with a high poly count, but the bottom line is that the more efficient the model is polygon wise to start with, the easier everything is on the CPU. Highly clever mapping techniques aside, when the poly count comes down so do the texture vertices for the most part, and the knock-on effect in performance improvement, as demonstrated by aircrafts A, D, and E, is simply enormous.

There is also another area where a high poly count alone can kill your performance and that's real time shadows. The ground shadows cast by aircraft in FSX are calculated straight off the polys themselves and the more of them you have the more performance you lose. In case you don't believe me just load up your favourite high end addon aircraft, turn off the aircraft ground shadows in your display settings and watch what happens to your framerate. ;) This alone, or any two pass render effect (water, bloom) makes a strong case for efficient modeling, or at the very least for the return of low-polygon proxy shadow models.

Where a low draw call count on a plane does seem to make a noticeable difference though is in a scene completely over-saturated with autogen. In that kind of situation it starts to show some advantage, but at that point an average user's FPS is so low that the sim is all but unplayable anyway.

Here's a final graph (I promise!) that shows all the stats together normalized. Poly count and Texture vertices are best viewed as a unit in how they relate to each other. When you compare those though to the draw call counts and each aircraft's actual resource demands in the sim, you see the story I've been trying to tell. :)

My system's specifications are important to this last graph:

Intel QX9650 Penryn (@4.0 ghz)
4 GB DDR2-1066
Nvidia 8800 Ultra 768mb (not overclocked)

(please click to enlarge, it's hard to read)



The other large performance killer that I haven't touched on above is the size and bit depth of the textures applied to each model, and these can have a dramatic effect. In the cases of the aircraft I tested, with the exception of aircrafts D and E, all have similar texture sizes and bit depths, ie: between five and eight 1024x1024 DXT5 base textures applied, as well as matching bump and specular maps, and a number of smaller subsidiary textures. Aircraft D has a much lower number of textures than the others and aircraft E has a much higher number. The interesting part there is that both D and E are high performers, with dramatically different texture loads, E using nearly 5x the texture space of D. This is mostly due to their mapping and low polygon counts I think, with the remaining difference coming down to D's exceptionally low number of draw calls.

By the way there's a plane in my hangar, a freeware one actually, that is 350+ draw calls, 141,000 polygons, and 230,000 texture verts. Oy! How many of those can I have on screen in multiplayer and keep 30 fps? Umm... none! :)

So why 30 FPS specifically? It's because I consider it the 'magic' number when it comes to flight model fidelity, especially concerning aerobatic and helicopter flight. Any less than that and fine, accurate control becomes difficult. 30 FPS is also magic because it's one of the few framerates that properly synchronizes with the standard (and rather lame I might add) refresh rate limit of LCD monitors, 60hz/FPS, and as such is relatively stutter free. The next highest available synchronized framerate is 60 FPS, and it's going to be a little while before we see that kind of performance as standard in FS I think. :)

In closing, it turns out that polygon counts and their associated texture vertices do actually matter, a heck of a lot!

If you're a developer and reading this you're probably thinking by now that I couldn't care less about what singleplayer flyers want, and you'd be right, I couldn't! Kidding of course, I do actually care, a little anyway. :) However, consider this: Both player types want performance, badly. You need only to browse any FSX forum for two minutes to see that, and if you build a plane for multiplayer flyers first, you suddenly make singleplayer flyers very happy too. In doing so you give them the ability to crank up their scenery settings by several notches, and singleplayer flyers, at least the low and slow crowd, aren't looking at a plane three feet off their wing like we do, they're mostly looking at the ground.

Is building stuff this way harder? Yes, and even after doing exactly that for EA and Namco for eight years I still find it challenging. Do you have to sacrifice quality to do so though? No. There are tons of low poly modeling and mapping tricks you can employ. Is it worth the extra effort? I certainly think so.

Anyway if you made it this far, cheers for reading. Sorry for the abstraction of the graphs, I did the best I could with them. :)

Less is more. (except frames per second of course)

Multi for life.

-lotus

Thursday, May 22, 2008

One point frickin oh baby!

Woot. The first pass on the external model of the L-39 is now complete. Everything is textured, everything is animated, everything works. Sweeeeeet.

There are many little tweaks yet to do, and I'll be revisiting several textures and improving them over time, but most of that will come after I tackle the VC. I have a couple weeks before I'm off to Iceland though, so I'll probably do up another paint, something perfectly opposite and complementary to the immaculate C-GOZA. The real plane I replicated with this paint scheme is so clean you could cook your burgers in the tailpipe and use the ailerons for plates. Next up will likely be a low vis (and heavily weathered) Czech air force camo scheme.

Anyway, it's Stella time! Here are some pics of her finished v1.0 form. :) Man do I need a good night's sleep!










Friday, January 18, 2008

One Last Teaser...

Now that the star of the next film is in place it's time to let you see her. :)

(click image for full resolution version)



The Dassault Rafale M is, in my opinion, *the* sexiest aircraft ever created by human hands. This particularly gorgeous model, created by Thor's Hammer of Dijon, France is not publicly available nor will it be for quite some time, so please don't ask where you can get it. However he has graciously allowed me an exception specifically for the making of the next film. :)

The image isn't photoshopped but is actually a still from one of my test shots, which I've been working on for four hours straight, and given that it's now 7am I need some damned sleep!

I wasn't kidding about that '3am' thing in the header. ;)

-Lotus out.

Saturday, January 12, 2008

Things to come...

Well I've been getting quite a few people pestering me lately on when the next movie's coming out, which I must say I'm pretty humbled by. The concept of having some fans wasn't something I'd ever considered when I started making FS films haha. So thanks for that!

Anyway, here's a little teaser of something I'm working on. It's just some test shots, and the final film will likely feature neither this plane nor song, but it'll give you an idea of the 'feel' the next film might have. ;) This is however a small part of what's going into it. I'm not giving everything away hehe.

This is the first time I've released any kind of work in progress for one of my films, outside the group of people who help me make them anyway, so we'll see how this goes. Also I'd greatly appreciate it if this video does not leave my blog. Links however are fine, thanks. :)

The aircraft: Alphasim's fabulous Saab JAS39 Gripen.
The place: Austria.
The gist: Pure joy.

Enjoy!



Thursday, January 10, 2008

Lament: The Deleted Scenes...

Well after getting this new system I decided to do a little house cleaning and ran across a number of clips from when I was working on Lament. More than any other film Lament was an absolute nightmare to edit down into a single song. I ended up with just a ton of extra footage that I had no place for in the final cut.

So here's all the stuff that was left out, yup, an entire movie's worth haha.

Enjoy!




In case you're curious, the song is 'Bombs' by Faithless.

Wednesday, December 26, 2007

Aircraft Review: Flight1 Pilatus PC-12 for FSX

Well aside from spending a lot of time making videos, I also fly a lot just for the hell of it, which I guess is the point of flight sim after all.

So, starting today I'm going to do a quick review of any new aircraft I buy, and since I just picked up something truly fantastic, I'll start with that.

Short review: The Flight1 FSX Pilatus PC-12 quite simply KICKS ASS.

Full review:

If you don't know what this plane is then I'd recommend checking out its specs on Wikipedia. It goes by the nickname "The Swiss Army Knife" and it is very deserving of that moniker. It's a single engine turbine powered 8 seat go frickin' anywhere and FAST airplane. It'll do 270 knots at 30,000 feet and land on any surface in less than 700 feet. It is the ultimate "Courchevelian".

The flight1 model of this beast for FS9 was pretty good but the FSX version of it improves absolutely everything by quite a margin. The VC is one of the best I've ever seen and boasts RealAir quality smoothness in the gauges. The avionics are a truly complete set and are just excellent for IFR work. The night lighting in the VC is also quite beautiful. Any developer that takes the time to backlight gauges perfectly for night flight, thus not requiring me to use the dome light, wins.

The flight model is spot on and has one rare quality among single engine props made for FS: The vertical stabilizer's twist/incidence actually perfectly counteracts the torque of the engine at optimum cruise speed, just as it should in a real aircraft. This seems like a small thing but short of the RealAir Spitfire or Iris Texan II, I've *never* seen a developer get this part of a flight model right. Even RealAir's own SF260 doesn't do it correctly, amazing as that plane is.

The external model is equally beautiful and the textures are sharp and clear. The bump and reflection mapping are also just about perfect, not too shiny, not pitted or overdone in any way. The soundset is, well, soothing. I love the sound of that turbine in cruise, and all anciliary sounds are custom made and well done. Only sound that bugs me is the autopilot disconnect alert as it is just a little too loud. Easily fixed. The thing that stands out most about this aircraft is its consistency. The VC, flight model, sound, external visuals, avionics and gauges all feel as if they were carved from the same block of granite. That kind of consistency in quality both technical and visual is very very rare. Most planes excel in one or two areas and fail horribly in others. This is quite an exception. By the way it comes with 5 repaints. Three of them are rather 'corporate' looking (and you know how I feel about THAT shit), but at least two are refreshingly funky. ;)

Basically I love everything about this plane and I highly recommend it as a purchase. If you want an SUV for the sky that can cover 1200nm without refueling and look *damned good* doing it, then this is the plane for you. Keep in mind that I'm a fighter/warbird/helo kind of guy, so for me to say all that about a large general aviation aircraft means I'm particularly blown away.

On the issue of framerate performance I expected it to give much more of a hit than it did, and I have to say that the hit is much less than the FS9 version's was. I do recommend that you have at least a dual core machine for flying this thing though. Those gauges do take some cpu power to run, but the configuration program it comes with allows you to disable the FO's multifunction displays, and that buys you quite a bit of fps back, around 4 or 5. It degrades my FPS no more than say the Iris Tomcat does, so that's pretty good considering its complexity.

The only real negative I can bring up about this plane is that it won't work in shared cockpit mode, but that's something we've come to expect from aircraft with such complex gauges. There is hope though, ACES recently released the data to allow developers to synchronize local variables in shared mode. Fingers crossed.

The only bugs in the mix are a slightly annoying beacon flashing effect in the VC, a somewhat difficult to read lower GPS panel in certain sun angles, and a slightly odd interior reflection map on the windows. As well I found the default eyepoint position in the cockpit more suitable for a Hobbit than an Elf, but again that was easily fixed. None of these little issues are showstoppers mind you. This bird lives up to its hype and is totally worth the $30 asking price!


Verdict: Buy it right the hell now.

Here's where to get her:

http://www.flight1.com/products.asp?product=fsxpc12

-Lotus