Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

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

share|improve this question
    
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? –  Vipar Aug 15 '13 at 18:01
    
Related: gamedev.stackexchange.com/questions/35926/… –  Byte56 Aug 15 '13 at 23:24
1  
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". –  gman Aug 16 '13 at 1:00
add comment

3 Answers 3

up vote 17 down vote accepted

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).

share|improve this answer
    
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 –  Patrick Hughes Aug 15 '13 at 22:36
    
+1 Because you pointed the ortographic projection. Has something to do in all the general "perception" –  Agustin Meriles Aug 21 '13 at 11:25
add comment

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.

share|improve this answer
    
I would up-vote you, but I'm not able to. Thanks. –  Martin Aug 15 '13 at 18:25
1  
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) –  jhocking Aug 15 '13 at 19:23
1  
And the pre-rendering step is usually referred to as "baking", "baked textures" etc. –  Alistair Buxton Aug 16 '13 at 0:04
add comment

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.

share|improve this answer
1  
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. –  Ilmari Karonen Aug 15 '13 at 22:28
    
@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. –  Nathan Reed Aug 15 '13 at 22:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.