13
\$\begingroup\$

I'll keep it short. How does one achieve the effect depicted in the image below? Is it feasible to do in realtime? It looks deceptively simple, but it probably isn't. Are there any keywords I can search for to get more information about programming the shaders to achieve this look? Thanks.

https://i.stack.imgur.com/KuTGt.jpg

\$\endgroup\$
3
  • \$\begingroup\$ What's special about it? It looks like an artstyle and shadows from a directional light and that's it. Am I missing something here? \$\endgroup\$
    – OmniOwl
    Aug 15, 2013 at 18:01
  • \$\begingroup\$ Related: gamedev.stackexchange.com/questions/35926/… \$\endgroup\$
    – House
    Aug 15, 2013 at 23:24
  • 1
    \$\begingroup\$ It's using lightmaps, ambient occlusion or some other form of radiosity rendering. It is NOT as simple as "a directional light and that's it". \$\endgroup\$
    – gman
    Aug 16, 2013 at 1:00

3 Answers 3

18
\$\begingroup\$

That does not appear to be using any kind of specific flat-shading approach, at all. The shading is smooth, though the projected shadows are hard-edged, and the objects are not rounded.

The specific lighting effect appears to be a combination of ambient occlusion (probably SSAO, "screen space ambient occlusion") which is what gives it that soft shadowing in crevices and regular ol' hard-edged shadow mapping and a plain lighting model (probably just Phong lighting).

An orthographic projection is being used. The only light appears to be a directional light which combined with all the objects being squared and flat is why each face has a mostly uniform shade (not any kind of special flat-shading technique).

\$\endgroup\$
2
  • \$\begingroup\$ Exactly. Not flat shaded, much as you described I see that it's probably a mix of a bright ambient term + lambert + shadows thrown from a single source + SSAO \$\endgroup\$ Aug 15, 2013 at 22:36
  • \$\begingroup\$ +1 Because you pointed the ortographic projection. Has something to do in all the general "perception" \$\endgroup\$ Aug 21, 2013 at 11:25
7
\$\begingroup\$

That looks like occlusion map (corresponds to physically correct diffuse material under uniform white light) combined with directional light (going from top, creates sharp shadows).

Occlusion maps are usually made using ray-tracing techniques. They can not be generated in realtime with sufficient quality on current home computers.

Those maps are usually pre-rendered into texture. That texture can be later rendered using classic GPU rasterization techniques.

\$\endgroup\$
3
  • \$\begingroup\$ I would up-vote you, but I'm not able to. Thanks. \$\endgroup\$
    – Martin
    Aug 15, 2013 at 18:25
  • 1
    \$\begingroup\$ Just to add on to what he's saying, those pre-rendered textures are usually referred to as "light maps" (especially in the context of level editing) \$\endgroup\$
    – jhocking
    Aug 15, 2013 at 19:23
  • 1
    \$\begingroup\$ And the pre-rendering step is usually referred to as "baking", "baked textures" etc. \$\endgroup\$ Aug 16, 2013 at 0:04
4
\$\begingroup\$

This looks like:

  • All white, diffuse materials
  • A strong white directional light from the upper left, with high-quality shadow filtering (the shadows are not overly soft, but they are free of aliasing)
  • A blue sky (hemispherical) light, with high-quality occlusion - even in the shadows, areas more open to the sky are brighter
  • There may also be global illumination (bounce lighting). It is difficult to diagnose whether there is actual GI or "simply" high-quality AO as, absent obvious color bleeding, the effects are quite subtle. But if GI is present it may still contribute subconciously to the overall impression of the image's realism, the brightness of the sunlight, etc.
  • It's also worth noting that this image is perfectly antialiased, which implies lots of samples and a high quality (e.g. Gaussian) resolve filter.

In short, one could probably come close to this level of image quality in real time, using for instance high-quality PCF shadow filtering, a high-end AO technique such as HBAO or Scalable AO, and a custom MSAA resolve. It would be a lot of work and you'd need a fairly powerful GPU.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I don't think there's any actual global illumination going on. If there were, there ought to be some "anti-shadows" visible in places where an otherwise shadowed surface is adjacent to a directly illuminated one. There are a few places in the image where that should be visible, but I don't see any. \$\endgroup\$ Aug 15, 2013 at 22:28
  • \$\begingroup\$ @IlmariKaronen Yeah, on looking at it further I think you're right. Particularly the way the edges where building walls meet the ground are all darkened - that looks like AO with a generous falloff function; I don't think full GI would produce that effect. \$\endgroup\$ Aug 15, 2013 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .