Raycasting sparse TSDF

Hi Developers

I am developing a real-time application where I want to perform raycasting on a block-sparse truncated signed distance field (TSDF). For this purpose my though is to use the multi-volume ray cast mapper, where each block can be represented by a vtkImageData. On every update, I will then update on few of the vtkImageData.

Question: Do we shaders that can be used for ray-casting a truncated signed distance field. I will get the colors from the resulting voxel? Do we have an example of ray-casting a TSDF?

Question: Ultimately, I will need to update/modify the vtkGPUVolumeRayCastMapper to accept meshes and update the TSDF prior to rendering. For this my plan is to re-introduce a compute shader pass. I did this a few years ago.

Question: Is there anyone working on either of the above two challenges?

Thanks in advance
Jens Munk

There is nothing out of the box for TSDF volumes. But given that the volume shader is dynamically composed by the volume mapper, you should be able to modify the scalar query to be a computed value from the TSDF.

Note that there will be additional areas like gradient computation, etc. that would need to be modified.

1 Like

Thanks. I will try out modifying the shader and with a single dense volume for starting. It is relatively easy to modify shader. A test volume. Next step will be figuring out how to incorporate a compute shader and update a volume owned by the mapper.

I made a small glfw program for testing a shader rendering a sphere. Figuring out exactly what parts to replace will take some time. Any interest in the community for raycasting og TSDF? Considering also to supporting some implicit primitives.