Category: Development

X-Plane 11.30 Beta 6 and 7, and Winding Down the Beta

X-Plane 11.30 beta 7 is out – full notes here. Hopefully the next beta will be a release candidate; we’re down to a small number of bugs, almost all of which are in the particle system, or are regressions (meaning the behavior was fine in 11.26 and is borked in 11.30).

If you have a bug that dates back to 11.26 or earlier and it hasn’t been fixed yet, it probably is not getting fixed in 11.30 – we’re out of time with this release.

Here are a few details on bugs we’re still working on and bugs we recently fixed.

Drawing Callbacks and Plugins

Beta 6 fixed a bug where plugins would receive extra window-phase drawing callbacks if a modern plugin had a new-style XPLMDisplay window on screen. This should fix a wide variety of plugins-interfering-with-each-others-drawing bugs, particularly where the “culprit” was a new plugin and the victim was SASL-based.

As a general guideline, please use XPLMDisplay windows with the modern SDK and new APIs whenever you can – it will give you the most compatible results going forward. The only drawing phase we recommend at this point is the panel/gauge drawing phases for custom panels.

N1/N2 for Turboprops

X-Plane’s free turboprop model uses the “N1” engine dataref to represent the gas turbine speed, and ties “N2” to the compressor tied to the prop.  When you turn on the starter but don’t bring in fuel, N1 will rise up to 16%, but N2 will stay much lower.

11.30 introduces the “new” free turboprop model – a second engine model that’s designed to more closely emulate the PT-6. For most of the beta, Austin was using an opposite convention: N2 represented the compressor turbine and N1 represented the prop turbine. Austin’s logic was that this was analogous to a high-bypass jet engine: N2 makes the high pressure and N1 spins the big fan-like thing.

In beta 7, Austin changed this; the new free turboprop model now follows the same convention as the old free turboprop model. This should make it a lot easier in the long term for authors whose aircraft have real PT-6’s to use the new model and take advantage of the improved accuracy.

Particles In the Cockpit

In beta 6, we fixed the bug where the new partilcle effects could not be seen from within the cockpit. This had the unfortunate effect of making them visible when the particles were inside the aircraft. This problem can be hard to avoid – depending on the wind and location of the exhaust on your aircraft, it’s possible the smoke just blows through the cockpit, making an artifact.

This is my plan for how we will ship particles in 11.30:

  • Particle emitters attached to objects with “outside” lighting objects will create particles that appear outside the aircraft; they will be masked out so that they don’t appear in the cabin.
  • Particle emitters attached to objects with “inside” lighting will be ignored and produce a log warning.  We are reserving this capability for a future update when we can have interior-pass particles; for now, don’t use this capability, as you can’t know how it will look in future versions of X-Plane.

This is one of the scariest “not done yet” parts of 11.30, because the logic to control interior vs exterior drawing is very complicated – it has to take into account different hardware capabilities, different rendering settings, etc.

Particle Light Levels

I am still working with Alex on particle light levels.  A recent beta included logic in the particle lighting code to match the clouds (e.g. direct sun makes them brighter) – without this, contrails don’t match the clouds.

But with this logic, particles look too dark on the ground. So we are tweaking things. The take-away here is: don’t ship your add-on with particles until we go final, as these things are subject to change during beta.

Automatic Toe Brakes and the C172

Automatic Toe Brakes is a feature where X-Plane automatically applies toe brakes when a user who does not have toe-brake hardware deflects the rudder pedals to near their maximum position. The idea is that on some aircraft, you can’t steer tightly or hold a heading in a cross-wind without the toe brakes. (This feature does not run if a plugin is controlling toe brakes or hardware is available.)

Early X-Plane 11.30 betas caused us to apply automatic toe brakes to aircraft where it was not appropriate, e.g. airliners. X-Plane 11.30 beta 6 removed this behavior from the airliners but also removed it from some third party GA aircraft where it was accidentally (but usefully) being applied.

We’re looking at this now, but at a minimum, I expect we’ll restore legacy aircraft to acting as they did before, and probably widen the steering range of our 172 a bit. I’ll write more in a separate post once we make a decision.

 

Posted in Development, News by | 68 Comments

Beta 5, Default and Custom Particle Effects

First, X-Plane 11.30 Beta 5 is live. If we find it’s not a screamapiller we’ll get the Steam version going tomorrow.

