Voxel Cone Tracing Experiment - Part 2 Progress

Started by
53 comments, last by FreneticPonE 10 years, 3 months ago

The main problem with just doing cells is that an always present (and temporally stable) specular term is part of the thing that really sells GI to begin with.

As I understand it, the diffuse part is actually the costly one because of the large amount of cones you need to trace per pixel in the default solution. So for rather sharp glossy highlights you could keep tracing them per pixel without the intermediate accumulation step into the SH-volume. But that's of course just the theory.

Actually, it's the specular that's the most costly. This requires the most samples, especially for the high gloss, as you need to keep tracing through the octree/texture until you hit the right mip level or even the right voxel. Since it's all mipmapped diffuse may need several traces, but relatively few samples as you only need to trace a few steps into the tree.

But I hadn't thought of doing diffuse as a cell structure while keeping specular per pixel. It might not be a huge savings but it would be a savings.

Advertisement


Sounds like you hit your video cards memory limit and the drivers are now using system memory - which is also why your frame rate tanks. Task Manager only shows system memory usage, not the memory internal to the video card.

Good point. So it turns out that it was to do with my voxel visualizer that was causing the massive increase in system ram. I've turned that off and it doesn't seem to have any effect on framerate.

Looking at gpu ram, it makes sense now - 64 voxel depth (with all other resources) uses up about 750mb. This increases to 1.8gb when using 512 voxel depth.

Now I haven't posted for a while on my progress with this engine - that's because I've been too busy at work and have put a halt to any development. However, now I'm willing to startup again during the holidays.

My current scene is only very small and I am planning to extend it efficiently to a larger world. I want to stay away from octrees for now and cascades are out of the question due to the many artifacts that it results in.

My idea is a substitute for partially resident textures on video cards that do not support it yet. I have found that the optimal resolution is 64x64x64 voxels and that there is little difference in quality between this and 32x32x32. I want to create a grid of voxel textures in a way where the camera will be located in a 64x64x64 voxel texture which is surrounded by 32x32x32 voxel textures at every dimension. When the camera travels outside of that voxel volume, the next volume will become 64x64x64 resolution and the previous one will become 32x32x32. I'm hoping that i can trace cones into multiple voxel textures by using some sort of offset.

Has anyone tried something similar before?

I also don't use octtrees, rather my own very specific implementation that works the same way, but only for culling.

First I check which direction the camera is pointing towards the most, then I cut off planes of voxels I don't need to render. After that It's (Octtree-like) recursive frustum tests.

The memory footprint is kind of high, but I don't mind. My card has 2gb vid mem, which I think should be the minimum :P

If you need to extend the size, the only thing that really helps is more video memory. I don't think there is a way to get high fps by modifying alot of memory mid-frame.

You also have to consider the fact that once things "really get going," you don't have the luxury of mostly homogenous volumes anymore.

Not sure how you can do what you want to there, since you have to rebuild textures? Do you have any collision with the world data?

I don't really do the same thing you do.. With 80x32x80 sectors i get 72fps (144/2) when I reflect the world for my ocean shader. Where one sector is 16x8x16 voxels.

I also don't have any kind of AA, yet. I had to forego MSAA because it required way too much effort, for too little gain.

Do you separate your processes into the smallest possible shaders? If done right it can increase your FPS alot, overall. If a single shader does too much it may just become painfully slow, especially on hardware you and I aren't testing on.

Do you produce depth textures? If you don't need the alpha component you can just write the linear depth into .a in your color texture, and from that you can skip a texture read in many places.

Honestly, if I'm understanding what you want to do correctly, it just sounds a lot like cascades. Besides decreased... texel resolution of the voxels, voxel resolution to world space, you get the idea. Anyway, that should be something that's always done, you're going to need less resolution the farther away you go from origin anyway, even to approximate high frequency reflections this should true enough. But as you said, there' trouble with cascade transitions.

I'm not sure I've heard of anyone doing as such though. And if you don't find anything to voxelize just clearing the entire voxel texture to a format of "empty/full" should save a lot of memory. You dont' want to waste a lot of memory on completely empty space.

This topic is closed to new replies.

Advertisement