BoyBaykiller / IDKEngine

OpenGL Toy-"Engine" with Wavefront Path Tracer and Rasterizer with Voxel Cone Tracing/Global Illumination
https://youtu.be/5m9fOVWaqdE
233 stars 20 forks source link

Cascaded Voxel Cone Tracing #3

Closed diwot closed 11 months ago

diwot commented 1 year ago

Hi, this is a great piece of code you wrote, I'm very impressed. I was wondering if it is an option to add support for Cascaded Voxel Cone Tracing? This would allow to cover almost infinitly big regions using VCT by moving the dense grid with the camera. The grid would need to be moved by multiple of it's cell size to keep consistent illumination when the camera moves. Also multiple dense grids of different cell size can be used as described here https://www.ultraengine.com/community/blogs/entry/2756-voxel-cone-step-tracing-cascaded-volumes/. I my eyes this sounds like a great idea to largely extend the range of VCT by avoiding the complexity of a sparse octree. Edit: There seems to be an CVCT implementation for the Unity Engine available on github: https://github.com/sonicether/SEGI.

BoyBaykiller commented 1 year ago

Hi diwot and thank you.

I have heard of this technique before and it certainly could be worth exploring. At the moment however I dont feel like making a big effort to improve upon the existing basic VXGI implementation.

I might add just the "moving grid in fixed steps with the camera" sometime. It should be done farily easily.

Did you try running this project and tested VXGI? How did it run?

diwot commented 1 year ago

Sorry for the very late answer: I'm quite impressed how well and fast the Voxel Cone Tracing and the screen space effects work. Also the code to achieve these effects seems to be quite readable and not convoluted. The path tracing images you show on the github front page look very good too but I have not managed to get very good results out of path tracing during the short test run I did. I just tested the sponza scene and there path tracing did not look that great. Also the path tracing is really slow but I think this is expected since it does not use the dedicated ray tracing hardware of the GPU. Anyway the project altogether is great.

BoyBaykiller commented 1 year ago

Good to know. The screen space effects are very basic and not optimized at all. While the Path Tracer certainly does not converge fast, it does run at decent speed for me. 75FPS@FullHD on RX 5700 XT, same FPS as using VXGI actually. There is plenty of room for optimizations though. Curious what GPU you used. Anyway thanks!