In Praxis… Impostors

It’s been a while since our last blog post, but it’s only because we’ve been hard at work, we swear! We haven’t even thought about rushing off to the Bahamas with your hard-earned money!

This time I’m going to shed a little light on a little something that makes it possible to render massive and densely populated worlds in real time: impostors.

To put it simply, an impostor is a flat polygon that looks like a more complex piece of geometry. They are often used as the last step in a set of levels of detail for an object. To make them look as convincing as possible, the textures applied to impostor polygons are usually rendered by the 3D engine rather than being created by artists. Reset has a deferred renderer so this is particularly simple: we just render a mesh into a tiny G-buffer and then use a special shader to splat copies of it onto the main G-buffer.

Sometimes impostor textures are updated dynamically based on the exact point of view. This is a fairly complicated system for a small team to develop, so we just render a fixed number of viewing angles for each mesh as a preprocessing step. At runtime all the data is available statically which makes rendering the impostors into the scene extremely simple and efficient. Transitions between meshes and impostors (as well as between meshes of different levels of detail) are handled with dithered cross-fading so there is no popping.

The island has about 100000 trees in total. In this particular view you can see a bunch of high detail tree meshes in the foreground as well as about 38000 tree impostors in the distance.

As development progresses the island will get populated by an increasing number of other objects and we will be able to use this system for them as well.

  • Trackback are closed
  • Comments (17)
    • Jochem
    • March 7th, 2014 5:02pm

    > Transitions between meshes and impostors (as well as between meshes of different levels of detail) are handled with dithered cross-fading so there is no popping.

    This was my biggest fear! (yeah, spiders come second..)

    Since you are ‘only’ two people I wondered what things you had to leave out of the engine and such.. but luckily you DO care about little details like that 😀

    Great to hear from you guys again ^^. Good luck with the development!

    • Kein
    • March 7th, 2014 5:07pm

    Any word on Anti-Aliasing support? Seems like it became an old, outdated feature nowadays, in current “next gen”.

      • Swatinem
      • March 8th, 2014 11:12pm

      Yes please. I just can’t understand how studios release screenshots without AA enabled. It just makes the games look a hundred times worse.

      • No problem guys, AA is coming. 🙂

        • Jacob
        • March 20th, 2014 12:44pm

        if you upsample your resolution it will have roughly the same effect that MSAA will, so just do that.

          • Invertex
          • March 25th, 2014 3:46am

          It may be the same effect, but the hit on performance is much bigger.

    • Heke0
    • March 8th, 2014 2:26am

    It’s always nice to see how the engine has come together, and I really like the fact that you take the time to explain these technical things that are happening behind the scenes.

    Keep up the good work, I’m eagerly awaiting for the final result!

    • JeffNo
    • March 10th, 2014 11:07pm

    Nice one.

    Would it be feasible to keep an impostor for each tree from the sun’s P.o.v. and splat ’em into the shadow buffer also? I get that you’d pay a multiple of the fill cost unless you can cull well for each shadow LOD. But it would have helped the visual quality quite a bit, assuming it wouldn’t just reveal the shadow buffer(s)’s resolution(s).

    Do you guys copy to shader-resource-only texture2D’s for the impostors, or do you keep them in the rendered SRV+RT versions? I am curious which way helps with texture cache coherency the most. The access pattern when you copy them out to the real RT is very top-down, so maybe SRV+RT is more favorable.

    Are the artifacts in the clouds due more to the higher-res for a screenshot or to the elevated camera position? I really admire that you have tuned the cloud algorithm so closely to the target application (in terms of your game’s limits on resolution and camera position). That takes real dedication and skill! Reminds me of Doom when it was ported to Windows and had to run at 640×480: When the p.o.v. dropped down to the floor (i.e., when you die, which I did a lot), you’d get these wobbly pixel artifacts. Made me realize how tightly all of Doom’s pipeline was tuned for 320×240.

    Can’t wait for the release of this, guys. I’m a huge fan.

      • JeffNo
      • March 28th, 2014 7:44pm

      I answered my own question and didn’t realize it: The impostors already cast shadows: the buildings are clearly impostors due to their lower resolution, and they cast obvious shadows. The only reason the distant trees don’t cast crisp shadows from their trunks is that the shadow buffer resolution is too low. So this shot shows three examples of you guys expertly tuning the algorithm very tightly to the target resolution. In the real game, at the actual target resolution, neither the impostor resolution nor the shadow buffer resolution, nor the cloud artifacts will be noticeable. Well played! 🙂

        • Mikko Kallinen
        • April 4th, 2014 10:43am

        We copy the impostor texture data to SRV only textures. Since all the data is static, we’ll probably ship with those textures as data files instead of generating them at load time or something.

        And yes, we do apply The Ancient Chinese Art of Chi-Ting all the time. 😉

    • Dejay Clayton
    • March 22nd, 2014 5:04am

    “Impostors” are more typically known as “billboards” in English graphics nomenclature.

      • JeffNo
      • March 28th, 2014 7:48pm

      Actually, “billboard” merely means a view-aligned quad (for some choice of “view-aligned”). “Impostor” implies a lot more: a cached rendering of the object with periodic re-renderings as some metric of visual quality is exceeded. The impostor objects don’t even have to be quads. Tom Forsyth, who coined the term “impostor”, used cubes as his impostor objects in Startopia. And in his original paper on the subject he clearly calls out “billboard” as a mere implementation choice for an impostor.

    • ZeitgeistDevelopmentTeam
    • March 22nd, 2014 7:39pm

    You can apply an MSAA Effect

    • Domovik
    • March 23rd, 2014 9:41pm

    I wish I knew to do that. What have you studied?

  1. Your article is detailed, thanks to it I solved the problem I am entangled. I will regularly follow your writers and visit this site daily.

  2. I like your article very much, thanks for sharing the good information we have read.