# Realtime Dynamic GI + Reflections + AO + Emissive - AHR

**URL:** <https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [September 24, 2014, 1:58am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923 "2014-09-24T01:58:17Z")\
**Posts on this page:** 20\
**Page:** 26

<div class="post-metadata">

**Author:** ![diegor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@diegor](https://forums.unrealengine.com/u/diegor)\
**Post date:** [May 16, 2015, 4:57pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/509 "2015-05-16T16:57:46Z")

</div>

A few weeks ago you mentioned that the scene independant part of the gi takes about 12 ms and voxelization takes a little more .

[QUOTEWell, after coding for 15 hours straight, i finally managed to fix a bug with the render targets that had been there since I started integration with UE. Also, I completed the Matinee part of the video, now I only need to change a few things so spot lights cast GI , gonna work on that today, and do a detail pass to finish the video.  
Basically, SetRenderTarget also sets the viewports, so call SetViewport AFTER SetRenderTarget.  
Pushed a commit with that code, and a depth aware blur. A bit slower now, but looks much better.

Quote Originally Posted by \_cDub View Post  
looks fantastic! What do you think the performance would be like compared to the upcoming DFGI. It looks like we will have multiple solutions to pick from. 🙂  
I’m not sure, I haven’t tried DFGI (it does runs faster than VXGI, at least on the things I tried) , but for comparison, my thing takes about 8 - 12 ms at 1080p on a GTX 750 Ti to trace, upsample and composite. That part is mostly scene independent. The other is the voxelization time, and that varies directly with the ammount of geometry. The scene I showed earlier runs at about 33 FPS inside the editor.  
I didn’t had the time yet, but I already know what changes I need to make to force all models to voxelize to the lowest quality LOD, that should aid with the performance and have no difference on quality.]

[/QUOTE]

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 16, 2015, 10:02pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/510 "2015-05-16T22:02:07Z")

</div>

> [@diegor;293190](#):
>
> A few weeks ago you mentioned that the scene independant part of the gi takes about 12 ms and voxelization takes a little more .

Yep, that’s about right, but like I said, the voxelization is really scene dependent. Getting about 5 ms for the scene of the video with a voxel size of 5. Not sure how many voxels is using though, as that depends on the bounds size.  
Anyway, there are still a lot of optimizations to do, can bring the whole time down considerably.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_30b5a1e7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_30b5a1e7](https://forums.unrealengine.com/u/anonymous_user_30b5a1e7)\
**Post date:** [May 17, 2015, 7:53pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/511 "2015-05-17T19:53:32Z")

</div>

5 ms is a very good result for voxelization!!

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 17, 2015, 8:17pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/512 "2015-05-17T20:17:03Z")

</div>

> [@pac85;293837](#):
>
> 5 ms is a very good result for voxelization!!

Like I said, take that with a grain of salt. Maxwell GPUs ( have a 750 Ti) seem to be really good on that aspect, and that result was on that specific scene.

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 18, 2015, 2:35am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/513 "2015-05-18T02:35:45Z")

</div>

Well, pushed a new commit with PBR. It’s mostly working right now. Metals are still a bit wrong, and reflections need a bit more work, but overall it looks way better than before.  
Will add some more options for the post pro volume on next commit, like control of the ambient term and things like that.  
Please test it and give me feedback on how it looks.

Also, multiple bounces are coming along good. Still early, but looks promising.

EDIT: I tried to stay as close to Epic’s lighting system as possible, but used some hacks here and there ( some of them I’m quite proud about 😉 ). For true physical accuracy I need to solve way more complex math. I mean, i have like 3 pages of integrals and still haven’t come at the correct solution. I know they can be solved, but not sure if all that work is going to make much difference. That’s mainly why I want you people to try it and tell me what you think.

---

<div class="post-metadata">

