With 11.10 there is a new way aircraft only shadows are done, as well as how aircraft icons are generated. The big change is how we calculate the volume of the aircraft which up until now was based on all OBJ files that the aircraft ships with, including things like ground- and fuel trucks, stairs etc. The reason this is undesirable is because the greater the volume of the aircraft, the worse its realtime shadow quality will be because we use the volume of the aircraft to calculate our shadow map area. The bigger that area, the worse the shadow quality and the more pixelated it will look like. In an ideal world, the aircraft volume tightly hugs around the actual aircraft and we get the best shadow quality possible. With 11.10, hopefully this ideal world is finally here!

Why and how we failed before

Before 11.10 the aircraft volume was based on the volume of, well, the aircraft. However, this includes things such as the aforementioned ground trucks, fuel trucks and what have you, that artificially blow up the volume calculation. The problem is, all these objects are technically part of the aircraft (eg. we move them around with the aircraft), but they are for the most part invisible and most people wouldn’t actually consider them to be part of the aircraft proper.

In 11.05 we added a change to also consider the physical volume which kind of has the right size for the plane but doesn’t include OBJs. It is based on the physical size of the plane only, which sounds like it’s the right thing. However, as it turns out, this volume breaks badly for things such as helicopters because the rotor of some third party helicopters are attached OBJs and won’t be considered part of the physical volume of the helicopter.

At this point I should probably also quickly note what happens if the shadow volume is too small: Everything that gets clipped by the shadow volume will cast a shadow into infinity and beyond due to the way the shadow mapping works. This is especially bad for the helicopters that now have very quickly rotating bits that are constantly clipped by the shadow volume resulting in shadows flickering all over the place.

In short: What we want is a shadow volume that is as tight as possible around the aircraft for shadow quality, but not too tight because that also leads to problems.

What’s new in 11.10

In 11.10 the algorithm to compute the shadow volume has been completely changed. Instead of trying to jiggle around with the physical volume and the volume of all OBJs together and then coming up with a sane value, X-Plane now looks at what is actually being rendered. We start out with the physical bounding volume as before, but then we look at what is actually rendered! For that, we go through every OBJ that is marked as casting shadows and run the OBJ engine as if we were to render the whole thing. So OBJ animations as well as kill datarefs etc are considered. This happens during the first frame, so everything is set up the way it would be during normal rendering. Everything that is visible will be marked as such and the shadow volume will be expanded to include this OBJ.

The result is a volume with a tight fit around what is actually visible and therefore considered “aircraft”. Everything else is not included in the shadow volume and therefore stops casting shadows altogether. Of course, this is only in aircraft only shadow mode and is not used when scenery shadows are on. In that case, everything is handled like it was before and everything that is supposed to cast shadows does cast shadows. So, if you see missing shadows in aircraft only shadow mode, this is probably due to this change.

To visualize the differences, here are 4 screenshots showing the quality difference as well as the new shadow volume:

 

One thing that should be noted though is that going forwards these kinds of extra OBJs should really be done via the new drawing API in the 3.0 SDK! This allows us to very accurately determine the size of the aircraft but it also means that culling will become more accurate. The old method will of course continue to work, but it’s not the best or most efficient way to approach ground vehicles and other ground clutter.

Aircraft icons

The calculated volume for the whole aircraft with attached OBJs was also used for the aircraft icon generation. This led to some weird cases where the camera was positioned in such way that the aircraft was incredibly tiny due to the fact that we tried to get “everything” in at once. So far the recommendation was for authors to create a version of their aircraft without all the extra OBJs attached, but now that we have an adequate measure of the aircraft volume this is fixed as well! Aircraft icons should be correctly generated now with the camera positioned to capture the plane at the right distance.

There is one more fix for aircraft icons: Some authors created aircraft that did some clever culling based on where the pilots head is and then using the kill dataref to prevent parts of the aircraft from being rendered. Reading the view dataref now correctly reports the camera as being an external camera so that those custom culling solutions work with the aircraft icon generator. If your aircraft still doesn’t generate proper icons after 11.10, please file a bug report and let us know!

