Global Illumination via Voxel Cone Tracing in LWJGL

Currently playing around with static mesh caching and multiple bounces via grid shading. Still some incorrect calculations inside and as always far from perfect, but it’s on its way. Lighting is solely from the windows, which are configured as objects with emissive materials. The sphere is a perfect mirror, where you can see the maximum level of detail reflections can have with the given grid resolution.

Does anybode have experience with smarter solutions for smoother diffuse lighting? I’m thinking of better filtering for mipmap generation, better cone tracing etc. Since I already tried to increase the count of diffuse cones traced, any experience with better 3d mipmapping filters/techniques would be helpful, thanks.

You could try doing something like “tricubic” filtering manually, but other than that there’s not much you can do. You can do tricubic filtering with “only” 8 samples (instead of 64).

Thanks for the hint. I think with 8 samples, it doesn’t differ much from what I’m doing right now. Instead of assuming the weight is uniform, I have an alpha value and normalize afterwards.

I think I will try to increase my kernel to a 333 kernel, compare it with a kernel that only takes corner samples, and maybe test a modified 333 kernel of what I don’t know how the technique is called.

images are so boring!

9UGc6gn6sXA

Stunning…

Finally managed do implement a new Voxel Cone Tracing method that uses multiple grids - but not the regular cascade approach, which suffers from being view-centric (permanent revoxelization, less caching, instable voxel values).
My volumes are AABBs and my currently still very naive tracing traces against these boxes and within these boxes, does the regular 3d texture sampling. So a mixture of ray tracing and cone tracing. This gives you voxel global illumination for more (all?) kinds of level scales: Volumes can be of arbitrary resolution, which gives you more detail where you need it and less where you don’t. The indirect illumination can be completely cached or updated with n grids per frame, giving the freedom of updating volumes near the camera more often than others. Also, one could as well only have n volumes that are precalculated and streamed from texture, or even having a resource pool of n grids around the player. Last but not least my method is not the regular direct voxel lighting, but a deferred approach that treats voxel grids as 3d gbuffers. So while only moving objects have to be revoxelized at all, calculating lighting works without the need to voxelize anything. This way, Recalculating two (or more) bounce global illumination on lighting changes can be done.

Here’s a comparison between voxel quality of two 256³ grids, one containing the whole sponza scene, one containing less then half the space.

And here’s what a difference can lay between a single (bottom) and a second (top) bounce of lighting. Please don’t look too closely, my equations aren’t correct yet and in the comparison I disabled the second bounce for diffuse tracing only, which is the reason why specular lighting looks boosted in the bottom picture.