Update: it is a screamapiller.  The lighting is missing for chunks of the runway, city, etc. When b6 fixes this, we’ll cut a Steam build.

There were some questions in the comments section about whether aircraft would lose the built-in default effects as part of the particle system upgrade in 11.03. The short answer is “no” and the slightly less short answer is “no, unless you do some stuff in Plane-Maker.” Here’s the details:

  • In X-Plane 11.25 an earlier, you got default effects, and there was nothing you could do about it. Every aircraft gets every effect.
  • In X-Plane 11.30, default effects are enabled by check-boxes in Plane-Maker’s “Invisible Parts” screen. Just like you can hide rendering of the aircraft’s physics model and replace it with OBJ models, you can replace the default physics-based effects and replace them with your own OBJ-based emitters.
  • In X-Plane 11.30, most of the built-in effects are built by the new particle system, but a small number (e.g. rotor down-wash) still use the old one, to take advantage of some hard-coded effects code that the new system can’t (yet) simulate.

Note that the question of how we did the default effect (new or old code) is totally unrelated to whether you (the author) want to replace it; if you turn off our effects, that check box will turn off our effects both now and when we re-implement that category of effects with new emitters (e.g. for rotor down-wash).

I still have a pile of effects bugs open, so please don’t ship aircraft based on the beta using the new particle system. (You shouldn’t ship an aircraft based on a beta anyway, but in the particle system, as of beta 5, I definitely have bugs that, when fixed, will require re-tuning of art files, e.g. lighting levels aren’t final).

Here’s a few particle bloopers.

Posted in Development by | 77 Comments

The Mystery of the Collapsing Landing Gear

We’re pushing to get a stable X-Plane 11.30 beta 3 right now, and I think we’re making progress: Chris has fixed the crash when using the radio stack audio (this Windows-only crash was very frequent) and I have found at least one case of collapsing landing gear.

The bug report was the landing gear collapsing when taxiing on orthophoto-based scenery. It turns out that the custom DSF meshes have triangles that are duplicated and then flipped. In other words, a few of the triangles have twins that are upside down.

Here’s a pair of pictures to illustrate.

The image on the left is the “tops” of the orthophoto mesh triangles – this is what you expect to see.  The image on the right is the bottoms!

Now normally the “bottom” view should show nothing – we should see only the light blue background, because the camera is above the mesh, so all of the triangle backs are facing away from us. Those extra triangles you see are copies of parts of the orthophoto mesh that have been duplicated and flipped over, so that their fronts face down and their backs face up.

This DSF violates the DSF specification, which requires all triangles to be wound counter-clockwise when viewed from above. But as of X-Plane 11.26, this wasn’t a huge problem; X-Plane blissfully ignored the flipped triangles. X-Plane 11.30 is intermittently detecting the upside-down triangles and the resulting upside-down normal vectors are making the collision physics go crazy. We should have a fix for this in X-Plane 11.30 where we filter out these flipped triangles.

One last bit of the mystery: the creation agent on both bad DSFs I have looked at is “X-Plane Scenery Creator 0.9a”. Does anyone have a link to this tool or know who the author might be?

Post script: there is a separate bug where the new physics code is reacting to DSF boundary cracks more severely than X-Plane 11.26. I had hoped this would all be one big bug but it’s not, so mesh cracks will be next on my todo list.

Posted in Development by | 41 Comments

Art Controls, Stutters, and Progress

Art controls are internal tuning constants in X-Plane that we put in so that our art team can modify the behavior of X-Plane while they work without having to recompile the sim from source code. We leave them in the final product because they are sometimes useful to third parties, useful for in-field debugging, and because we are generally okay with people hacking the sim if they understand the limitations. X-Plane has always been a relatively open sim to play with and lots of X-Plane authors got their start just poking around. Our first instinct isn’t to encrypt everything.

We don’t go out of our way to break art controls. We don’t go in and change their names in every beta just to mess with third parties. But we also spend absolutely zero time trying to maintain art control compatibility with previous versions of the sim. Backward compatibility takes a lot of planning and effort and there’s just no way we can keep a bunch of internal tweaks the same while modifying the sim.

In X-Plane 11.30, a number of art controls have stopped behaving the way they used to. They aren’t going to go back to the way they were, because we don’t spend time trying to support hacks based on art controls. Here’s what happened and why:

