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

<div class="post-metadata">

**Author:** ![TAN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAN](https://forums.unrealengine.com/u/TAN)\
**Post date:** [December 11, 2014, 9:58am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/123 "2014-12-11T09:58:30Z")

</div>

😃

[![]( " - YouTube") ](https://www.youtube.com/watch?v=GIQn8pab8Vc)

---

<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:** [December 11, 2014, 2:06pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/124 "2014-12-11T14:06:42Z")

</div>

> [@TAN\_;191062](#):
>
> 😃
> 
> [https://youtube.com/watch?v=GIQn8pab8Vc](https://youtube.com/watch?v=GIQn8pab8Vc)

[http://i.imgur.com/eoT7Czb.gif](http://imgur.com/eoT7Czb)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_138c2332](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_138c2332](https://forums.unrealengine.com/u/anonymous_user_138c2332)\
**Post date:** [December 11, 2014, 4:38pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/125 "2014-12-11T16:38:47Z")

</div>

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/f/dbfe6702cde2cbf30f83e2f0601a933996074f06.jpeg "An Ode To: Trashcan Man (The Stand)") ](https://www.youtube.com/watch?v=LA25LcbWbHc)

---

<div class="post-metadata">

**Author:** ![TAN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAN](https://forums.unrealengine.com/u/TAN)\
**Post date:** [December 11, 2014, 4:41pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/126 "2014-12-11T16:41:10Z")

</div>

Man I love these forums. 😃

Sorry for trashing your thread 😃

---

<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:** [December 11, 2014, 4:49pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/127 "2014-12-11T16:49:58Z")

</div>

is getting awkward…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0df12f74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0df12f74](https://forums.unrealengine.com/u/anonymous_user_0df12f74)\
**Post date:** [December 11, 2014, 4:52pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/128 "2014-12-11T16:52:53Z")

</div>

Lol what did I just watch Errvald??? haha that was great, such randomness, love it 😉

> [@;190918](#):
>
> Stay tuned people, good things are coming…

Can’t wait to hear more! I’ve been following for a while, great job so far!

---

<div class="post-metadata">

**Author:** ![iniside](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iniside/32/866315_2.png) [@iniside](https://forums.unrealengine.com/u/iniside)\
**Post date:** [December 11, 2014, 11:11pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/129 "2014-12-11T23:11:36Z")

</div>

> [@;190918](#):
>
> I did it! Everything up and running. Will get to work on the shaders, both on the shader code itself, that’s mostly a copy and paste from my demo, but also on the classes and engine stuff, which is quite more difficult, but I think I have the right idea on how to proceed. Actually, only two parts remain to be implemented. One is the voxelization stage, that I’ll try to leave working week, and the other is the RSM, which I’ll have to find a way to hack myself into the engine code, as there are already routines to render RSM, used by the LPV, for example, so I hope to be able to use them as-is. Might have to modify something, but even if I do, and I break LPV, not really a problem there, as AHR will (hopefuly) replace both LPV and distance field AO.
> 
> Stay tuned people, good things are coming…
> 
> BTW, the full compile took 7 hours. Anyone feeling like donating an i7 5960x?

the RSM in LPV implementation is actually very, very slow. It could tank my GTX 780 from 60fps to 30 -;-.  
But I guess is as good as starting point as any other.

---

<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:** [December 11, 2014, 11:23pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/130 "2014-12-11T23:23:04Z")

</div>

> [@](#):
>
> the RSM in LPV implementation is actually very, very slow. It could tank my GTX 780 from 60fps to 30 -;-.  
> But I guess is as good as starting point as any other.

Are you sure that RSM is the slow part? It shouldn’t be… Maybe you can try to run “profilegpu” and tell me how much it takes rendering the RSMs?

---

<div class="post-metadata">

**Author:** ![iniside](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iniside/32/866315_2.png) [@iniside](https://forums.unrealengine.com/u/iniside)\
**Post date:** [December 12, 2014, 8:49am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/131 "2014-12-12T08:49:15Z")

</div>

> [@;191462](#):
>
> Are you sure that RSM is the slow part? It shouldn’t be… Maybe you can try to run “profilegpu” and tell me how much it takes rendering the RSMs?

Last time I tried, depending on the level complexity it could be from 4ms to more than 10ms. It also depens on how far shadow maps are rendered.

---

<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:** [December 12, 2014, 11:40am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/132 "2014-12-12T11:40:20Z")

</div>

> [@](#):
>
> Last time I tried, depending on the level complexity it could be from 4ms to more than 10ms. It also depens on how far shadow maps are rendered.

Well, guess will have to make some changes there. But one problem at a time 😉 . Thanks for the info anyway

---

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [December 14, 2014, 1:40am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/133 "2014-12-14T01:40:08Z")

</div>

Hey

Just curious how well does handle large outdoor scenes?

---

<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:** [December 15, 2014, 12:44am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/134 "2014-12-15T00:44:00Z")

</div>

> [@HeadClot;192404](#):
>
> Hey
> 
> Just curious how well does handle large outdoor scenes?

Well, that one again … 😉  
Define large.

The thing is, for now I’m just using a single voxel grid fixed on the origin. As I advance, I plan to move to a cascaded implementation. Think of a shadow map. If you want it to cover a lot of area, you have to increase the resolution, or cascade it.  
I tried a while back on a “large” level, and actually the results where quite good, even with the fixed 512_512_512 grid at the origin, which is the worst possible way to do it.  
I have a few screens  
I upped the voxel resolution to the my 32 bit test app supports, 600_600_600, and did a quick texturing. From the tests, there doesn’t seems to be a big impact on framerate when changing the voxel grid resolution. Will have to bench that. Be warned, programmer art follows. Topology is a mess, so you’ll see some black triangles and stuff. _ **“Not representative of the final product”** _  
Oh, remember that screen res is now _ **2560x1440** _ , I upgraded my rig with a 27’, QHD, IPS monitor! The bad part of that is that there is a noticeable drop in framerate. Was quite expected actually, the 128 bit bus of the poor GTX 750 Ti really hurts performance when going over 1080p. Well, that and a red stuck pixel right in the middle, but you can’t really ask much for a 300 USD monitor where I live, that electronics tend to cost twice as much than in USA, can’t you?  
[http://i.imgur.com/SSUfV39.jpg](http://imgur.com/SSUfV39)  
[http://i.imgur.com/lCFSLTR.jpg](http://imgur.com/lCFSLTR)  
[http://i.imgur.com/ZfDwJys.png](http://imgur.com/ZfDwJys)  
[http://i.imgur.com/xnBnQVM.png](http://imgur.com/xnBnQVM)

---

<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:** [December 15, 2014, 2:47am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/135 "2014-12-15T02:47:53Z")

</div>

Just a quick update. I’m close to getting the voxelization stage working. I think so at least. Will have some news soon. I believe I have some kind of binding error, as the pixel shader never seems to run.

---

<div class="post-metadata">

**Author:** ![Voodoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Voodoo](https://forums.unrealengine.com/u/Voodoo)\
**Post date:** [December 15, 2014, 8:36am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/136 "2014-12-15T08:36:35Z")

</div>

Its happening…guys its happening!!! WOOOHOOOO!! ;D your a rendering wizzard!! Thx for the hard work its looking amazing!!

---

<div class="post-metadata">

**Author:** ![TAN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAN](https://forums.unrealengine.com/u/TAN)\
**Post date:** [December 15, 2014, 12:00pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/137 "2014-12-15T12:00:41Z")

</div>

Great work .

Let me help define " large ares" .

For example 16 km square or 32 square kilometer would be more than enough. Even whole skyrim world was something like 29 km square.

Keep up the good work mate.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_138c2332](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_138c2332](https://forums.unrealengine.com/u/anonymous_user_138c2332)\
**Post date:** [December 15, 2014, 12:57pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/138 "2014-12-15T12:57:34Z")

</div>

> [@TAN\_;193003](#):
>
> Great work .
> 
> Let me help define " large ares" .
> 
> For example 16 km square or 32 square kilometer would be more than enough. Even whole skyrim world was something like 29 km square.
> 
> Keep up the good work mate.

The human eye/camera can’t see details after 3km anyway.

---

<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:** [December 15, 2014, 1:15pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/139 "2014-12-15T13:15:35Z")

</div>

> [@Errvald;193020](#):
>
> The human eye/camera can’t see details after 3km anyway.

Well, let me do some math. Lets asume we are using a movable Voxel grid, which is quite similar to what I’ll have at least for the moment. If we are using a 3 square km area, we get a quad of sqrt(3) size, about 1.732 km side. If we are using a 512x512x512 grid, we get that each Voxel is 1732 / 512 m size, about 3.3 m. is a bit unrealistic though, as normally you don’t need a map that goes 1.5 km up and 1.5 down from the camera. I assumed a as bounds. With a proper bounding box, that could be reduced a lot, and I’m not even talking about cascades. Tracing performance is mostly the same, what limits outdoor scenes is the voxel resolution, and the voxelization time, as you’ll need to get all the things inside that 3 square km area trough the pipe, at least once. For now, and actually that will stay like that for a while, everything in the bounds gets voxelized each frame

---

<div class="post-metadata">

**Author:** ![TAN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAN](https://forums.unrealengine.com/u/TAN)\
**Post date:** [December 15, 2014, 4:30pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/140 "2014-12-15T16:30:40Z")

</div>

> [@Errvald;193020](#):
>
> The human eye/camera can’t see details after 3km anyway.

Yeah, for long distance objects you use LODs, and if they are too far, like say 3km or more, you simply don’t render them at all.  
is the trick CryEngine uses for trees and foliage for example 😉

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adcf0aef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adcf0aef](https://forums.unrealengine.com/u/anonymous_user_adcf0aef)\
**Post date:** [December 15, 2014, 7:08pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/141 "2014-12-15T19:08:54Z")

</div>

You are doing a great job bro. I can’t wait to see it and test it out when it’s finished. Keep up the good work! 🙂

---

<div class="post-metadata">

**Author:** ![Daedalus51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daedalus51](https://forums.unrealengine.com/u/Daedalus51)\
**Post date:** [December 15, 2014, 7:22pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/142 "2014-12-15T19:22:00Z")

</div>

to see something again ! And it looks gooood 🙂 Keep us posted and of course…keep up the amazing work!

Cheers! 🙂

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

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