Tag: inside x-plane

Tuning the Rasterizer

I’m not sure anyone cares about this kind of thing, but…




These are pictures of a test of the rasterizer. The rasterizer is code in both the DSF creator* and X-Plane that converts polygons into lines or boxes. What good is that? We use it to:

  • Plant trees inside a polygonal forest in a DSF.
  • Process all of the elevation points inside a polygonal water body when making a DSF.

Etc., etc. These were from a performance test rasterizing the Mississippi delta at 1201 x 1201; because the vector data is insanely detailed (something like 2 million line segments I think) it’s a good test of performance. The blue lines represent a line fit, but the white lines are a “box fit” – that is, they ensure that not only are they “inside” the water, but the area above and below them are too.

* Programming geeks can use this code – it’s in PolyRasterUtils.

Posted in Development by | 5 Comments

Feature Requests for X-Plane 10

Yesterday I got a bit cheeky regarding feature requests for X-Plane 10. Here are a few slightly more serious thoughts regarding the feature request process.

The major features that we are putting into X-Plane 10 were decided, for the most part, a long time ago. Those who we met in France two years ago won’t be surprised by the major items on the list: weather, ATC, airports, and new scenery, new shaders. For that kind of major feature work, we have to start an initiative very early on. Heck – global sun shadows (which I believe we will ship in v10, God willing) were in the works before version 9.0 shipped – it took that long to get an implementation that was useful! (In fact, the v9.0 version was not released because the quality was bad, which is why I am always nervous about announcing features in advance; it ain’t over until it’s over.)

So while it’s exciting to see so many people discussing X-Plane 10, realistically if a feature is a “big” feature and we haven’t started it now, it’s not going into 10.0. That train left the station over a year ago.

There have also been two complicating factors that have cropped up during the X-Plane 9 run:

  1. Microsoft closed ACES, which definitely changes what we want our next major release to look like.
  2. The iPhone came along – until the first iPhone release, we had no idea that it would be such a big product.

While we have to plan our big features in advance, the market we are going to ship into changes during development.

So bear with us – a lot of what I see are good ideas that we will get to soon, even if they don’t go in the initial roll-out.

Posted in Development, News by | 8 Comments

Multicore and Version 10

Over the last two years, we’ve been working on the X-Plane rendering engine, setting up the code to take advantage of multiple cores when possible. Most of these changes are in X-Plane 9 already: multi-core creation of 3-d scenery, multi-core loading of scenery, multi-core loading of textures.

X-Plane 10 will leverage this work, pushing even more work to multiple cores. And yet, nine women cannot have a baby in one month. The ultimate limit on framerate will be based on the performance of one core pushing data to your graphics card.

So how many cores do you need, and is it better to have a few fast cores or more slow cores?

I can’t give you a firm answer, because I don’t know how important money is to you, I don’t know which rendering settings you care most about, and X-Plane 10 isn’t finalized. (And even if it was, we often improve performance in patches.) But I can suggest our attitude to how cores are used.

A Graphic Analogy

With graphics cards, the companies target different markets. The “enthusiast” market is the top end, where money is no object and maximum performance is the goal. Below that you have “performance” cards (a good value for the money but not as fast) and “mainstream” (which by video game standards means “slower than snot” – main stream users don’t need fast 3-d graphics to check email).

When it comes to rendering features, we expect X-Plane to be efficient enough to meet the performance expectations of a given slice of the market. In other words, if you have bought a top-level graphics card, we need to be efficient enough to let you run at 8x FSAA on a huge screen with per pixel lighting – that’s what is expected of the enthusiast crowd and that’s what the cards are built for.

But if you have a mainstream card and get 5 fps with per pixel lighting, well, too bad. You’ve got a cheap, low powered card, you need to dial down the sim. Here our goal is only to give you a way to run X-Plane at all. (And frankly, if X-Plane could run at 60 fps on a mainstream card, it means the max rendering settings don’t take advantage of top end hardware!)

Core Considerations

At this point we expect pretty much any modern computer to have at least two cores, and users with single core machines are going to have to make serious graphic quality sacrifices to run X-Plane. (This is already true for version 9.)

When it comes to version 10, I think we will categorize “a lot of cores” (e.g. 4, 6, or more) as enthusiast – some of the top level rendering options may not function well with less than four cores, but dual core machines should at least run decently with some rendering options enabled.

How far we go toward utilizing really high core count (Austin upgraded to the new Mac Pro and now has 8 hyper-threaded i7s) I don’t yet know. My guess is that we will get at least some measurable benefit from up to 8 cores.

