My group does research on physically-accurate photon Monte Carlo simulations for biomedical optics and tissue imaging. We’ve written open-source CUDA and OpenCL codes (http://mcx.space, GitHub - fangq/mcx: Monte Carlo eXtreme (MCX) - GPU-accelerated photon transport simulator) to perform fast 3D ray-tracings of photon packets in voxelated and tetrahedral mesh spaces, and the code outputs 3D accumulated light intensity buffers as well as individual photon data, if captured by a detector.
We are currently considering re-implementing our CUDA code in OptiX to take advantage some of the hardware resources, such as RT cores. I just did a quick glimpse on some of the example codes and would like to ask two basic questions to plan on this project:
-
The rays in my simulation not only change trajectories when hitting a surface, but perform random scattering along their paths, following known distributions in scattering length & angles. I am wondering which program handles scattering between objects? can one set a distribution of scattering lengths and scattering phase functions?
-
My ray-tracer needs to output a 3D light intensity array (can be 4D if time-resolved solution is needed), by accumulating photon energy losses along its path. I know OptiX supports customized per-ray data payload, so I suppose I can add a “weight” variable to track the remaining energy of the photon packet, but I am wondering, which program I should tap in to accumulate the energy loss in the voxels/tetrahedra along the path of a photon?
I am sorry that my reading on OptiX is very limited as of now, forgive me if these are too basic.
I am also appreciate any examples that are related/close to my application. thanks