Realtime Dynamic GI + Reflections + AO + Emissive - AHR

So you decided against implementing something along the lines of taking the first bounce of gi from one frame and injecting it into the next one to finally remove it from the second frame when the bounce has already been calculated , in order to achieve infinite bounces?

ps: what is the size of the voxels and how big is the voxel grid that you are using to obtain a cost of 10-12 ms ?

I’m actually gonna do something like that, but you don’t really get unlimited bounces, as if the scene changes you can’t use all the other info. In any case, after 3 diffuse bounces there’s really not much difference, so I’m going to keep just a few frames and then reset.
You mean a total cost of 10 ms? I have that as a final goal, but still not there. Why you asked?

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. :slight_smile:
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]

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.

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.

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 :wink: ). 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?

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.

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

Yep, all source is inside that folder.

Ok,Thanks.

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

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

! 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!

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

I will make simple scene in a few days and then I will post some screenshots.
:slight_smile:
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 :stuck_out_tongue:

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.

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.