UE4 Dynamic global illumination, or sort of :) "QIBL" system

Hi guys :slight_smile:

Thats a main stuff which im working on. Im not a math guy (im, probaby more like a meth guy :grin: just joking), and unfortunately not a code guy, so the whole system are pretty rought approximation of 1st light bounce and, ofcourse, not physically correct, but im personally profess the point of view where “look nice or artistic > prysically correct”.
In some ideal cases the system gives really nice and pretty realistic results and illusion of light bounce.
Currently performance was measured in editor with a lot of stuff runned in the background like Photoshop and Google Chrome with a lot of bookmarks opened, and cost for 1 dynamic light are really not so big. But anyway, at the moment im not implement some features, so final performance cost will be different (and probably higher). But more or less, all implemented features will be have constant cost, cause whole system are scene complexity independent, which are good :slight_smile:

Dynamic lighting with GI and any kind of simulation of GI comes to my mind after Alien: Isolation. The most perfect light in the video games in my opinion.
Basically i was start to learn UE4 after deside to make my own game in similar 80s retro-futuristic sci-fi style highly inspired by Alien:Isolation.
By many reasons i quickly realize what Lighmass system are look nice, yeah, but really not pleasure to work with beacause of a lot of unwrapping work, bakes, errors and artifacts, rebakes and so on many-many iterations!. Also lightmass are static as we know, and im clearly remember how nice and funny was light in Dead Space, as example, where you can shoot on them and turn them off! Bloody nice!
So, after trying of LPV (which are currently dead in UE4) and VXGI (also dead), i realize what i need something different, and by many reason RTX are not the answer.
After many trials and errors i think im, at least found the right direction to work and evolve, the system which i call - QIBL.
But that this abbreviation means?! Well, lets leave this to another post and updates :slight_smile:

Uncompressed image: https://ibb.co/1sLTJzR

Sorry about the video quality. Looks like NVidia capture cant provide good results.

3 Likes

A little update. I just think what using some more well known assets and environments would be better to show off my work.

And guys, before you throw a rotten tomatoes at me!

I swear i will learn how to properly record video next time and doesnt take youtube a chance to compress in so badly! :grimacing:
But i hope after a hour or few compression quality will change and video will become more clear (i hear youtube did that, right?).

So, 1 spot light in the scene, marked with an arrow which used to generate bounce light. I think it look really nor bad. Lights are “playing”, bounce from the floor to underneath the coundertop in front of the window. And it looks nice :slight_smile:

1 Like

Cool! It’s hard to see the effect in the first video, but this one shows it off better. How does it work?

A little update:
Currently those indirect light have, lets say, a 100% “ambient light” characteristic. Which means where no specular component at all. Every objects with every materials from 0 to 1 roughness will be lighted as a fully rought material. It can looks normal, cause anyway those indirect light are important addendum to default or, lets say, “key” light, but its not a light itself.
But, metallic and any smooth surfaces should have some specular, even if they lighted with some highly diffused and soft light.
Cause overal system are relying on kind of trick rather than traditional IBLs, its impossible to implement classic stuff like linear interpolation trough multiple mip-map levels of cubemap and achieve changes in specular.
So, i add a stupid way to immitate mip-mapping sampling by scene roughness.
Well. It works. Not great, cause, well… its complitely not the way how it should be done ever! But its really-really cheap, no mip-maps, and add that missing “specularity” to every smooth surfaces like metals.
Bad part is what specular doesn’t mind view angle. But impleventing it more PBR way would needed more skills from me, and, im sure, will be more costly.

A little screenshot. 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 which will be implementing later. In those scpeenshots its more about dielectric materials. For metals, metallness scene texture will by taking in place and lerping basecolor with reflection cubemap.

Hey, thanks for comment :slight_smile: Its all are really-really stupid, non pbr corrected way of IBLs which mean - Image Based Lighting.
During to my low skill level and inability to modify UE4 sources, im kind of tricky/hacky impleven some IBL parts for ambient lighting.
I will probably explain how it works and why its call QIBL, not IBL, later, if people would be intherested on those things.
Currently i need to implement some other things and more important, make some performance test scene. If it will show some nice FPS i just build some demo and share.

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 :blush:

  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 :roll_eyes:. Good news those errors was resolved by click the right check box and like so.
    Solution of “importance sampling” was stupid, as i say earlier, 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.