What exactly is Precomputed GI? Can it replace lightmaps?

I’ve been thinking that maybe my project is moving towards eliminating lightmaps.

I’m not exactly sure what precomputed GI is but here’s what I am assuming.

If I have realtime shadows enabled for, say, 250 meters and i precompute Global Illumination, then every object and terrain that is nearby will look as good as if it were lightmapped because GI acts like a low resolution lightmap and bounces the light in realtime? It’s performance is good because it is a low resolution bitmap (where can i see the actual precomputed baked GI bitmap?)

So the only thing lightmaps is good for it far away objects.

So if i look off into the horizon the distant terrain wont have the realtime shadows, but will it have some kind og GI affecting it?

Im wondering if its simpler to just remove all lightmaps (tree shadows wont bake in terrain anyways so far off terrain under trees is overly lit i guess - im bad at spotting it) and just have realtime shadows and precomputed GI.

Or maybe only lightmap the terrain and have everything else be lit dynamically?

One thing though i noticed is large rocks in teh distance that are not lightmapped have this super shininess too them, like in mipmapping it these artifacts of light glistening start to appear. Large objects in teh distance that are lightmapped seem to blend in better when seen from afar. So maybe lightmap just the terrain and very large objects, leaving everything tree sized or smaller to be lit realtime.

One more benefit to lightmapping terrain is the vegetaion and trees seem to color themselves based on their position on the lightmap.

Am I understanding how this works correctly? any feedback is appreciated.

Up close things are lit realtime anyways so is it neccessary to have light maps? far off stuff is in fog and largescale shadow

BTW i’m watching the unreal kite demo how they made it and they seem to have some kind of far off ambient occlusion the mention, which i think is ao for midrange scenery, so kind of like a realtime lightmapping/shadowing for far off objects, i guess this replaces lightmaps since they arent using any in their demo they said

You can see the computed irradiance from the realtime GI in the Scene View mode called Irradiance.

Precomputed Realtime GI can replace baked GI this way (for outdoor scenes, assuming PC / PS4):

  • 1 directional light with shadows + realtime GI bounce light
  • skylight (with occlusion) extracted from skybox
  • a couple of reflection probes through out the level where most needed
  • SSAO post effect on top

Why you can do this in Unity 5?

  • massive improvements to shadows. Shadow distance can be much larger now due to better shadow render performance
  • even when using lower resolution shadow maps the new soft shadows PCF filtering looks good even at low resolutions
  • control of shadow cascades lets you tweak the shadow distances for the specific scene
  • realtime light maps with very low resolution light maps that still look good
    With enlighten It gives you the ability to do day night cycle too. But if you are not changing any of the lighting then enlighten will not draw any performance to update the realtime GI maps.
    The realtime light maps are super low res, so it scales well.

Thanks KEngelstoft - this is exactly the kind of information I was hoping to get:)

I’m going to try a lightmapless or almost lightmapless setup and see how it looks.

I might be able to mitigate the shiny far objects just by lowering the smoothness on them. I think they shouldnt be so shiny anyways since theyre regular rocks.

That Irrandiance view mode is very cool. It visualizes what I thought was happening. I noticed a lot of objects were not included in it, but i discovered they need to be marked as lightmap static to work with GI. I was worried this would mean baking lightmaps but i just disabled Baked Lightmaps in the lighting tab so it only does GI. Only one problem with this is im not sure how to bake just a few objects with static lightmaps under this circumstance (i assume Static lightmap will be baked for all lightmap static objects if you enable it. It might be cool if you could have objects work with GI, static lightmaps or both)

Trees dont seem to be included, like a forest wont darken the terrain below it. I think this is a bug or maybe it’s coming.

Also at first nothing showed up in the Irrandiance view -if this happens make sure that Precomupted GI is selected in the lighting tab,

The only real issue is figuring out how to shade far off objects and terrain, or increase the far off AO effect, but i will look through the settings. It would be cool if we could increase the contrast of the AO in teh GI.

Is there an actual bitmap irradiance map we can access? or is that hidden.

So many questions, anyways it’s all very cool - thanks again

