Realtime Dynamic GI + Reflections + AO + Emissive - AHR

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

Ok, now I understand. But the problem I’m having is that the physically correct value of 1 looks identical to no GI at all. It simply appears to not even be enabled, even with a high ray length. A lack of attenuation shouldn’t cause problem. If anything, adding attenuation should make problem worse. If an indirect intensity value of 1 is accurate, then why does it appear to not emit light at all?

You’ve hit the nail right in the head. I have no idea. I’m looking into it though, so, fingers crossed. Thinks its a units problem, but will post back when I have something more solid.

Just a quick tip for the ones using movable bounds. Making the movable bounds a (same size on all 3 axis in the post pro settings) and setting the voxel size to a divisor of the bounds size(the bounds size divided the voxel size has to be an integer).
There’s a bug that makes the code ignore the value set in the post pro volume, so a second one needs to be created with the DefinesAHRBounds flag on, and make it big enough so that it covers the whole scene (can’t use unbound). Then set the voxel size on that volume.
Found that out doing some tests, and while it’s not optimal, it helps.

I’m also working on the attenuation/intensity.

Thanks for the update, I was wondering if there was a workaround for the movable bounds. Quick question, why do movable bounds need to be a perfect square? A lot of indoor projects can easily lower the height of the bounds, which can help with both quality and performance. Is there a technical limitation, or something similar?

ff936b7c599607a33d990e7b8c3f933a9a8231f4.jpeg
There’s no real reason, and I works fine with non-square bounds, but making them a reduces flickering. Why? No idea. Should it do that? No, it shouldn’t.
Welcome to the world of graphic computing :smiley:

Bugs are like Hydras. Except fixing one causes like, 30 more :p. Btw, the first page is still saying to watch the video you posted when you first released AHR, and the tutorial may need updated. I looked at it again, and it may confuse people who are new to AHR. It confused me a bit even, given how much AHR has changed. Specifically your tutorial mentioned…

  1. Setting Samples Displacement and Initial Displacement to x10 default
  2. One Shadow Cascade
  3. Only works on Directional Lights
  4. Works with Stationary lights

How much of is still accurate? I know #3 is incorrect now, but the others are less… straight forward. For #1, I know you had a units. Was the that the editor was showing the wrong number, or that the number was actually wrong? Do we still need to multiply it by ten? Also, isn’t samples displacement disabled currently? If so, is it just deprecated and not needed, or is it broken? For #2, I never noticed problems with Shadow Cascades, even when you first released AHR; I just kinda set the Cascades to 1 because you told me to :p. That’s fixed right? If so, what was the initial problem with that (I’m kinda curious)? #4 I simply never knew was even possible; I just noticed now you did mention it is. How does that work exactly? Does AHR disable baked lighting from that light, or does AHR just compute on top of the Lightmap? Is AHR aware of baked shadows? Can AHR be aware of baked shadows? I’m sorry if I’m asking a lot here, or if stuff has already been answered, but I figured it was worth bringing up in case anyone new comes along, or if someone wants to check the tutorial for some information. The only thing more annoying than having no documentation, is incorrect documentation.

Yeah, you are probably right, I should do a new tutorial. Tell you what, would you be willing to give me a hand? Would help a lot. You can add me on skype (pachesantiago/alt64/hotmail) and we can chat about that.
For your questions, 3 is wrong, 2 I’m not sure, but should still be ok, 1 is partially obsolete, as the samples displacement do nothing now. The initial displacement is still needed, but 10 is way too high, something like 3 is enough in most cases, and about 4 what I meant, and maybe should have been more clear, is that you can use static lighting alongside AHR (no need to disable static lighting). AHR won’t know about it, but will get applied over it (you can combine the two, mostly useful for baked shadows). Plus if you have a directional (not sure about spot) light marked as “affect dynamic lighting” it can use baked shadows, but still affect dynamic GI (a separated, low quality shadow map is always rendered for enabled directional lights).

I need to repull I loved messing with it and I just got access to some interesting stuff. I’ll hit ya up on Skype.

Well people, my plan was to upload 4.11 AHR today, along with the correct attenuation code, but that’s not going to happen. It compiles and runs, but everything’s black. Tracked the error down to the voxelization stage, but not sure why it’s not working. Seems that Epic changed quite a few things with release.
Will keep you posted.

You are not the only one, from the Nvidia GameWorks thread:

Well, managed to get it working. On debug.
For some reason when I switch to Release AHR goes black. Seems that for some reason the voxelization stage is not doing anything on Release. Guess Epic did some changes to the mesh drawing code, need to dig deeper there.

