Hello there!
I’ve been orienting myself with OptiX, debating whether it’s appropriate to explore using in my work. I am asking if the following application would see a substantial increase using OptiX vs CUDA.
Presently I use CUDA to do the following program, which is very common in medical physics and radiation transport methods. It’s to calculate a line integral along a ray, where the summed values are sampled from a 3D Voxellized dataset
With parameter N_Steps, a Voxelized 3D data set, and N Rays
For each Ray (R_i)
integral[ray_i] = 0
For i to N_Steps
Calculate position = ray_i_start + (i / N_Steps) * (ray_i_end - ray_i_start)
value = sampling_fuction(voxellized_dataset, position)
integral[ray_i] += value * distance(ray_i_start, ray_i_end) / N_Steps
return integral[ray_i]
Where the sampling function can be trilinear or tricubic interpolation. Presently I do this using CUDA, and either perform the trilinear interpolation manually, or use a 3D texture for the voxellized data and perform a texture look up, tex3D(data, position). This is calculated using one thread for each ray.
Would OptiX lend itself to a substantial speed improvement over a pure CUDA implementation? I have seen work where the 3D data is a triangular mesh, and there is a definite speed up, as I understand OptiX is specifically designed for such applications. However for volumetric voxellized 3D data, I haven’t found much to indicate whether OptiX would be worth pursuing.
I would be very interested in learning whether a speed increase would be expected, and what hardware features OptiX provides vs CUDA that give that speed increase. For example, the texture lookup functions in CUDA typically give me 2-3x speed improvement over doing the trilinear interpolation manually (with some precision cost).