Trading off clock speed for core count is a difficult choice. Obviously if you had a choice of one core that was twice as fast as a 2-core CPU, you’d take the speed – you’re getting the same total computing power but the clock speed can help frame-rate. But the trade-off is almost never formulated like this, and it’s too soon to have hard data from the sim itself.

For what it’s worth, the latest generation of CPUs is really fast, so it is unlikely that you’d upgrade to a new CPU and not get some serious benefit, whether it comes in cores or clock-speed. The users I have heard from with new iMacs seem quite happy with their machines.

Posted in Development by | 13 Comments

How Specific Should a Bug Report Be?

I got this bug report from Austin this morning (found in the in-development version 10 code):
yter bug

0: go to kcae with no scenery installed at all
1: open the 777
2: go to aircraft:aircraft and situations
3: go to second tab
4: set total num acf to 1
5: go to first tab
6: select ‘carrier catshot’
7: release the brakes, with throttle at idle
8: enjoy the cat.. ease the plane gently onto the water, gear down, pwer off
9: note that the water is ‘hard’… the yter is telling us that we are on land not water. hit brakes. stop. u r walking on water!

The first thing to note is how specific and small each step is. These steps are much more precise than most of the bug reports we get. And yet, they must be that specific – the bug was so tweaky that skipping virtually any of those steps will cause it to not appear.

The biggest problem I see with bug reports sent to me is the use of “any”, e.g. “open any aircraft”. That’s not very specific! And Murphy’s law says: the one airplane I pick will just happen to be the one airplane that you haven’t tried and happens to not show the bug for some strange reason.

So always be absolutely specific. When we ask for tiny steps, it’s not that we don’t know how to use the sim – it’s just that we need to use the sim exactly the same way you did!

EDIT: bug report pages.

Be sure you understand which bug base you should be using (E.g. are you reporting a bug against the plugin SDK, the sim itself, or a scenery tool like WorldEditor.) If you don’t know what program you are filing a bug against, you probably shouldn’t file a bug at all – just contact tech support.

Posted in Development by | 3 Comments

X-Plane 10: What Has Been Posted So Far

There have been a few posts about X-Plane 10 in a few random places; here is a summary of all of the version 10 material that’s been previewed so far, and some notes on what is actually being shown.

First we had Paul’s Oshkosh 2010 video:
//www.youtube.com/watch?v=yCoDPNvOMP0?fs=1
I think this has been made clear already, but:

  • The base simulator shown here is not X-Plane 10, it is X-Plane 9.
  • Many of the airplanes shown here will be released for X-Plane 10.
  • This is not showing the new X-Plane weather system or global lighting.
  • Some of the content shown here are third party add-ons, available today for X-Plane 9.

The main purpose of this video was to show X-Plane off at Oshkosh; at the time we didn’t have X-Plane 10 in a state where we could do an exclusive version 10 preview.

Then I accidentally leaked two test videos of global illumination. This was strictly accidental: I was looking for a cheap way to post a large video for Austin and Propsman late at night and didn’t think anyone would sift through 191 zip files to find two obscurely named videos. I was wrong, and someone found them on the org. I appreciate that participants in the ensuing discussion withheld judgment; these were early test videos and don’t represent the final feature in any useful way. They do, however show off some of what global lighting will mean.

  • This is the Cirrus Jet with landing lights implemented via global illumination. We get two distinct landing lights that cast specular hilights on the fuselage. As the door animates, it opens “into the light”.
  • This is the Avanti Piaggio with strobes and beacons implemented via global illumination. The strobes cast light both on the fuselage and on the runway below the plane.

This second movie is typical of the kinds of tests I do: the beacon lighting is just awful – a gross huge red light splatted on the plane for test purposes. When I get the rendering engine code working I usually hand the feature off to Propsman or Sergio to tune the textures and art constants. In this case, the videos are pre-tuning.

Austin has posted three screen-shots of X-Plane 10-related content:

  • This is Javier’s new shuttle, which I believe will ship in version 10. I believe this shot may have been taken in X-Plane 9. So this is not the new weather system.

    Some of these screenshots and Paul’s video were shot in X-Plane 9. By the time the new airplanes are finished, they will not be usable in version 9 – they will be version 10 only.

  • Propsman has done work on the lighting system. It can be subtle to see what’s going on here because the old runway lights looked pretty good too, but most of these billboard lights are actually rebuilt.

  • This night shot shows global illumination in the scenery system. The glow on the highway pavement is not rendered; it comes from the 3-d lamps along the side of the road. Similarly, the car headlights spill light on the pavement and each other as they drive. (Note how the highway lines are visible in the headlight spill even when there is no streetlight.)

    One difficult problem with rendering a lit highway at night is that the lighting from street lamps on a highway tend to spill light on the surrounding terrain, an effect that is impossible to create with a LIT texture. If you look at the right side of the main highway at the bottom of the picture, you’ll see that the street light is casting light on the grass to the right of the highway too.