And it’s working now, it was a problem on my end, forgot a line when merging.
Will upload it in a few days, have some changes cooking up that want to try first.

Is there a set of pictures showing the difference between no GI and AHR?
The video “AHR and Unreal engine 4” does not clearly show (how) the GI is working, Or is 360p too low quality to see it?

Good job with !
Did you come up with AHR method? (I cannot find any papers/presentations on )

-Edit-
Do you incorporate the latest updates to the release branch or do we do that ourselves?

So, after months of testing diferent optimization techniques, I finally came up with something good. And by something good I mean that my GTX 970 now does the tracing stage AT LEAST twice as fast.
Will get into details later, but the main difference is that now I came up with a MipMap-ish texture that I use to skip empty spaces. way the number of samples needed is greatly reduced. Depending on the settings, about 10-20 samples are enough now.
In my test scene, tracing is taking the same time as the blur stage :smiley: (that means that my blur needs a good upgrade now).
For really big grids you may see a negative impact on the voxelization stage, cause building that textures can take time. Working on how to improve that, but keeping the voxel res reasonable it’s usually really fast (about 0.1 ms).

The updates are on my branch, you can re-download the repo, or if git is properly set up, just click merge on the Visual Studio’s Team Explorer window and it should update automatically.

I think there are some pictures back in the thread, but here are two just in case


And I do need to make a new video. Still, I’m quite sure I uploaded it at 1080p.

Yes, I did came up with , that’s why there’s nothing out there :smiley: . Originally, it was just raymarching the voxel grid, but over time I developed a few modifications and optimizations. Now it’s more complex, with the normal interpolation stage, that allows to recover detail from the blured image, and the new empty space skipping technique (that to my knowledge it’s new, but there’s so many people in the world that you can never know for sure ).
I should make a presentation talking about the inner-workings of AHR, but it had been in the back-burner for a while.

Just uploaded the new version to . I haven’t done extensive testing, so there may be bugs. Also 4.11 broke temporal filtering for AHR. Not really a big deal, as I need to implement a custom pass anyway, but it’s something that’s not working.Also, only GI tracing uses the new method, reflections still use the old one. Overall, take it like a beta-ish release. It’s running on 4.11.

Sounds like SVO/Signed distance field stuff, probably the same idea at base, but storing and checking mips to keep the regular grid structure is a good idea. I think you’d still end up with memory size problems for a grid dense enough to get good secondary shadows/specular results from. But you can check out sparse volume resources for that. Empty cells can just end up with null as a value, saving a lot of memory in most situations.

Edit- now that I think about it I’m remembering an early cone tracing demo/paper that did indeed just use straight mip-mapping with a regular grid to both cone trace and skip empty space at the same time, it would just test the next mip up see if it was empty and thus skippable.

to see work progressing on ! Also Cryengine is now downloadable with full source for free: https://www.cryengine.com/get-cryengine

They’re also doing high performance voxel tracing, not sure how yet cause I haven’t looked at. But I thought you might be interested, either way keep up the good work!

Pretty impressive.

GI really makes a difference.

I watched it in 360p, I prefer not using much bandwidth on videos as I cannot (always) tell if it is going to be useless/unhelpful to me.

I would be interested in that paper/presentation, Will you link to it here if you get time to do it?

Side question: Do you have trouble compiling from source using VS2015 ?

I just pushed a small update to with reflections now using the new tracing system.
Also will see if today or more probably tomorrow I upload a change to the mip map and mip level map (my need to think a new name for that last one) generation stage. Think I know how to do all in one go, and in les steps, increasing performance and reducing memory usage.

Actually it’s a bit different, cause instead of going up and down the mip chain (basically a stackless tree traverse) I generate a second texture where I store what’s the finest mip where voxel is filled. way I now exactly how much I can skip without having to go up and down the chain.
Yeah, i need to look into sparse textures, they might be able to help a lot.

Sure! Hope I actually have time to do it.
And no, I haven’t had any problems with VS2015

Hi there, thanks for all work , I am always reading here looking for some news about your proyect.
I have already downloaded your last version and I have installed it without problem.
Now I am trying in my free time to learn how to use with but I don’t know a lot of things.

How can I activate the AHR GI? I only see when I create a new proyect.
there is a file with instructions or tutorial for beginners?

“or if git is properly set up, just click merge on the Visual Studio’s Team Explorer window and it should update automatically.”
Could you explain better? Maybe I use way for next updates. Cheers