This rather odd 747 picture is from a quick test I did to make sure the shadow options in Plane-Maker were working right after beating the shadow code silly with a hammer.  The wing objects have been marked “interior only” for shadows, and since we are in an exterior view…the wings don’t cast shadows. 🙂

Now this is a totally silly way to use the feature, but there is a legitimate use: mark as many of your interior objects as “inside shadow only” as possible; for example, in the 747 the interior passenger cabin object can be marked as interior only – it doesn’t cast meaningful shadows on anything outside the airport.

By marking an object as no-shadow in Plane-Maker you save the sim the work of drawing the object, which is good for fps.  If your airplane is used for an AI plane, this makes AI plane drawing less expensive.

In fact, you save it the work of drawing it multiple times.  X-Plane using a shadowing technique called “cascading shadow maps”.  Basically X-Plane renders different parts of the world at different resolutions, so that the closer shadows (that can be seen in more detail on screen) have a higher resolution.  The user’s plane ends up being drawn in a lot of these rendering passes, and as a result the cost of high-geometry-count objects in an airplane can be amplified several times over by shadows.  So savings in object-shadow count matter!

(Given the choice of turning off shadows in Plane-Maker or via GLOBAL_no_shadow, use Plane-Maker; it stops drawing earlier and thus saves more CPU.)

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.

18 comments on “Cutting Back on Shadows

  1. Hi Ben,

    I hope I am not being rude or hijacking the thread but since I do not know here else I would ask, I dared to ask here.

    I am enjoying to watch with a great pleasure all tweaking all LR teams does but I am still waiting ( as I expect many others as well) for the big cities look closer to what they look like instead of like a park with one or two tall buildings.

    I perfectly understand that it was brought up quite a few times by now and I hope it has so high priority on LR to-do list, I just wanted to know if any progress or plans in this area are made.

    Thank you for a great job, Gentlemen.

    Cheers, AJ

    1. You are not alone, i am hoping for a OSM recut or at least a way to import the roads myself. I like to fly vfr but my town looked like a desert when they made the scenery cut.

  2. Can you give an update on becoming 64bit ready? Does this involve using new compilers that can produce both 32 and 64 bit applications? Does it require changing API calls? How do you currently manage code that compiles for linux, windows and mac? Is this inherently inefficient catering for different operating systems?

    1. I believe Austin stated that only around v10.20 will the 64bit see the light, so there is some time to enjoy the other tweaks and features.

  3. I couldn’t enjoy XP10 if it weren’t for this feature. By the way, you can’t put this in the Blooper Reel, it was deliberate!

    1. A little bit but it still needs more – there are some bugs with how airplane lights are calculated that actually affect 3-d on aircraft shaadows.

  4. Hi all, Since the questions are not really related to the topic I would like to have a question.

    Enabling HDR with the latest beta seems much worse than having off. ” this is look wise” A lot of flickering lines all over the place plus some flickering on a ground texture.
    I hope this issue will be fixed, never had any while running 1.05R.

    Evan.

      1. with beta 9, the flickering within 3d cockpit has mostly gone (GTX570) :-). fps hit is quite heavy…

  5. I to really like the shadows as the A.I. Aircraft leave or arrive the runways, It is the A.I.’s finding the runway in the first place that is the really fun part…

    … and many don’t use them at all!

  6. how come in the new beta 9 with all the postings for supersonic, I see no speed of sound cloud ring around an aircraft at high speed?

    1. Perhaps because you’re in your cockpit and watching where you’re going? 😉

      Accurate supersonic performance is one thing, visual effects are another. The original eye-candy intentions are still a work in progress.

      Also, the ring you speak of only occurs in certain conditions of temperature and humidity. It would vary in size according to the aircraft size. It could be added by plugin, using the appropriate datarefs to show or hide an object with an appropriate texture.

  7. Hi Ben,

    considering the later blog articles and the 10.10 beta history, I deduce HDR mode is receiving fairly high attention from a development point of view. Do you think HDR is going to become the standard rendering path in some future version of X_Plane, or the traditional renderer will continue to exist togther with HDR?

    1. Hi Filippo,

      You are right: HDR is a big emphasis here – in particular, one of the primary goals for 10.10 is to make the airplane authoring SDK work in HDR and non-HDR mode, so that authors can target 10.10 and not have to update their airplane later (and not have to worry about weird HDR artifacts, as happens when some v9 airplanes are opened).

      re: HDR taking over, I think in the long term that _is_ the future, but I think we’re going to have both modes for a while. The first-person-shooter world has followed a similar trajectory (with the first deferred rendering games providing two rendering modes, and newer titles that target only console+modern PCs going deferred-only). I think we’ll be dual mode for the entire v10 run; unknown at which future major version we’ll make deferred rendering mandatory.

  8. One word on shadows:
    I have much less flickering with beta9, first time I enjoy 3D shadows on aircrafts – just some minor issues. In general shadows look to crisp to me in brocken/overcast conditions. In XP I have a crisp shadow of a wing or even a propblade that are about 5-7 feet above ground.
    I observed RW shadows today (broken/overcast) and found that you hardly see any shadows at all. Only langer objekts very close to the ground (<=1 feet) cast shadows and even they are washed out.
    Of course it's impossible to simulate all aspects of shadows but to soften the shadows for overcast conditions would be a good improvement IMHO.

    Cheers
    Flo

Comments are closed.