About Sidney Just

Sidney is a software developer for X-Plane; As the Vulkanologist he specializes on pyroclastic flow and talking to bitcoin mining hardware.

26 comments on “Aircraft shadows and icons in 11.10

  1. Very nice and crisp shadows! 🙂

    Is there a difference in frame rate (or fips, as Ben likes to say) due to the new shadow rendering?
    One would think that with less volume to take into account the frame rate would stay at least the same, but 3D rendering is black magic as far as my knowledge is concerned.

    1. The framerate should be about the same really. There is less area, sure, but for the most part it is still the same amount that is getting rendered into the shadow map.

  2. Hi Sidney,

    when “scenery shadows” are on, the cockpit shadow quality becomes very poor. Although it can be apparently improved a lot by tweaking some datarefs related to cockpit shadows.

    So, are you going to improve cockpit shadows even when scenery shadows are on?

    1. This fix is for aircraft only shadows, the scenery shadow mode is unaffected by this. The problem with cockpit shadow sharpness is that we have to determine the volume of the cockpit in order to render the shadows with the highest quality possible. This calculation is failing right now some of the time depending on the aircraft and that problem will still persist in 11.10. It’s not impossible to fix, it’s just that we haven’t gotten around to it yet.

    2. There is light a the end of the tunnel – some of the new GL tech for VR makes multiple shadow maps cheaper – for scenery having one more shadow map (without a FPS hit) gives us a lot more ways to optimize quality. It looks like we could make this work at least for modern NV Windows cards (9xx and newer).

  3. So I tend to love shadows but scenery shadows I never ever enable, why? Well, it cost a huge amount of performance. Now X-Plane 11 would look amazing with it, but even with my i7 7700K and 1080GTX and I tend to favour 100 FPS than i.e. 60. I used to have the “3D on aircraft” as my go-to setting for shadows on the plane, but this is sadly gone in 11. Now I do believe it is replaced with “Draw shadows on scenery”. This (pardon my rant) crap setting is never ever enabled, why? Well, it draws performance like a son of a … Even though it is somewhat manageable with my setup and it looks better, I tend to love FPS more than quality. Also, I fear any “improvement” will affect performance further. I must be said, I do welcome any change you guys think of, but I did notice a drop in about 10 fps from 11.05 to 11.10 on your images… While shadows look amazingly better, those FPS losses are arguably only something that will escalate further down in any system it is implemented. 10 FPS drop means that someone would need to turn down other settings if the worst case.

    As with the “Draw shadows on scenery” it drops about 30FPS on my system when enabled.
    (this is on a fresh installed version of XP11)

    So my question is simply this Ben, how much leverage do you have when it comes to performance vs quality in 11.10?

    1. I know you asked this to Ben, but I feel qualified to answer: The four screenshots were taken in 11.10, the only difference is a dataref I manipulated to switch between the old and new shadow volume. The performance between the two modes is absolutely identical, there is not more work performed at runtime than before. The only change is the size of the shadow volume which directly affects the shadow quality. Shadow quality is proportional to how many pixels in the shadow map cover how much area of the sim. The more area covered by a single pixel, the worse the quality looks like. The only change in 11.10 to this is that the area is decreased, therefore a single pixel has to cover less of that are and the overall quality improves.

      If you look at the screenshots of the bounding volumes you’ll see a 2 FPS “improvement” over the 11.05 shadow volume. In truth, at those high FPS very small fluctuations in timing will have a huge impact on the FPS. If you take a look at the “10 FPS drop”, you’ll notice that the difference is that the frame took 1.3ms longer on the CPU to render. This could have been due to just about any random event on my computer and less CPU time given to X-Plane.

      The long story short, I understand your concern, but 11.10 does not cost more FPS for shadows. They are just better at no additional cost.

      1. Thank you for your comment.

        10 fps might not be a huge factor for high-end pc’s. But the matter of fact is that not all have such machine. In fact, most have mid-range computers and it varies.

        Also, I must correct my self a bit, as “Draw shadows on ground” option in settings does not have any effect on the aircraft shadows so it seems. The basic fact is that the only way for the user to have control over the “aircraft shadow” setting is to manipulate dataref’s using a script based approach is somewhat unsettling. While machines and hardware will always get better, I do believe 11.05 was a good approach to making FPS again account, so excuse my sceptic mind. But as long as aircraft shadows cannot be adjusted by the end user like it did in XP10, will always be affected by FPS. And while tomorrows computer may tackle it, I fare most of the today’s end users will not benefit from the slight variation.

        So I am very glad and for sure hopeful when you say that 11.10 will not impact or cost any fps, only graphics.

        At least we can agree that 11.10 is one anticipated update 🙂
        Good luck!

  4. So if I animate a damaged wing or some part of the structure that detaches and flutters away some distance before disappearing, the icon generating algorithm will not extend the virtual boundary of the aircraft and render too small an icon?

    Another way to avoid icon sizing issues due to ground-only objects could be to consider only Plane Maker objects, since it would be insane to do ground-only objects in PM.

    1. I don’t know what you mean by “plane-maker objects”, but if you mean the objects drawn by Plane-Maker’s physics meshes, that’s not great because the OBJs themselves cast shadows, and if they clip, it’s an artifact.

      We have wreckage attached-OBJs for flutter away — maybe better than a really crazy animation?

      1. Yes, using Plane Maker ‘physics meshes’ to determine the overall volume for capturing an icon render, instead of considering animated Misc Objects. I am assuming my fly-away objects are what causes the icon generation algorithm to assume the overall physical volume is larger than what it should be if the volume only considered fuselage, wings, and other Plane Maker meshes.

  5. Jeez folks. The frame rates in all of the images are 90+. There’s obviously something else happening to the code on the speed-up front….

    1. I wouldn’t consider the FPS in any screenshot to be useful or not. As devs we may either have:
      – Removed stuff from the sim to get it to load faster – high fps in a fake setting or
      – Turned on debugging – low fps!
      Plus, who is to say your hardware is comparable to Sidney’s?

      1. Hello Ben.
        Your answer now makes me super curious about Sidney’s hardware…
        Joke aside, version 11.10 will be a big relief since I do switch between helicopter and planes making key assignments a mess.
        Now to this topic, will this change on how shadows are calculated affects or improves existing models since you mention sdk3.0

        Thank you and sorry about my English

        1. I’m running the bottom right model of last gens hardware:

          i7-67000k
          32Gb RAM
          GTX 980Ti

          One of the things to keep in mind though is that I’m also running this at PMDY which has almost no scenery. In the default glider I routinely get 200 FPS there.

          1. Thank you Sidney!, I’m running a i7-4790K@ 4.6
            16GB RAM with a GTX1080ti… I’ll try that location you to test… (90fps… and 50 if I look the whole cockpit. 130 from outside)
            By the way, what can be done with TrackIR moving out and through things in the cockpit, I’ve noticed that when I disable TIR, and move around with cursor keys the view stops at where it should (limits, wall contacts and even with the seats on the default 737)

  6. Hi.

    Any chance you’ll be fixing the problem with the clouds casting shadows on the planes when we fly above those clouds, in 11.10? And the night lights visibility through the clouds?.
    Also, I think you guys will continue to improve the scenery. Is there anything planned for the generic textures? I think they are too repetitive. They should be more varied…

    Keep the excellent work on the best flight simulator out there

  7. Hi all.
    Thanks for your precious and constant updates
    I have just one request. Please. Do something to eliminate the shimmering… They are making me sick. It’s impossile to fly properly having everything around you shaking.
    I have an I7 6700 16gb ram and a Nvidia geforce 980ti 6gb and im still struggling with all settings but flickering and shimmering are always there.
    Thanks

      1. If he’s talking about ground shake then yes. If he’s talking about inadequate anti-aliasing, the anti-aliasing options (and their performance costs) are unchanged.

        1. It may also be that he’s speaking about the unusual cloud shadow effects that look just plain odd, dancing and rotating, if memory serves.

Comments are closed.