# 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:** 59

<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:** [January 14, 2016, 6:58pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1177 "2016-01-14T18:58:39Z")

</div>

> [@;453612](#):
>
> stuff is still totally ! Considering using it for something in the future, but I have a question or two.
> 
> In our design, there are two separated ‘modes’ - an RTS-style top-down view of large areas with lots of units, and an indoor, walk-around-my-command-ship type deal. We’d need to be using AHR only in the latter mode, and having nothing from it active in the other. I haven’t had a to go through the source, but is it capable of being switched on and off in way? The interior would essentially be ‘paused’ when in the top-down view, so nothing should really be rendered or calculated there, if possible. If it helps, it would be in a totally different area/level, since it’s at a different scale and all.
> 
> Also, do you know of any recent videos demonstrating AHR? Would be great as something to share around.
> 
> Keep up the good work!

Not sure how you are handling the render change, but there’s a cvar called r.ApproximateHybridRaytracing that disables ahr. When disabling it from the engine ini (setting it at 0), ahr is not even initialized, so it mostly works like the “vanilla” version. If the engine started without AHR enabled, enabling it at runtime can cause crashes. But, if you start with AHR, disabling it later by setting the cvar to 0 doesn’t causes problems, and as it doesnt release any objects, it just “pauses” AHR, you could disable it for the top-down view, and re-enable it for the other view.  
Not sure if it’ll work straight away, but think that’s the way to do it.  
About videos, sadly no, I haven’t had much time to make new videos.

---

<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:** [February 3, 2016, 5:14pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1178 "2016-02-03T17:14:18Z")

</div>

Hey, just wanted to say I’m back!  
Working on some performance improvements, that I also hope will allow me to push quality further. Will keep you people updated.

---

<div class="post-metadata">

**Author:** ![Keiyentai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Keiyentai](https://forums.unrealengine.com/u/Keiyentai)\
**Post date:** [February 4, 2016, 8:16am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1179 "2016-02-04T08:16:32Z")

</div>

Does mean I need to update again ? LOL I am going to burn my CPU to dust lol.

---

<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:** [February 4, 2016, 12:05pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1180 "2016-02-04T12:05:14Z")

</div>

> [@Keiyentai;467198](#):
>
> Does mean I need to update again ? LOL I am going to burn my CPU to dust lol.

Not yet, not yet…

---

<div class="post-metadata">

**Author:** ![majorcyto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@majorcyto](https://forums.unrealengine.com/u/majorcyto)\
**Post date:** [February 6, 2016, 10:10am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1181 "2016-02-06T10:10:56Z")

</div>

> [@;467263](#):
>
> Not yet, not yet…

I have been following thread for quite some time, i am looking forward to what you show us for your performance improvements! 😃

---

<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:** [February 13, 2016, 12:11am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1182 "2016-02-13T00:11:04Z")

</div>

> [@majorcyto;468490](#):
>
> I have been following thread for quite some time, i am looking forward to what you show us for your performance improvements! 😃

Sadly, it will take a bit more than expected. Turned out that the changes I’ve been working on haven’t improved performance by much. Will keep looking into it though, but like I said, it’ll take some more time.

---

<div class="post-metadata">

**Author:** ![Maxwell\_77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maxwell\_77](https://forums.unrealengine.com/u/Maxwell_77)\
**Post date:** [February 19, 2016, 5:36pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1183 "2016-02-19T17:36:59Z")

</div>

Can you integrate multibounce in the AHR module? I noticed that only 1 bounce is used. It would increase the quality very much. At the moment I am working with VXGI. Multibounce gives me fantastic results in interiors…

---

<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:** [February 19, 2016, 6:05pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1184 "2016-02-19T18:05:02Z")

</div>

> [@;477388](#):
>
> Can you integrate multibounce in the AHR module? I noticed that only 1 bounce is used. It would increase the quality very much. At the moment I am working with VXGI. Multibounce gives me fantastic results in interiors…

On VXGI, multiple bounces are relativity straightforward to implement, but for AHR I require to add a specific pass for that. Overall, it’s doable, but need to get around and do it, and in a way that I keep the performance hit on check.  
TL;DR: I’ll implement it eventually ;D

---

<div class="post-metadata">

**Author:** ![cadviz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cadviz](https://forums.unrealengine.com/u/cadviz)\
**Post date:** [February 20, 2016, 5:23pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1185 "2016-02-20T17:23:19Z")

</div>

> [@;477388](#):
>
> … At the moment I am working with VXGI. Multibounce gives me fantastic results in interiors…

Can you tell where to see some screenshots for your interiors done with VXGI…!!? 🙂

---

<div class="post-metadata">

**Author:** ![majorcyto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@majorcyto](https://forums.unrealengine.com/u/majorcyto)\
**Post date:** [February 21, 2016, 5:31am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1186 "2016-02-21T05:31:04Z")

</div>

> [@;472874](#):
>
> Sadly, it will take a bit more than expected. Turned out that the changes I’ve been working on haven’t improved performance by much. Will keep looking into it though, but like I said, it’ll take some more time.

That’s ok im still here to support you, is a great project. 😃

---

<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:** [March 1, 2016, 7:40pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1187 "2016-03-01T19:40:02Z")

</div>

Sorry for the lack of updates people, worked the past month in performance updates, yet they turned out to be a failure, so they are on the backburner for now.  
Also I’m currently working on a few freelance projects, and with university started again i don’t have a lot of time.  
Nevertheless, I’m working now on some tweaks to the blur code, to improve quality and hopefully performance. I’m also playing with the idea of using something like LPV to propagate the voxel information, and have multiple bounces way.  
So, will try to have some more news soon  
PS: Another thing that could be really helpful and I’m not taking advantage off is temporal filtering, so that’s another thing to play with. Probably something along the lines of alternating the rays on each frame, to “duplicate” the number of rays at the same cost

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c237df01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c237df01](https://forums.unrealengine.com/u/anonymous_user_c237df01)\
**Post date:** [March 1, 2016, 8:30pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1188 "2016-03-01T20:30:47Z")

</div>

Keep pushing Torant, youre amazing

---

<div class="post-metadata">

**Author:** ![Datarecovery09](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Datarecovery09](https://forums.unrealengine.com/u/Datarecovery09)\
**Post date:** [March 3, 2016, 9:45pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1189 "2016-03-03T21:45:19Z")

</div>

What you’re doing looks absolutely amazing! Just keep up the good work, we’ll patiently wait for it.

---

<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:** [March 15, 2016, 11:35am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1190 "2016-03-15T11:35:57Z")

</div>

Hey I’ve been using AHR a lot more as of recently, and after messing around with it for a while I’m starting to get a grip on how to use it effectively. That being said, I’m noticing that I have to put the indirect intensity for spotlights at 10 or higher to get a good amount of diffuse GI, but directional lights give good results with indirect intensity at 1. Is a bug, or am I doing something wrong?

---

<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:** [March 15, 2016, 12:05pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1191 "2016-03-15T12:05:51Z")

</div>

> [@Blakblt;493465](#):
>
> Hey I’ve been using AHR a lot more as of recently, and after messing around with it for a while I’m starting to get a grip on how to use it effectively. That being said, I’m noticing that I have to put the indirect intensity for spotlights at 10 or higher to get a good amount of diffuse GI, but directional lights give good results with indirect intensity at 1. Is a bug, or am I doing something wrong?

Really? I would love to see what you are working on!. Regarding the intensity question, spot lights use physically correct units for intensity (lumens) but directional lights don’t (that’s an engine thing, not mine) so it needs different multipliers.

---

<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:** [March 15, 2016, 12:35pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1192 "2016-03-15T12:35:10Z")

</div>

> [@;493477](#):
>
> Really? I would love to see what you are working on!. Regarding the intensity question, spot lights use physically correct units for intensity (lumens) but directional lights don’t (that’s an engine thing, not mine) so it needs different multipliers.

Thanks for the help! I don’t have anything to show at the moment, but when I do I’ll post it here!

---

<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:** [March 15, 2016, 1:06pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1193 "2016-03-15T13:06:39Z")

</div>

One more question. On the spotlights, since they are physically accurate, does the indirect intensity still act as a multiplier, or does it actually specify the intensity of bounce lighting in lumens? (ex. Indirect intensity of 50 would mean bounced light has an intensity of 50 lumens)

---

<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:** [March 15, 2016, 3:25pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1194 "2016-03-15T15:25:24Z")

</div>

> [@Blakblt;493515](#):
>
> One more question. On the spotlights, since they are physically accurate, does the indirect intensity still act as a multiplier, or does it actually specify the intensity of bounce lighting in lumens? (ex. Indirect intensity of 50 would mean bounced light has an intensity of 50 lumens)

Yes and no. For spot lights illumination is computed correctly(using the same function as the direct lighting). After that, its multiplied by the indirect intensity and that’s stored. For true pbr, the multiplier should always be one, and the indirect intensity determined solely by light intensity(in lumens), surface properties, angle and distance to the light. The problem is that the attenuation function when tracing indirect its not physically correct(manly because a direct lights and a few range problems).  
Will try to get physically correct attenuation (and temporal filtering) working week.  
Hope I’ve answer your question, if not ask again 😛

---

<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:** [March 15, 2016, 6:08pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1195 "2016-03-15T18:08:21Z")

</div>

> [@;493597](#):
>
> Yes and no. For spot lights illumination is computed correctly(using the same function as the direct lighting). After that, its multiplied by the indirect intensity and that’s stored. For true pbr, the multiplier should always be one, and the indirect intensity determined solely by light intensity(in lumens), surface properties, angle and distance to the light. The problem is that the attenuation function when tracing indirect its not physically correct(manly because a direct lights and a few range problems).  
> Will try to get physically correct attenuation (and temporal filtering) working week.  
> Hope I’ve answer your question, if not ask again 😛

If by attenuation you mean the range of the indirect lighting, then that explains it perfectly. Right now in order to get diffuse spot light GI to even be visible I have to have the indirect intensity at like 8 or so, and even then the light doesn’t seem to “reach” far enough. So right now the attenuation range seems to be far too low.

---

<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:** [March 15, 2016, 6:29pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/1196 "2016-03-15T18:29:30Z")

</div>

> [@Blakblt;493709](#):
>
> If by attenuation you mean the range of the indirect lighting, then that explains it perfectly. Right now in order to get diffuse spot light GI to even be visible I have to have the indirect intensity at like 8 or so, and even then the light doesn’t seem to “reach” far enough. So right now the attenuation range seems to be far too low.

Not exactly. By attenuation I meant how the light gets dimmer as it gets further away from the object (inverse square law for example), but the range of the indirect illumination it’s set by the ray lenght, and that is the number of samples times the Voxel size. Plus was just checking and right now I don’t even have any attenuation, that is, the light keeps its intensity as it gets further away from the origin point(completely fake). Will try to get physically correct attenuation working. Also keep in mind that increasing the number of samples can have an almost linear performance hit (on the worst possible case, twice the samples mean half the performance. In practice it’s not that direct, but it does make a hit)

PS: Another way to improve range without a performance hit(will most certainly be a gain) is to increase the Voxel size. Of course, that makes it less accurate, so it’s a compromise

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

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