You can see the irradiance map for a selected object in the Lighting window → Object tab → Preview → Realtime Intensity.

thankyou! its beginning to make sense how we can manipulate and paint with light in the scene. very cool:)

Lightmaps were for shadows and GI (bounced lighting). Now we can do the GI in real-time (from baked information).

You should test with a small cube rooms to see it better. The difference outdoors is very small compared to indoors, because the light has to bounce off of surfaces.


Personally, if building for PC, I would never lightmap large outdoor areas. The bake would take too long.

Thanks for the small space tip. I’m an Open World Wilderness Designer, so I basically never work with small enclosed areas. I need pipelines that support the outdoors. But even what you just said helps make it clearer how GI works - it is good to know that it works better in small spaces because it helps me understand how light is being treated in different sized spaces and understand the GI challenged particular to lighting outdoor scenes.

Beast baked beautiful outdoor shadows for my forests, something I can’t do in Enlighten (yet i guess it will come?). And yes, bake times for outdoors in Enlighten are often prohibitive. I guess its the trade off for GI which is more flexible ultimately, but still needs some work to replace what we could do in Beast.

I think for me the only thing missing really for a full transfer is some kind of mid-range ambient occlusion like what Unreal has in their new kite demo and making of (which i have to admit is incredible). That way far distant forests and terrain could have more of that ambient occlusion gradient/shadow look to it.

I bough SSAO Pro which does a really good job up close and crucially allows us to cut off the distance of the effect, so far objects don’t receive SSAO because it creates these stripe artifacts. But maybe someone will come up with SSAO only for far objects. Or a way to increase the contrast of the low res irradiance maps in the distance. When you look at the irradiance shading for the outdoor scenes it looks very cool the way its shaded. If we could increase this contrast and apply it to the far parts of the scenes (and include trees in the GI solution) it would go a long way to solving this issue.

Unity progresses so fast that i can totally see this happening. In the meantime there is a lot of GI to play with and learn how to best use it outdoors:)

Hey @protopop : Did you pursue this? We’ve been using a static setup (four times of day, each with skybox and lightmaps, with different types of mixed mode lighting for higher and lower-spec computers – it’s stuck on 4.7 currently because it needs that mixed mode lighting, but 5.6’s shadowmask should let us finally upgrade it).

But I’m also thinking of switching this static system to a continuous time of day. We think we can use Horizon(ON) for the distant landscape, replacing the skyboxes. But we’re stumped about the shadows. I have assumed that switching entirely to realtime lighting won’t work, due to the performance impact on older computers and mobile…but maybe there are techniques that will work? What have you figured out?

I havent heard of shadow masks. Thanks for the tip:)

You know, when i switched to realtime lighting i was so in the baked shadows mode that i didnt really consider it n option. But im never going back:)

It does come with a trade offs:
Baked shadows look better
Things far away will look blander unless your shadows reach that far at high quality
Well rendered skyboxes can have amazing clouds not really possible realtime
Baked lighting performs better

That said, i found what you gain is worth it.

Shadows will work at low and medium quality on mobile and perhaps more on newer devices. You can detect the device and load the highest level possible for that machine. Im moving towards a fully procedural sky once i figure out a pretty cloud solution. Its not as nice but the flexibility will make your landscape look so different under so many lighting conditions.

I fully suggest you copy your project and try it with realtime light and shadows on your target devices to see. I have to admit it was months of me playing around with realtime lights before i actually said to myself "hey, this can be the default in my game. Its like i was just so entrenched i habit.

Ill send you a code for a free copy of BrightRidge HD if you want to see realtime light and shadow at work. You can adjust the quality in the options.

Thanks! Yeah, I’ve got the same feelings about the tradeoffs. I guess there’s nothing to do but dig in and mess around. Your game looks gorgeous, but unfortunately I need long vistas in my game, so distant shadows are more critical…

1 Like

There’s HBOA assets you can try. You can even limit the distance after which it takes effect. Could be worth looking into. Im a big fan of long vistas too. I have to admit, the unreal demo where they had all those deer running in those photogrametric highlands had stunning distant views.