Global Illumination in OpenGL 4.3

fellix

Veteran
di-0ZR3.jpg


Voxel Cone Tracing Global Illumination in OpenGL 4.3
This demo served both as a means to familiarize myself with voxel cone tracing and as a testbed for performance experiments with the voxel storage: plain 3D textures, real-time compressed 3D textures, and 3D textures aligned with the diffuse sample rays were tested. Sparse voxel octrees were not implemented due to time constraints, but would have been nice to have as a baseline reference. Compared to SVO in the context of voxel cone tracing (as opposed to ray casting, where SVO is a clear winner), 3D textures allow for easier filtering, direct lookups without evaluating the octree structure, and potentially better cache and memory bandwidth utilization (depending on cone size and scene density). The clear downside is the space requirement: 3D textures can’t scale to larger scenes or smaller, more detailed voxels. There may be ways to work around this deficiency: sparse textures (GL_AMD_sparse_texture), compression, or hybrid schemes that mix tree structures with 3D textures.
 
I'm currently developing a vct engine based on a modified version of this exact technique (using OpenGL 4.3).

Indirect Diffuse
11jx9qw.jpg


Specular
2qxbztf.jpg


Transparency (vct refraction)
2wrmez5.jpg


Emissive
spvloy.jpg


Combination
2qi22iv.jpg
2w4zplf.jpg


The shadows are also cone traced, which I still need to fix up the artifacts (I think it may be to do with using surface voxelization instead of solid - to avoid self-shadowing artifacts I had to skip the base mip in the cone trace).

No octrees are used yet, the entire scene sits inside a single 64x64x64 3d texture.
I am using "unlimited" bounces by creating a revoxelization feedback loop using a two-pass algorithm (this took a bit of tweaking to get right).

I am also going to make a video soon.
 
Wow!. What is the performance of these techniques?.

According to Cyrill Crassin

http://developer.download.nvidia.co...one-Tracing-Octree-Real-Time-Illumination.pdf

8ms @ 512x512
27ms @ 720p
62ms @ 1080p


on this scene...

GIVoxels+2012-04-11+16-01-43-31.png


He also gave a talk describing his approach:

http://developer.download.nvidia.com/GTC/mp4/en/2012/0515-b-s0610-screen1-edited.mp4


I think UE4 is using this technique as well - heard Tim Sweeney call it "SVOGI" :)
Haven't seen their performance numbers, but the demo videos look silky smooth.
 
Last edited by a moderator:
Wow!. What is the performance of these techniques?.

For my unoptimized scene, which does not use an octree yet, 1024x768 with 1 spotlight:
I run at around 25-34 fps depending on how close I get to the buddha (which is about 500,000 vertices).
With the 100 reflective spheres test it is about 20-24fps and 1000 spheres test it is about 10-14fps.

Btw, I do everything on a clevo laptop i7 2720QM with gtx485m, Windows 7 64-bit. The scene is also run in 64-bit.
 
Probably any sane big developer looking at making a true next-gen engine are tiping their toe into that kind of tech. It is not an easy problem to solve in any way, and all implementations made public so far have shown multiple obstacles to be overcome to make it practical for actual games, but if somebody can pull this off with reasonable quality, man, are they gonna blow gamers away!
 
IMHO this is the future of graphics. Do you guys have any more tips about UE 4 going on with voxels?.

All I can really tell with ue4 at the moment is that they are using an octree structure, with a combination of static and dynamic objects, which is what allows them to render that mountain scene.

They only use 2 bounces, but in my opinion, this is enough. My engine has unlimited bounces by using a feedback loop - but I have faced many problems in calibrating the lighting correctly to avoid some particularly bad artifacts caused by lighting over-accumulation.

I think they also upsample their voxelization pass as an optimization.
 
All I can really tell with ue4 at the moment is that they are using an octree structure, with a combination of static and dynamic objects, which is what allows them to render that mountain scene.

They only use 2 bounces, but in my opinion, this is enough. My engine has unlimited bounces by using a feedback loop - but I have faced many problems in calibrating the lighting correctly to avoid some particularly bad artifacts caused by lighting over-accumulation.

I think they also upsample their voxelization pass as an optimization.

Could it be that they contemplated ditching it if not both consoles had 8 GBs of RAM - i say this for the rumor about UE4 ditching voxels - and that finally they had gone with it after Sony upgraded PS4?. Is this technique so memory intensive or is it more a computing flops issue ( in the demo in a GTX 680 it run at 30fps ) ?. Would HSA and the new computing techniques this offer make it easier?.

PS: Do you see voxel traces in Knack presentation in Sony conference?. ( it is rumored to be a UE4 game and the lighting looked very good ).
 
Last edited by a moderator:
This just looks incredible. Of course you are not the first doing this, but it's been shown off so little it still hasn't faild to amase me everytime I see diferent implementation. Your's is still a little rough around the edges but you are making progress at a great pace. Soon enough it might be quite robust and artifact free.
I find it interesting you went all the way into the voxel thing and ditched shadowmaps entirely. Though that has lead to blocky shadows right now, with coveredge sensitive voxels and a larger penumbra those shadows could look very good. You could even get transparent shadows.
Have you considered implementing multiple voxel cascades as the guys from realtimevoxels.blogspot.com ?
 
This just looks incredible. Of course you are not the first doing this, but it's been shown off so little it still hasn't faild to amase me everytime I see diferent implementation. Your's is still a little rough around the edges but you are making progress at a great pace. Soon enough it might be quite robust and artifact free.
I find it interesting you went all the way into the voxel thing and ditched shadowmaps entirely. Though that has lead to blocky shadows right now, with coveredge sensitive voxels and a larger penumbra those shadows could look very good. You could even get transparent shadows.
Have you considered implementing multiple voxel cascades as the guys from realtimevoxels.blogspot.com ?

Thanks milk, I am hoping that the online community can help me resolve a lot of the issues to improve my engine.
The next thing I want to do is to fix the "hollow" reflections by switching from surface voxelization to solid voxelization.
The shadows are a big issue - my current idea has been to blend the soft penumbra with hard shadow-mapped shadows. The problem I am having is figuring out how to get the furthest part of each shadow to fade out to blend into the cone-traced soft penumbra.
I am also planning on implementing caustics, which I have heard is not too difficult.
 
Back
Top