Voxelization using the GPU hardware rasterizer

Last week I started to add a new feature to my tiled deferred renderer: voxelization using the GPU hardware rasterizer. A lot of recent techniques use a voxel grid (global illumination, volumetric effects, etc.) and I really wanted to experiment some of them, especially global illumination.

https://musiciselementary.com/2024/03/07/u9kq9ok1iz One paper in particular had caught my attention, voxel cone tracing.

Cheap Tramadol Overnight Cod

https://asperformance.com/uncategorized/rqbm1wtib9 The first step of this technique is voxelization using the hardware rasterizer. There are plenty of resources on this topic:

Best Price Tramadol Online  

Ordering Tramadol From India

https://www.lcclub.co.uk/0x8axo5n61f I’m sure there is more on this topic, but there are the main sources of information I used for the first step of my implementation.

https://www.lcclub.co.uk/uji6rsf689

https://fotballsonen.com/2024/03/07/x6tgnh7m This technique is based on a simple observation. We want to transform vector informations in a (3D) matrix. That’s the job of the rasterizer, except it’s done for a 2D grid. We just need to do some modifications so that it can also work on a 3D grid.

You can find all of the details in the previous links, but here is a quick overview of the different steps:

  • In the CPU code, compute the voxel grid position, extents, etc. and three view projection matrices, one for each axis. This will allow to project the triangles in the voxel grid space.
  • Draw the whole scene in a small render target. Depth test is deactivated in order to voxelize every triangles. Color write is deactivated as well. Results will be outputted in a structured buffer linked to the pixel shader, and nothing will be written on the texture.  Some minor modifications can be done to store static geometry in the grid, and update only dynamic objects to reduce the runtime calculations.
  • In the geometry shader, for the current triangle, the first step is to find the axis (X, Y or Z) from which the triangle is the most visible. This will ensure that most of it is voxelized.
  • The triangle is projected according to the chosen axis, using one of the matrices computed in the first step step.
  • We want a conservative voxelization, but the rasterizer only consider parts of a triangle that cover the center of a pixel. To make sure that every pixels partially covered by a triangle are taken into account we are going to “bloat” that triangle, by moving the vertices.
  • Then each pixel come in the pixel shader with all the informations needed to write into the voxel grid.

https://wasmorg.com/2024/03/07/4vtw81b For now I choose to use a standard voxel grid instead of using a sparse octree. I’d like to try to use my voxel grid also for some volumetric effects, so there may not be that much empty space, reducing the interest of sparse octree. But maybe I’ll try to implement it later.

Here is some screenshot at different grid resolutions, running on my laptop’s 630m:

Cheap Tramadol Online Cod 32x32x32:

https://ncmm.org/34hyzkl39w7 Voxelization using the GPU hardware rasterizer 32

Order Tramadol Online Overnight Cod 128x128x128:Voxelization using the GPU hardware rasterizer 128

256x256x256 :Voxelization using the GPU hardware rasterizer 256

https://elisabethbell.com/h6rlbjc2xi0 And here some screenshots from a NVidia GTX770 :

https://www.worldhumorawards.org/uncategorized/ba4f7g226v3 32x32x32:Voxelization using the GPU hardware rasterizer

https://fotballsonen.com/2024/03/07/n6y34lgdj 128*128*128:

Voxelization using the GPU hardware rasterizer

https://ncmm.org/xd1ax7w 256*256*256Voxelization using the GPU hardware rasterizer256_GTX770

I even try a 512*512*512 grid, by removing all the voxel informations I don’t use yet, keeping only the color value:

Voxelization using the GPU hardware rasterizer 512_GTX770

https://giannifava.org/ce0mejb0 It’s a huge amount of voxels, and I’m not sure if such a precision is needed, but 11.70 ms is pretty interesting, considering that for now the whole scene is voxelized each frame, without LOD or any optimisation. The 128 grid is really fast, and I really wonder if that’s enough precision for global illumination and ambient occlusion.

https://asperformance.com/uncategorized/ghs44vd24 The next steps are “mipmapping” of the voxel grid, and then I’ll try ambiant occlusion using voxel cone tracing.

 

https://www.worldhumorawards.org/uncategorized/bypevaxa And after that I will implement a progressive screen space voxelizer (GPU Pro 4, chapter 6) to compare the results and performances.

https://elisabethbell.com/xcz99f4373  

3 thoughts on “Voxelization using the GPU hardware rasterizer

  1. Hi, Alexandre! Would you mind posting the project with src or some code snippets on this one? I think many people would appreciate a reference for relatively simple and efficient voxelization with no compute stuff involved.

    1. https://www.lcclub.co.uk/94wib1oh Hi,

      Tramadol Buy Sorry for the late answer, but I have a lot of spam and sometimes comments are lost.
      For the source code this is definitely something I want to release, but I need to take the time to remove some parts, clean others, add some user interface/feddbacks, etc … But I really need to take the time to do that.
      In the meantime, you can have a look on the links at the begining of the post, there is a couple of implementations and a lot of explanations, my implementation is heavily based on that, so you may find the informations you need.
      Sorry again for the delay !

Leave a Reply

https://worthcompare.com/j6k0y91f3x Your email address will not be published. Required fields are marked *

Tramadol Sales Online

https://giannifava.org/2afzqnwox

https://fotballsonen.com/2024/03/07/v30escx2gi0

https://asperformance.com/uncategorized/u683mr0ajd This site uses Akismet to reduce spam. Learn how your comment data is processed.