I think that that’s all we have posted. At least, it’s all I am aware of. I will go into some of the details of global illumination in another post.

Posted in Development, News, Scenery by | 10 Comments

Removing Add-Ons is a Diagnostic Step

When we get bug reports or tech support requests, the first thing we usually recommend is: remove third party add-ons (plugins, scenery, airplanes).

This is not intended as a cure, only a diagnostic! The goal of removing add-ons is to identify whether a problem occurs due to an interaction with a particular third party add-on or within the base simulator package.

If an add-on induces the problem, we can then look at whether the add-on had problems on old versions of X-Plane. (If not, we can look at how we broke third party compatibility, and fix it.) If the add-on has always had problems, we can look at the content or contact the author.

If the problem is in the base simulator, we can compare results from a number of different users; the base simulator gets used a lot, particularly in demo downloads, so defects that aren’t reported frequently are typically due to configuration issues like new drivers.

So if tech support asks you to remove add-ons, don’t despair – it’s just a diagnostic step, not a cure.

Posted in Development by | 1 Comment

Procedural Or Algorithmic

A quick thought on procedural vs. algorithmic scenery: there was some discussion on the X-Plane dev list about procedural terrain; the Outerra screen shots have stirred up interest.

There is a fundamental difference between what you see with Outerra and what we do with our global scenery:

  • Typically procedural scenery is based on the idea of ‘amplifying data’ – that is, making a little bit of data look more interesting by applying a recursive algorithm to “generate” detail.
  • Algorithmic scenery involves taking a large amount of unique input data and translating it; the detail comes from not losing information in the source data.

The key difference is whether the resulting scenery comes from a process that “creates” information through a ‘procedure’ or “translates” information.

Our scenery process does a bit of both, but we are more in the algorithmic camp than procedural camp; the global scenery is produced from hundreds of GB of input data, and we are constantly looking for better input data to create more interesting and accurate output scenery.

In fact, I would say that we are becoming more algorithmic and less procedural. In version 9, the urban roads in non-US cities are “procedural” – an algorithm generates them from the terrain data, an algorithm, and some random noise. For version 10, we are importing OSM.

One thing I have noticed in the work on version 10 global scenery is that we’ve finally crossed a line. With version 9, the question was ‘what is the best data we can get’. With version 9, the question is ‘how much information can we keep’; we’ve reached a point where the resolution of our input data is so much higher than what can go on DVD, that it’s a question of filtering down, not synthesizing up the resolution.

Posted in Development, Scenery by | 9 Comments

Why Don’t the Cars Work Quite Right in Replay?

The short answer is: to save memory.

The cars and replay seem to be a case of damned-if-we-do, damned-if-we-don’t. If we don’t stop the cars and reverse them in replay, we get piles of bug reports. If we do try to replay the traffic, we get bug reports too.

The current implementation is a bit strange: when you replay traffic, the cars will go back a bit in time, but at some point they will just stop and refuse to reverse any more. What’s going on?

The answer is that the cars have the memory of a goldfish. They simply don’t remember where they came from. Each car knows what “link” it is on, and about when it got onto that link and how fast it is going. (A link is a single straight piece of road.) So when we go into replay, we can easily move the cars along their links as time goes forward and backward.

But when we reach a time earlier than when the car entered the current link, the car has know idea how it got there, so it is forced to stop.

This is a simple case of not wanting to burn four tons of memory on a feature that is mainly visual. To replay the cars, we would have to accumulate a history of every link a car has been on as it drives. For 20,000 cars and a sim that’s been running a while, that’s a lot of memory to burn just in case you happen to hit the replay button.

In fact it gets worse. The cars are kept in a data structure that tells us who needs to make a driving decision and when.* This structure is optimized for the cars moving forward in time. We’d have to make and maintain an entire second copy of this structure to move the cars backward; again burning CPU and memory while you fly just in case you might hit a replay.

So instead we just provide replay on the current link.

* Programming nerds: the cars are in a priority queue by time to next navigation decision. I consider this to be very clever.

Posted in Development, Scenery by | 8 Comments

Games Vs. Platforms

Previously I blogged about the difference between integrated first person shooters (FPS) and flight simulators, and how these differences mean that FPS tend to adopt new graphics technology significantly ahead of flight simulators. One of the major differences is that a FPS often will have its content packaged with the rendering engine in a single, unified product, while a general purpose flight simulator is expected to cope with third party content.

The need to be a platform for external content doesn’t just impact our ability to optimize for “special cases” (e.g. we can’t assume anything about third party); it also puts more pressure on the rendering engine to be robust in the case of error.

