Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Tiled Resource? Array of Texture3D? Efficient TSDF Volume with less memory footprint

$
0
0
Hey Guys,
 
I have a project in DirectX12 which reconstruct 3D model from a depth sensor 360 scan. The intermediate model is store in a Texture3D as TSDF (truncated sign distance field, each voxel stores a truncated distance to nearest surface) volume, where this volume is updated and rendered(raycast) every frame. And it runs properly.
 
The problem:
The TSDF volume takes huge amount of memory (1024^3 * (8bit + bitsForOtherDatas)), and almost 90% of those voxels stores special value indicate this voxel is empty. So I want to not store most of those useless data.
 
The solution:
One solution I can think of is using spacial data structure with buffer to store TSDF:
The basic idea is to break space into blocks along with a buffer store useful TSD value. For example, for 1024^3 TSDF volume we have 32^3 blocks each contain 32^3 TSDF voxels, and each block store either the offset to the TSD buffer or special value indicate this block is empty. So when new data (voxel TSD value with voxel position) comes in, we first check the block this voxel belongs to, if the block indicate this is empty one, we update this block with offset to the first voxel in this block in the TSD buffer, and then update the corresponding voxel in TSD buffer; if this block has valid offset, we just use this offset to update corresponding voxel in the TSD buffer.
 
This should work as expected. But it forbid me from using Texture3D for voxels which means I cannot use Sampler to do fast trilinear filter during later raycast process.
 
I have thought of using arrays of Texture3D instead of buffer to store TSDF data. Thus each block is storing array index instead of offset. But this means I probably will have to create more than 200 Texture3Ds and need to bound it to my pipeline. Also this means in my shader I will have to dynamic branch through Texture3Ds, and I have no idea what's the impact on performance.
 
Other thing I can think of may help is Tiled Resource, but I never use it before. Is tiled resource a silver bullet for my case?
 
Also are there any other approaches to my situation which are totally different?
 
Thanks
 

Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>