**Author:** ![Blue\_man](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue\_man](https://forums.unrealengine.com/u/Blue_man)\
**Post date:** [May 18, 2015, 6:26pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/514 "2015-05-18T18:26:53Z")

</div>

> [@;294009](#):
>
> Well, pushed a new commit with PBR. It’s mostly working right now. Metals are still a bit wrong, and reflections need a bit more work, but overall it looks way better than before.  
> Will add some more options for the post pro volume on next commit, like control of the ambient term and things like that.  
> Please test it and give me feedback on how it looks.
> 
> Also, multiple bounces are coming along good. Still early, but looks promising.
> 
> EDIT: I tried to stay as close to Epic’s lighting system as possible, but used some hacks here and there ( some of them I’m quite proud about 😉 ). For true physical accuracy I need to solve way more complex math. I mean, i have like 3 pages of integrals and still haven’t come at the correct solution. I know they can be solved, but not sure if all that work is going to make much difference. That’s mainly why I want you people to try it and tell me what you think.

I’m now compiling your latest build,and I will post some screenshots.Do I need every time to download 3,…gigabytes,is there any way around?

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 18, 2015, 7:01pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/515 "2015-05-18T19:01:58Z")

</div>

> [@Blue man;294529](#):
>
> I’m now compiling your latest build,and I will post some screenshots.Do I need every time to download 3,…gigabytes,is there any way around?

No, not at all. Dependencies are a mostly a one time thing. If you have git properly set up, it should be just going to Visual Studio \> Team Explorer \> Unsynced Commits \> Sync.  
If you don’t have that option, or it does nothing, you’ll have to download the zip from , copy and replace all files and recompile. The zip is under 200 mb

---

<div class="post-metadata">

**Author:** ![Blue\_man](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue\_man](https://forums.unrealengine.com/u/Blue_man)\
**Post date:** [May 18, 2015, 7:22pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/516 "2015-05-18T19:22:33Z")

</div>

> [@;294550](#):
>
> No, not at all. Dependencies are a mostly a one time thing. If you have git properly set up, it should be just going to Visual Studio \> Team Explorer \> Unsynced Commits \> Sync.  
> If you don’t have that option, or it does nothing, you’ll have to download the zip from , copy and replace all files and recompile. The zip is under 200 mb

Wow,thanks I didn’t know about that.

---

<div class="post-metadata">

**Author:** ![Blue\_man](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue\_man](https://forums.unrealengine.com/u/Blue_man)\
**Post date:** [May 18, 2015, 8:53pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/517 "2015-05-18T20:53:11Z")

</div>

If I download Zip file, do I only need to replace engine folder?

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 19, 2015, 4:31pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/518 "2015-05-19T16:31:41Z")

</div>

> [@Blue man;294625](#):
>
> If I download Zip file, do I only need to replace engine folder?

Yep, all source is inside that folder.

---

<div class="post-metadata">

**Author:** ![Blue\_man](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue\_man](https://forums.unrealengine.com/u/Blue_man)\
**Post date:** [May 19, 2015, 5:41pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/519 "2015-05-19T17:41:33Z")

</div>

> [@;295104](#):
>
> Yep, all source is inside that folder.

Ok,Thanks.

---

<div class="post-metadata">

**Author:** ![Blue\_man](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue\_man](https://forums.unrealengine.com/u/Blue_man)\
**Post date:** [May 19, 2015, 5:58pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/520 "2015-05-19T17:58:45Z")

</div>

I am testing AHR PBR and it looks good , metal surfaces also look good.I see some light flickering while moving.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_30b5a1e7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_30b5a1e7](https://forums.unrealengine.com/u/anonymous_user_30b5a1e7)\
**Post date:** [May 19, 2015, 7:40pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/521 "2015-05-19T19:40:46Z")

</div>

I use the client,there is the sync button and also you can see the repository?s commit.

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 19, 2015, 10:21pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/522 "2015-05-19T22:21:23Z")

</div>

> [@Blue man;295161](#):
>
> I am testing AHR PBR and it looks good , metal surfaces also look good.I see some light flickering while moving.

! Please post screens  
I’m aware of the flickering, my blur is \*\*\*\*, but have some things in the works to fix it. Also, think today I’ll push that commit I talked about, the one with more composite options.  
Stay tuned!

> [@pac85;295226](#):
>
> I use the client,there is the sync button and also you can see the repository?s commit.

Think that should work too, it’s probably what vs does anyway.

---

<div class="post-metadata">

**Author:** ![Blue\_man](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue\_man](https://forums.unrealengine.com/u/Blue_man)\
**Post date:** [May 19, 2015, 11:20pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/523 "2015-05-19T23:20:55Z")

</div>

> [@;295342](#):
>
> ! Please post screens  
> I’m aware of the flickering, my blur is \*\*\*\*, but have some things in the works to fix it. Also, think today I’ll push that commit I talked about, the one with more composite options.  
> Stay tuned!

I will make simple scene in a few days and then I will post some screenshots.  
🙂  
I have a question.When AHR is completely polished , will it look like VXGI?  
AHR already look much better than any gi we have in ue4(dfgi is in development).  
English is not my native language 😛

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 19, 2015, 11:36pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/524 "2015-05-19T23:36:34Z")

</div>

> [@Blue man;295376](#):
>
> I will make simple scene in a few days and then I will post some screenshots.  
> 🙂  
> I have a question.When AHR is completely polished , will it look like VXGI?  
> AHR already look much better than any gi we have in ue4(dfgi is in development).  
> English is not my native language 😛

Hope to make it as smooth as VXGI. On the other side, i see more shadow detail on AHR that VXGI, so guess it’s a give and take ;).  
They are similar techniques at the core, so yeah, might look similar.  
Thanks for all that! Will be waiting for that scene.

---

<div class="post-metadata">

**Author:** ![Trugb35](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trugb35](https://forums.unrealengine.com/u/Trugb35)\
**Post date:** [May 20, 2015, 12:39am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/525 "2015-05-20T00:39:46Z")

</div>

What lighting software is Unreal 4 using? unity 5 is using Enlightened.

---

<div class="post-metadata">

**Author:** ![Blakblt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blakblt](https://forums.unrealengine.com/u/Blakblt)\
**Post date:** [May 20, 2015, 2:39am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/526 "2015-05-20T02:39:15Z")

</div>

> [@Trugb31;295395](#):
>
> What lighting software is Unreal 4 using? unity 5 is using Enlightened.

Right now UE4 is using a cluster f\*\*\* of different techniques made by different arcane artists for different purposes.

Static lighting is handled by lightmass, Epic’s own solution  
Realtime lighting is simply direct lights and cascaded shadow maps  
Realtime distance shadowing and sometimes interior shadowing is handled by Distance Field Soft Shadows  
Realtime skylights are shadowed by distance fields as well  
Distance shadowing for landscapes uses something else entirely

Realtime GI is in a beta state, with 2 native techniques:

Light Propagation Volumes, a quick and dirty yet somewhat effective technique made by lionhead  
Distance Field GI and Height Field GI are available as a WIP in 4.8. DFGI is for static meshes, HFGI is for terrain

UE4 is simply the most well organized mess of pentagrams written in C++ you’ll ever see.

---

<div class="post-metadata">

**Author:** ![Xerithas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xerithas](https://forums.unrealengine.com/u/Xerithas)\
**Post date:** [May 20, 2015, 9:38am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/527 "2015-05-20T09:38:02Z")

</div>

> [@Blakblt;295440](#):
>
> Right now UE4 is using a cluster f\*\*\* of different techniques made by different arcane artists for different purposes.
> 
> UE4 is simply the most well organized mess of pentagrams written in C++ you’ll ever see.

Most hilarious post in recent memory XD

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [May 20, 2015, 9:58am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/528 "2015-05-20T09:58:22Z")

</div>

> [@Xerithas;295583](#):
>
> Most hilarious post in recent memory XD

Have to second that. Blakblt has earned a cookie.

[Previous page](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923.md?page=25)

[Next page](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923.md?page=27)