As part of our work to port X-Plane to Vulkan, I rewrote the code that renders a frame in two ways:

  1. All off-screen rendering needed to draw the frame is now done before the frame is rendered; up to X-Plane 11.25 some of this work was done as a diversion, mid-frame.
  2. The graphic resources (mostly off-screen rendering buffers in VRAM) are allocated once when the configuration of the sim changes, rather than being allocated “just in time” when we get into a frame and realize something has changed.

Change 1 was needed to match how Vulkan and Metal handle off-screen rendering*; change 2 helps avoid stutters by allocating expensive resources early when we are not flying.

The side effect of this is that art control edits take effect only when the sim is reconsidering its graphic setup anyway (e.g. due to a window size change or rendering setting change); if the art controls change mid-frame, any code that does resource allocation ignores them because it is no longer “sniffing” for configuration changes per-frame. Other code that uses the art controls notices the change, and the result is often haywire drawing due to a half-used art control.

 

* This was an example of the OpenGL driver doing a lot of work for us, and hurting performance, to support an abstraction that doesn’t make sense. The real graphics card has to do real work when a rendering pass begins and ends; the OpenGL driver automatically synthesizes these rendering passes on the fly for the GPU as the app runs. Because Vulkan/Metal requires that we spell out the passes explicitly, we (the app) know exactly when we are doing something expensive (starting a new rendering pass) and we can minimize the cost.

Posted in Development by | 17 Comments

X-Plane 11.30 Public Beta: Are We There Yet?

Almost! we’ve been running a small scale private beta for the last few weeks while we finish new features and fix major bugs. I don’t want to curse the beta, but it looks like we may be able to get the public beta posted this weekend.

In the last two days we’ve had two major show-stopping bugs, but both are fixed, so we’re going to keep trying to nail this thing down and get it posted.

The public beta features not only the new particle system, available to third parties, but it is now in use for most (but not all) of the built-in effects in the sim. New Plane-Maker options let authors specify which effect categories (e.g. engine effects, wheel effects, etc.) they want to replace.

At this point it looks like we won’t have anything public for Vulkan this year, although I do think we will hit some internal milestones.

Posted in Development, News by | 158 Comments

4K Panels and Cockpit Objects in 11.30

A quick note on 11.30: we have an internal build of 11.30 that seems to be working and we’ll be rolling out private betas next week, as soon as we get menu items for the particle system editor. Once we get some feedback on the private beta we’ll know if we’re close to public beta or not.

Two new feature for aircraft authors coming in 11.30:

4K Panels. I do not promise that this is going to have good performance, so try it and go back to 2K if things get slow, but in X-Plane 11.30 you can use a 4K texture for your panel. This is mostly useful for aircraft that are generating a lot of plugin-based dynamic texture effects.

Cockpit Objects. Before X-Plane 11.30 the cockpit object is a magical object found by file name (aircraft name_cockpit.obj). In X-Plane 11.30 the cockpit object is just one among many “misc” objects in Plane-Maker, with the “cockpit object” check-box set.

X-Plane and Plane-Maker will automatically upgrade/interpret old planes, so there’s no “todo” here or compatibility loss.

This feature means that, starting with 11.30, you can now share a single cockpit object amongst multiple .acf files in the same folder. This means you can create multiple editions of your aircraft (e.g. for engine types) and not have to duplicate your cockpit .obj files.

Update: just to clarify something that a number of authors asked about, you cannot have multiple cockpit objects under the new system. You are still required to put all of your manipulators and camera-stopping surfaces in a single cockpit object. Now you have complete control over which object that is. (Panel texture may be used in any aircraft-attached object; this is true for all of X-Plane 11 and some X-Plane 10 versions.)

Posted in Aircraft & Modeling, Development by | 38 Comments

Austin and Ben, to Scale

Those who know Austin know that he is really tall. It’s a running joke that at company events, he ends up half a mile ahead of the group because each of his steps is quite a bit longer than the rest of ours. If he and I want to see eye-to-eye on something, I literally need a step stool.

But for those who haven’t run into him at a convention or event, this picture should put things into perspective.

Posted in Development by | 32 Comments

Nvidia RTX ends with an X, X-Plane starts with one. Perfect match?

