Page 1 of 4

Global Illumination

Posted: Fri Aug 21, 2015 1:35 pm
by andrewmac
Hey everyone, sorry for the radio silence. I've been getting into the more advanced stuff I had planned for the engine from the beginning. Torque 6 now has compute shader support and I've begun work on a real time global illumination solution. These features will likely fall into an "advanced" feature set that is only enabled if you're using newer hardware. This way the minimum requirements for the engine are kept low but we're also not held back.

This is a very very rough early in-development shot:
Image

It's all real time, both lighting and geometry can be changed on the fly and the GI will reflect those changes. I'm hoping this will settle on a reasonable middle ground between VXGI and LPV. VXGI has the best quality but it's really slow. LPV is fast enough for games but it has poor quality. What I'm doing is a sort of hybrid of the two, but I'm still not entirely convinced it will work out as I don't think anyone has done it this way. Stayed tuned! I'll post more updates as I make progress.

Re: Global Illumination

Posted: Fri Aug 21, 2015 2:31 pm
by Chelaru
Great to hear from you.

This approach seems really nice.

If this is unsuccessful what will you do, VXGI or LPV?

Re: Global Illumination

Posted: Fri Aug 21, 2015 4:47 pm
by andrewmac
What I'm trying to do is basically a conservative voxelization. Instead of voxelizing everything in the scene I'm only voxelizing lit surfaces. For first bounce GI you really only need the directly lit surfaces. Unfortunately you run into a bunch of occlusion issues (note the light bleeding in the screenshot) since you don't have the voxelization of the scene to test for light blocking geometry. I believe I can work around this and produce an acceptable approximation at game-worthy speeds.

If it becomes obvious this just isn't going to work no matter how many tricks I use I will keep taking steps closer and closer to VXGI until I settle on something usable in games or just end up with full blown VXGI.

Re: Global Illumination

Posted: Sat Aug 22, 2015 12:48 am
by andrewmac
Fixed a number of bugs:

Image

Re: Global Illumination

Posted: Sat Aug 22, 2015 1:58 am
by andrewmac
Direct Light Only ( I know, light bleed in the shadows.. it will be fixed soon™ ):
Image

Direct + Skylight:
Image

Direct + Skylight + Realtime GI:
Image

Still lots of bugs and work to do but it's coming along. Needs AO real bad.

Re: Global Illumination

Posted: Sun Aug 23, 2015 2:56 pm
by Chelaru
Really good. Big progress. :)

Re: Global Illumination

Posted: Mon Aug 24, 2015 3:07 am
by andrewmac
Minor shadow tweaks and a simple SSAO shader:
Image

I did some work on an SSDO shader but I haven't got it fully working yet. I figured an SSAO shader is always useful so I put this one together. Looks a lot better with AO.

Re: Global Illumination

Posted: Mon Aug 24, 2015 8:27 am
by Chelaru
You are getting close and closer. Can't wait to see the finished product.

Re: Global Illumination

Posted: Mon Aug 24, 2015 8:30 am
by Gav
Looks nice! How about disabling ambient lighting at all and depend on Direct + GI (with indirect lighting) ?

Re: Global Illumination

Posted: Mon Aug 24, 2015 2:30 pm
by andrewmac
@
User avatar
Gav
: I'll snap a shot of it later tonight. It will reveal the flaws in the cone tracing shader. The realtime GI is far from finished and I'm sure I'll be tweaking the cone tracing algorithm for weeks/months to come.

I am going to switch gears a little bit and improve shadows and try a new antialiasing method. I like the way the shot looks so far but now the jagged shadow edges and aliasing on the cube edges is bothering me. I'm only going to work on visuals until the end of this month and then I'm going back to working on the editor. I'm really hoping to have a beta release of the engine ready in November.