SVOGI Implementation Details

Started by
121 comments, last by Josh Klint 1 year, 7 months ago

Josh Klint said:
This is probably caused by light bouncing off the road, onto the undercarriage, and back. What's a good way to approximate this without running a million light bounces? I'm thinking some kind of weighted average, like the average of the top 50% or even calculate a standard deviation?

Incorrect.

Multiple bounce will be minimal for few factors:

  • Albedo of the road is way too low (it's grey/dark)
  • Albedo of the car is extremely low (it's black), it's reflectance is high but that will end up in specular indirect light (reflected, not diffusely reflected) … although to be fair proper simulation of car paint is somewhat hard (multi-layered materials somewhat works)
  • If first diffuse reflection from sun gets reduced by factor of 90% (road albedo), and another by factor of 99% (black car albedo) - the 2nd bounce of that diffuse lighting is going to have an impact of less than 0.1%

What has the highest contribution there is direct sunlight light scattered through atmosphere towards that point. This is sometimes simulated with ‘Ambient occlusion’ (keep in mind, in real world physics ambient occlusion does NOT exist, it's a product of indirect light from atmosphere - yet due to atmosphere being large, it is often simulated by large skydome light, at which it can be somewhat approximated by ambient occlusion (but bear in mind light color of bounce with ambient occlusion is going to be incorrect!).

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Advertisement

@programmer71 I've started with GPU voxelization right away. I've never done the CPU voxelization at all, because it didn't have any sense performance-wise to me.

Here is a screenshot with profiler from my editor (which is WYSIWYG, voxelization is done every frame):

This means, I voxelize Crytek Sponza (and few other models in it - like skinned character, animated box, etc.) every frame. This takes 5.71 ms (which is the most time consuming operation) - this includes voxelization, light/shadow injection … mip mapping voxels is separate - about 2.9 ms. Calculation of global illumination, reflection and ambient occlusion through cone tracing are also expensive (3.18 ms, 1.74 ms and 0.19 ms). This is done at 4K resolution (no MSAA/SSAA).

Timing is done for on my custom game engine running on Direct3D12, running on Ryzen 9 3900X CPU and Radeon 6800 GPU (so higher end machine). Voxelization is done (in this case) into volumes with total size of 512x512x512.

There is plenty space to optimize this, but it should give you an idea about performance - the selected scene configuration is for single directional light, using 4 tiles in virtual shadow map, GI performs single bounce GI. If you're interesting in how any buffer looks like or source code, I can provide some examples.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Vilem Otte said:

@programmer71 I've started with GPU voxelization right away. I've never done the CPU voxelization at all, because it didn't have any sense performance-wise to me.

Here is a screenshot with profiler from my editor (which is WYSIWYG, voxelization is done every frame):

This means, I voxelize Crytek Sponza (and few other models in it - like skinned character, animated box, etc.) every frame. This takes 5.71 ms (which is the most time consuming operation) - this includes voxelization, light/shadow injection … mip mapping voxels is separate - about 2.9 ms. Calculation of global illumination, reflection and ambient occlusion through cone tracing are also expensive (3.18 ms, 1.74 ms and 0.19 ms). This is done at 4K resolution (no MSAA/SSAA).

Timing is done for on my custom game engine running on Direct3D12, running on Ryzen 9 3900X CPU and Radeon 6800 GPU (so higher end machine). Voxelization is done (in this case) into volumes with total size of 512x512x512.

There is plenty space to optimize this, but it should give you an idea about performance - the selected scene configuration is for single directional light, using 4 tiles in virtual shadow map, GI performs single bounce GI. If you're interesting in how any buffer looks like or source code, I can provide some examples.

Thanks for your offer,probably there will be a time where your source code would help me a lot, but i'd like to understand each single step, there is something i'd like to ask, let's pretend i have a large map, divided into a grid and each grid contatins geometry , I should voxelize all grids entering the view frustum , even cells which would be totaly covered, wouldn't this waste gpu cycles, or do you perform a form of occlusion culling, and a further question, why don't you voxelize a scene in the cpu offline and send onlt visible voxels contained in each cell ?

In the photo below I created a little “cave”. You can see the spot underneath the entrance of the cave is still very bright, even though 50% of the “samples” are blocked: Why?

10x Faster Performance for VR: www.ultraengine.com

Measuring brightness with Photoshop, results are not that surprising:

The average of A and C would be 36. And you wonder why we get more than that.
But this does not give us a reference. Photo sensors, color profiles, gamma curves, auto exposure… photos don't help us.
You're much better off by making a reference path tracer, which is little work if you're fine with simple diffuse material.
Only then you could make such measurements in a proper linear color space.

Progress…

10x Faster Performance for VR: www.ultraengine.com

10x Faster Performance for VR: www.ultraengine.com

Keep up the good work , one day i want to jump into it

10x Faster Performance for VR: www.ultraengine.com

I see that you claim 10x faster performance, have you tried your engine against ue5 yet ?

This topic is closed to new replies.

Advertisement