[WIP] Dynamic global illumination, or sort of :) "QIBL" system

Hi guys :slight_smile:

Just want to show off my current work for future Sci-Fi project.

So, the QIBL system.

What does it do:
Pretty roughly, not physically correct (but cheap and in many cases looks pretty realistic) immitation of 1st light bounce from spot lights based on dynamic localized ambient cubemaps.

For what it for:
First of all - cheap GI for indoor scenes, but it also can work as localized cubemaps for openworld games, where the problem with SkyLight starts when we have some outdoor and interior and need seamless transition of ambient lights from outdoor to indoor with complitely different lighting scenarios. Like when we walk to cave or house and we doesnt want SkyLight affect interiors, but still want to use some ambient lighting which SkyLight are provided.

How its work:
The key part is tricky way maded cubemaps which are used for IBL (Image Based Lighting).

Here’s some examples:…

Next things to do is implement a kind of importance sampling to add a bit of specular highlights for indirect bounced lights.
Theres no default ue4 light. Only QIBL and materials on objects from 1 to 0 roughness, basecolor are 50% gray.
Specular are not quite right, yeah. Also there still no reflection cubemaps (only SSR) which will be implementing later.

Hi guys :slight_smile:

A little updates:

  1. Adding QIBL influence volumes, so now transition between different lights are nice and smooth.
    Currently i didnt add additional actors for placing influence volumes in more easy way, but it wouldnt be hard at all.
    But the overall light system still need some blueprints support for making tasks of QIBL, importance volumes and lights placements easy and pleasure to work with. And that part would be more hard to figured out.
    Anyway, im mostly 100% sure what without a lot of C++ system wouldnt be really friendly. Say “friendly” i mean what you will not be able make something like placing light here, and here and get instant results.
    You will need manually place influence volumes, pick with eyedropper some lights and change shaders, but all that work will be not hard, just a bit boring. Well… still a thousand times faster and fun rather what making UV for lightmaps, baking, and all what stuff. And more importantly - lighting are dynamic :cool:
  2. I change basic shader a little, change some values. It was really easy and simple work, but results was surprisingly good in terms of performance, and i also find some of my stupid errors :confused:. Good news those errors was resolved by click the right check box and like so.
    Solution of “importance sampling” was stupid, so here i need more work to find a proper solution.
    Anyway, result of shader optimisation are really-really good than in the previous version.
    Previous version: approx. 7.3ms, 1 full dynamic QIBL (captured inside editor)
    Current version: approx. 6.3ms, 2 (yes, two of them) full dynamic QIBL (captured inside editor)
    Current version: approx. 4.4ms, 2 full dynamic QIBL (captured in packed project). Its means about ~237 FPS on my GTX1060 3Gb.

Next plans:
Found solution for importance sampling (kind of…).
Test some really bad lighting scenarious which are not easy to work with with a system like IBL because of possible light bleeding, and light which are should affect scene only with indirect, but not direct light (imagine some light travelling trougth corridor 90deg corner turn, or some obstacles and so on).
Make some stress test with a bunch of QIBLs in dynamic mode.

Interesting. Is it supports skylight and directional light?

Hi. It can support directional light, i.e. for large open enviroments, but it nearly useless for skylight, cause sky light are already gives us illusion of indirect lighting.

Awesome. Will be waiting for updates.