Sign in to follow this  
Tangletail

How do you efficiently Voxelize a scene?

Recommended Posts

This is a really difficult thing to figure out. I know that Nvidia had made mention of a very neat technique that does it on a per triangle basis.

Geometry buffer, Determine the dominant axis.
Fragment Buffer, Render the depth of the fragment.

 

 

But an entire scene is loaded with triangles. And rendering it to a single voxel texture seems like that there would be a lot of overdraw.

Edited by Tangletail

Share this post


Link to post
Share on other sites

Original paper: https://research.nvidia.com/publication/octree-based-sparse-voxelization-using-gpu-hardware-rasterizer

 


But an entire scene is loaded with triangles. And rendering it to a single voxel texture seems like that there would be a lot of overdraw.

There is little overdraw per 3D voxel compared to a 2D pixel, but you still need to handle it.

For AO you can just set a single bit per voxel with atomic or.

For GI you need to sum all fragments per voxel and increment a counter for the final average. To use atomics you need to convert colors to integer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this