Rendering 3D+t CFD data using GPU

Hi, I’m new to VTK, and had a question about using it to render some volumetric data with a GPU.

I’ve written a fluid sim using CUDA C/C++, and now I’m in the stage of the project where I need to visualize the output. Each timestep calculates values for the fluid variables on a uniform 304x304x592 grid, so I’m looking to render this with a GPU as there will be hundreds of timesteps.

Is there documentation somewhere that breaks down how to do this? I’ve found the User’s Guide, and The VTK Book, but they seem a little old, and aimed at more of a complete overview.

Here is an example: https://examples.vtk.org/site/Cxx/Medical/MedicalDemo4/

There are many other example of volume rendering in the examples if needed.

Thanks for the response. I’ve previously looked at, and run some of the examples. Maybe it’s because of my lack of experience with VTK, but this example doesn’t seem to address what I need.

I have raw .dat files representing the values at each grid-point, and I’m looking for a tutorial on how to take these files, and build a visualization pipeline with a rendering engine that uses the GPU in order to visualize the evolution of the flow.

in VTK this is called an vtkImageData, you should read the file and put the values in: VTK: vtkImageData Class Reference

Then you can just use classic volume rendering code.

1 Like

I understand, thank you for the direction. I had a final question about the rendering engine, how do I ensure the work to render the graphics is offloaded to the GPU? I have a lot of data, and want to be able to view the evolution of the flow with minimal latency.