Nvidia announced their latest bitcoin graphics cards on August 20th at Gamescom this year. Among the usual increase in transistors, they also disappointed all crypto miners by adding a feature that cannot (yet) be used to calculate cryptographic hashes: Ray Tracing! Ray tracing has long been seen as somewhat of a holy grail of graphics rendering, because it’s much closer to replicating the real world than traditional rasterization and shading. However, doing ray tracing in real time has been close to impossible so far. But hey, Nvidia just announced their new RTX GPUs that can do it, so when is X-Plane going to get a fancy ray traced renderer? This and various other questions that have been asked by X-Plane users, as well as some myths, shall be answered! If you have a question that isn’t answered here, feel free to ask it in the comments.

What Nvidia has shown is absolutely impressive. Unfortunately, the fine print of all the marketing hype is that sadly it can’t just be thrown in without engineering effort. The first thing needed is actual RTX hardware, which no one at LR currently has. The second thing needed is a Vulkan-based app; we are getting there, but not in any way that would support RTX. (the whole goal of the Vulkan renderer is to not change the way the world looks, so we’ll first need a shipping production Vulkan renderer.) But then… well, it’s not entirely clear what it takes to actually write a ray traced renderer in all of its details. Nvidia has not yet published the specification for the Vulkan extension (VK_NV_raytracing), but they have published slides from presentations. One thing is very clear: you can’t just copy and paste five lines of Nvidia sample code and suddenly wake up in a ray traced world.

What Nvidia provides is the scaffolding necessary to describe a scene, as well as to provide new types of shaders that allow casting rays from point A to point B and then report back what they hit along the way. This is a huge amount of work that the hardware is providing here, but it’s not the promised “5 lines and you’ll have ray tracing in your application” that’s being promised. To adopt ray tracing you will have to write the whole ray tracer yourself, from scratch; the hardware just enables you to do so now. This is akin to implementing HDR or PBR: Shaders are the base requirement to implement both of these, but once you have shaders you still need to actually implement HDR or PBR on top of them. Another example is building a house and being provided a plot of land that can support it. Sure, it’s great, now you have a place to build your house, but you still have to come up with a blueprint, pick materials to use and then actually build the thing. Implementing ray tracing will take a great amount of engineering effort, nobody is throwing in awesome reflections with every purchase of one RTX2080Ti for free!

The other thing that’s not entirely clear is how well ray tracing will even perform in an environment like X-Plane! Worlds in X-Plane are huge and open, not small scenes from a shooter with tight spacing. Lot’s of rays are needed, and they have to travel quite far, potentially intersecting with large amounts of geometry. How good does the hardware and API scale up to these sizes? Only time will tell. That’s of course not to diminish Nvidias achievement here, it’s an incredible feat of technology in its own right and this is just the first generation!

The other thing worth mentioning is that ray tracing is not just something that Nvidia secretly cooked up in their basement for a decade. This is going to be an industry wide thing, with APIs that will work across vendors! Historically one vendor has come out with a fancy new way to do things which then became the standard adopted by other vendors. Nvidia has come forward and offered their extension as base for a core Khronos extension for Vulkan. They have a vested interested in making a cross vendor, cross platform API available.

In the foreseeable future, rasterizing renderers are unlikely to go anywhere. Rather, ray tracing for the time being can be used for additional effects that are otherwise hard to achieve. Clearly Nvidia is acknowledging this as well by providing a traditional rasterization engine that by itself is more powerful than previous generation ones. This also means that if X-Plane were to adopt ray tracing tomorrow, you could still run it on your old hardware, you’d just get extra shiny on top if you have ray tracing capable hardware.

Last but not least, this is another reason why you should stay away from the shaders! One day we’ll wake up in the glorious Vulkan future which will open the door to the glorious ray tracing future. All of this means that we’ll have to keep changing our shaders.

Posted in Development, Hardware by | 43 Comments

Art Controls Are For Hacking

Sidney posted a detailed write-up a few days ago as to why developing an add-on by modifying our shaders is not a good idea. The short version is that, like art controls, the shaders are an internal part of X-Plane that we don’t lock up so you can see them and muck around with them. But there is no stability, documentation, or any attempt to make them useful the way the plugin system is.

This confused a number of commenters. Do we want you to use them or not?

To resolve the mixed messages, Sidney created this fantastic flow-chart.

Hopefully that clarifies where the line in the sand is between “I was poking around” and “I made a serious add-on”. Pretty much everything here goes for the shaders as well as the art controls, only more so.

Posted in Development by | 24 Comments