Have several raygens in one launch [OptiX 7]

Hello again!

Again I am starting from the meshviewer example. In order to visualize my results I would like to keep the current visual output from the example.

Is there a way in which I can simultaneously start an arbitrary amount of rays from my triangles?
So basically I would have two OptiX Pipelines, one only for visualization. The other one for my thermal simulation.

In this article I read, that while the SBT can contain several rg(), I can only use one per Optix Launch.

If this isn’t easily solvable I would just stop using the visualization and only do the thermal launches.

Thank you for your help.

I’m not sure I understand what the question is. You can’t have two different raygens in one launch. You can, however, start two separate launches simultaneously using two separate pipelines. Or, you could organize a single pipeline to produce two different kinds of data out from a single raygen program. Both of those might be light refactoring but should be pretty easily solvable, I guess.

Keep in mind that raygen is nothing more than an entry point for your OptiX launch, it doesn’t limit how many or what kind of rays you shoot, nor does it even require shooting rays. raygen is just the starting point for a kernel and it’s called once for every “pixel” (thread) in your OptiX launch. This is why it doesn’t make sense to have two raygen programs. If you want two things to happen, you can just do two things in your one raygen program, or launch two separate raygen programs.


David.