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

<div class="post-metadata">

**Author:** ![Sitrec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sitrec](https://forums.unrealengine.com/u/Sitrec)\
**Post date:** [November 10, 2014, 7:34am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/81 "2014-11-10T07:34:00Z")

</div>

> [@;176932](#):
>
> Quick update.  
> I worked all the weekend, but made progress. Got most of the core classes working, and some of the shaders too. It’s starting to come together

Great to hear! Really looking forward to see more.

---

<div class="post-metadata">

**Author:** ![ryanjon2040](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ryanjon2040/32/906587_2.png) [@ryanjon2040](https://forums.unrealengine.com/u/ryanjon2040)\
**Post date:** [November 10, 2014, 7:50am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/82 "2014-11-10T07:50:44Z")

</div>

Cant wait for . Any new video to show?

---

<div class="post-metadata">

**Author:** ![PLASTICA-MAN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/plastica-man/32/990043_2.png) [@PLASTICA-MAN](https://forums.unrealengine.com/u/PLASTICA-MAN)\
**Post date:** [November 12, 2014, 12:21am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/83 "2014-11-12T00:21:05Z")

</div>

Nvidia released their useless Apollo tech demo: [Virtualization Archives | NVIDIA Blog](http://blogs.nvidia.com/blog/2014/11/11/maxwell-apollo-demo/)  
[Download NVIDIA Tech Demos](http://www.nvidia.com/coolstuff/demos#!/apollo-11)

It needs at leats a GTX 970 to run while I have a GTX 660M -\_-.While the tomorrow children uses much better tech with ray traced voxel cones with 3 light bounces and in 16 directions per voxel while nvidia tech only has one bounce. ALso tomorrow children has 3 types of AA and the list of the features is long (I gave you links before) and a game not just a demo. Morever PS4 is not a GTX 980. A good way for Nvidia to sell their overpriced cards that only 2 customers will buy and a good way to deprive us from using any type of dynamic GI . I don’t blame epic though, they are good devs. \*\*\*\*, the ball is in your camp now. You are the only and last savior.

---

<div class="post-metadata">

**Author:** ![DaveFace](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daveface/32/597060_2.png) [@DaveFace](https://forums.unrealengine.com/u/DaveFace)\
**Post date:** [November 12, 2014, 3:04am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/84 "2014-11-12T03:04:41Z")

</div>

> [@PLASTICA-MAN;177952](#):
>
> Nvidia released their useless Apollo tech demo: [http://blogs.nvidia.com/blog/2014/11/11/maxwell-apollo-demo/](http://blogs.nvidia.com/blog/2014/11/11/maxwell-apollo-demo/)  
> [Download NVIDIA Tech Demos | NVIDIA Cool Stuff](http://www.nvidia.com/coolstuff/demos#!/apollo-11)
> 
> It needs at leats a GTX 970 to run while I have a GTX 660M -\_-.While the tomorrow children uses much better tech with ray traced voxel cones with 3 light bounces and in 16 directions per voxel while nvidia tech only has one bounce. ALso tomorrow children has 3 types of AA and the list of the features is long (I gave you links before) and a game not just a demo. Morever PS4 is not a GTX 980. A good way for Nvidia to sell their overpriced cards that only 2 customers will buy and a good way to deprive us from using any type of dynamic GI . I don’t blame epic though, they are good devs. \*\*\*\*, the ball is in your camp now. You are the only and last savior.

I’m not sure what they’re trying to achieve with their VXGI work - if they are seriously going to stick with their ‘Maxwell only’ line then no one will ever use it for games. You would always need to have a fallback to Lightmass for AMD / non-Maxwell users which are going to be about 98% of your playerbase, and for that 2% the extra work doesn’t seem worth it. And it won’t be supported on consoles because PS4 and Xbone are AMD APU’s.

---

<div class="post-metadata">

**Author:** ![Hyperloop](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyperloop/32/1203427_2.png) [@Hyperloop](https://forums.unrealengine.com/u/Hyperloop)\
**Post date:** [November 12, 2014, 3:18am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/85 "2014-11-12T03:18:44Z")

</div>

I’m gonna sounds like a total old fart, but I remember when we had to set up our bounces by hand even in non-realtime renders and then wait overnight to see if the single frame turned out how we hoped. MAN, we’ve come a long way baby 😃

---

<div class="post-metadata">

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

</div>

Don’t be so fast at judging Nvidia for the Apollo tech demo. People have said the same thing every new GPU generation, that stuff like is useless because only one manufacturer or model supports it. Then 1-2 generations later, everyone uses it. is R&D for new hardware to show the potential for the future, not necessarily what we’re going to use at exact minute.

---

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

</div>

> [@;175321](#):
>
> I’m not sure really, as the few demos I tested about Voxel cone tracing where slower than AHR, sometimes AHR running even twice as fast. It might have to do with the way tracing works, using a binary grid to do the tracing. On the perfect case( a ray going on a straight Voxel line up) each sample loads 32 voxels

Hm.Excuse my noobness. I was thinking along the lines that you can shoot spheres in cone, and just using single cone trace gather all voxels it touches. So for example single sphere can gather 64 voxels in sphere of influence while line will be always limited to gathering things only in line.

That being said you would probabal want more cone traces in more or less the same direction to gather more accurate information to average diffuse bounce (though diffuse doesn’t need to be terribly accurate).

Or it doesn’t work way ?

---

<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:** [November 16, 2014, 8:36pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/88 "2014-11-16T20:36:04Z")

</div>

> [@](#):
>
> Hm.Excuse my noobness. I was thinking along the lines that you can shoot spheres in cone, and just using single cone trace gather all voxels it touches. So for example single sphere can gather 64 voxels in sphere of influence while line will be always limited to gathering things only in line.
> 
> That being said you would probabal want more cone traces in more or less the same direction to gather more accurate information to average diffuse bounce (though diffuse doesn’t need to be terribly accurate).
> 
> Or it doesn’t work way ?

The “gather” part is the problem. Loading the data from the memory (aka sampling the voxels) is what takes most of the time, and even if you change the shape of the sampling, you still need to load the data at some point. Sadly it doesn’t work like you said, or maybe I’m misinterpreting you.

BTW, the forums seems to have unsubscribed my from the thread for some reason. \*\*\*\* computers  
I just wanted to say I’m still working on , and I’m getting there, but I’m about to start the exams period at college and that goes until 20 of December, give or take a few days, so progress will be slow for a while.

Oh BTW, I wanted to talk a bit about memory usage.  
For a single 512x512x512 voxel grid, wich is what I’m using now, the memory usage is 16 MB. To that you need to add the memory of a RSM per light, but that’s not usually taken into account when talking about voxel-based GI algorithms, so I think it’s ok to talk about just 16 MB of memory usage.  
That’s not taking into account emissive materials.  
A quick breakdown will be like :

- Just AO : Only the Binary Voxel Grid, so 512_512_512\*4/32 bytes = 16 MB
- AO + GI: Binary Voxel Grid : 16 MB + RSM ( Depth + 32 bits per pixel buffer). About 32 MB on my demo, so looking at 48 MB total
- AO + GI + 16 Emissive materials : 16 MB + RSM + 512_512_512\*4/8 = 64 MB. So a total of 112 MB
- AO + GI + 256 Emissive materials : 16 MB + RSM + 512_512_512\*4/4 = 128 MB. A total of 176 MB

When I implement cascaded voxel grids, the memory will probably be kept at the same 16 MB, maybe 32 MB in the worst case

---

<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:** [November 16, 2014, 10:02pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/89 "2014-11-16T22:02:49Z")

</div>

> [@PLASTICA-MAN;177952](#):
>
> …\*\*\*\*, the ball is in your camp now. You are the only and last savior.

I have just one thing to say:  
[http://i.imgur.com/9kECRoR.png](http://imgur.com/9kECRoR)

---

<div class="post-metadata">

**Author:** ![JordanN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JordanN](https://forums.unrealengine.com/u/JordanN)\
**Post date:** [November 16, 2014, 11:13pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/92 "2014-11-16T23:13:48Z")

</div>

Hey , I got another question.

I know your technique is based on ray tracing, so does it have the same benefits too? For example, ray tracing is suppose to scale well when you throw more polygons at it (something rasterization can’t do). Epic mentioned in one of their livestreams, having ray traced shadows didn’t require processing polygons (it only calculates the cascades around the mesh).

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/0/4a0d4457475a6578cda3fa54c380d5c8eff53f44.png)  
Also, can your ray tracing be used at very high resolutions? Like for example, if I wanted to make a game run in 4k, would there be a bigger performance penalty than if it was 1080p?

---

<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:** [November 16, 2014, 11:29pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/93 "2014-11-16T23:29:20Z")

</div>

> [@JordanN;180195](#):
>
> Hey , I got another question.
> 
> I know your technique is based on ray tracing, so does it have the same benefits too? For example, ray tracing is suppose to scale well when you throw more polygons at it (something rasterization can’t do).
> 
> [http://i.imgur.com/CbpjcT2.png](http://i.imgur.com/CbpjcT2.png)
> 
> Also, can your ray tracing be used at very very high resolutions? Like for example, if I wanted to make a game to run in 4k, would there be a bigger performance penalty than if it was 1080p?

Well, the answer is the classic “it depends”.  
Let me breakdown a bit your question.

My technique has, as most raytracers, two stages. One to build the acceleration structures (voxelization in my case) and another to do the tracing.  
Only the first stage is dependent on the geometry, and is linear in the number of primitives and triangles per primitives. Then the raytracing stage is constant on the scene geometry.  
Complexity scales linearly to the number of pixels to be traced, so in 4K you get 4 times less performance. Keep in mind that the tracing is done on a half resolution buffer.  
I get about 12 FPS down from 52, almost exactly 4 times slower, on a high quality preset with my GTX 750 Ti at 4K. But you won’t game at 4K with a 750 Ti…  
Later I plan to divide the voxelization in a bunch of diferent stages, so that only the things that really need to be voxelized get voxelized. For now it sends everything every frame.

EDIT: Considering that at 4K the GI buffer ends up at 1080p, wich is quite overkill, you could trace at quarter resolution when rendering at 4K, and you should get the same performance that running at 1080p

---

<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:** [November 21, 2014, 11:49am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/94 "2014-11-21T11:49:39Z")

</div>

, looks fantastic any update for us? 😉

---

<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:** [November 21, 2014, 12:05pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/95 "2014-11-21T12:05:38Z")

</div>

> [@;182270](#):
>
> , looks fantastic any update for us? 😉

Sadly no, i have 5 exams due to next week, so I haven’t had a lot of time to work on . Still, the two main parts left for a working-alpha-ish wibbly wobbly implementation are the voxelization shaders and the RSM.  
Sorry for not having a lot of news

---

<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:** [November 21, 2014, 12:13pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/96 "2014-11-21T12:13:08Z")

</div>

No Probs 😉 totally understand and good luck with your exams!

---

<div class="post-metadata">

**Author:** ![PLASTICA-MAN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/plastica-man/32/990043_2.png) [@PLASTICA-MAN](https://forums.unrealengine.com/u/PLASTICA-MAN)\
**Post date:** [November 22, 2014, 2:01am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/97 "2014-11-22T02:01:29Z")

</div>

> [@;182279](#):
>
> No Probs 😉 totally understand and good luck with your exams!

Don’t worry about his exams, if he can create such things that even devs coudln’t do, then he must be a real genius 😉

---

<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:** [November 25, 2014, 12:22am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/98 "2014-11-25T00:22:39Z")

</div>

> [@PLASTICA-MAN;182567](#):
>
> Don’t worry about his exams, if he can create such things that even devs coudln’t do, then he must be a real genius 😉

\> be me  
\> be studing 24/7  
\> read comment  
\> my face be like  
 ![a1805f17769395cc36bd498a902cf93246b4a4d8.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/8/a1805f17769395cc36bd498a902cf93246b4a4d8.jpeg)

Thanks man

---

<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:** [November 25, 2014, 12:51am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/99 "2014-11-25T00:51:27Z")

</div>

> [@;183647](#):
>
> \> be me  
> \> be studing 24/7  
> \> read comment  
> \> my face be like  
> ![a1805f17769395cc36bd498a902cf93246b4a4d8.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/8/a1805f17769395cc36bd498a902cf93246b4a4d8.jpeg)
> 
> Thanks man

lol chuckled

---

<div class="post-metadata">

**Author:** ![PLASTICA-MAN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/plastica-man/32/990043_2.png) [@PLASTICA-MAN](https://forums.unrealengine.com/u/PLASTICA-MAN)\
**Post date:** [November 25, 2014, 1:09am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/100 "2014-11-25T01:09:59Z")

</div>

> [@;183647](#):
>
> \> be me  
> \> be studing 24/7  
> \> read comment  
> \> my face be like  
> ![a1805f17769395cc36bd498a902cf93246b4a4d8.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/8/a1805f17769395cc36bd498a902cf93246b4a4d8.jpeg)
> 
> Thanks man

Good luck 🙂

---

<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 2, 2014, 11:42pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/101 "2014-12-02T23:42:49Z")

</div>

Just wanted to say I’m still alive around here. Have 3 exams on the next 3 days, but will be free after friday, so might have some updates over the weekend. For now, just wait 😉

---

<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 3, 2014, 1:09am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/102 "2014-12-03T01:09:40Z")

</div>

We are ready

[http://cdn2-b.examiner.com/sites/default/files/styles/image\_content\_width/hash/9d/d4/9dd4a5acdec44ab8b7c560f839920fe8.jpg?itok=8EMqe8Lq](http://cdn2-b.examiner.com/sites/default/files/styles/image_content_width/hash/9d/d4/9dd4a5acdec44ab8b7c560f839920fe8.jpg?itok=8EMqe8Lq)

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

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