X-Plane has low level and high level scenery abstractions.

  • Low level: an OBJ is low level. You give us a textured mesh, and we draw it. We don’t process the mesh, we don’t interpret it, we just draw what you made in Blender, AC3D, etc.
  • High level: a forest. You tell us the outline of the forest’s area and give us some trees and we fill in the forest, picking trees and placing them.

Now there is always the risk that third party content can look stupid. If you model an airplane and you use 4 quads for each engine, your airplane is going to look bad, and there’s nothing the rendering engine can do to fix that.

But with higher level abstractions, the problem is more subtle. If the input data to a high level abstraction has a problem, X-Plane’s rendering might look bad. But what constitutes a problem?

In the case of forests, if the polygonal area of a forest is too thin (along certain axes) we will fail to put any trees into the polygon. Exactly what represents too thin isn’t particularly well documented or even easy to measure. This is difficult for third parties, because they don’t have an explicit set of guidelines for “you will make the rendering engine grumpy if you do X.”

This is the kind of thing that, in an integrated FPS, is much easier to cope with. The art team tries a technique, and if it looks bad, they email the rendering engine coder. The coders then either fix the rendering engine or tell the artist “don’t do that”.

In our case, we need to be more robust in the case of input data problems because we can’t tell everyone who tries X-Plane “don’t do that”, particularly when the edge cases may change with rendering engine improvements. So whereas a rendering engine feature in an integrated FPS might be useful if it looks good when used in a few usage cases , a rendering engine feature in X-Plane is only useful when it looks good under most usage cases.

Posted in Development, Scenery by | 1 Comment

Plugin-Based Prop Discs

I was discussing plugin-controlled prop discs with a third party developer. The developer wanted to know if custom prop disc control would end up inside Plane-Maker. It may end up doing so, but I don’t think this would be nearly as useful as it would seem. What follows is my explanation to him of why this is.

Let me draw an analogy: when it comes to systems modeling, using a plugin is to Plane-Maker as using Blender is to using Plane-Maker.

Users who cannot use Blender are frustrated because they cannot make something as nice as those who are building planes out of OBJs. Sometimes they ask for more features in Plane-Maker, like: more stations! This new editing mode! Make the UI better!

But…you tell me: will Plane-Maker’s UI ever be as flexible and powerful as Blender? And if it ever did get to be that good, would that have turned out to be a good use of LR’s time, when Blender is already available?

The motivation for OBJ-based airplane geometry via third party tools is that what users want to do cannot be easily generalized into a few simple cases. Every plane is different, so a truly flexible platform is needed.

The prop disc (and other systems modeling problems) are the same way. In developing the prop disc graphics, I spoke with a number of third party developers who had already tried to push prop discs as far as they could go, were using plugins, were drawing themselves, as well as 25 other crazy hacks. I also spoke to our internal art team. And what I found was: no one had any consensus on how the prop disc system should work. Everyone wanted to tune a very specific set of behaviors to their peculiar art assets.

That’s what drove me to put it into a plugin. When we need an equation or a strategy we reach the point where we need more flexibility than Plane-Maker can exhibit. A plugin can encapsulate a strategy or technique in a way that Plane-Maker radio buttons cannot.

Consider what would happen if custom prop disc parameters were built into Plane-Maker. Everyone would have to wait until Austin implemented the prop disc algorithm they wanted. How would this be bad? Let me count the ways?

  1. How many algorithms do you think Austin has time to code? Not more than he has fingers on his right hand. Only the five lucky third party developers who get their algorithm coded will be happy with this.
  2. Austin code exactly what you want? Don’t get your hopes up.
  3. , what you asked for wasn’t what you wanted? We can’t change the behavior now, that would break compatibility!
  4. oh…your email got eaten by a spam filter? Too bad…no custom prop disc for you!
  5. Sorry, we don’t have a release vehicle lined up for the next 3 months. You’ll have to wait.

This problem is already happening across pretty much every aspect of systems modeling: airplane have unique, quirky systems which are usually useful for exactly one plane. It is not even remotely sustainable for X-Plane to code these things one at a time with a set of check-boxes. We might as well have a pop-up menu for every airplane ever invented, and simulate every single airplane inside the sim itself. Imagine the development costs…if a single high quality MSFS add-on sells for $30-$50…

Think of the prop disc via plugins situation (and the strobe lights are the same way) as an experiment in generic instruments for systems. By transitioning to a generic abstaction for instruments we’ve let a lot more users do exactly what they want with a small, high performance piece of code. The original instrument strategy (one of everything) reached a point where we simply couldn’t meet user needs in a cost-effective manner.

Posted in Aircraft, Aircraft & Modeling, Development, Modeling by | 7 Comments