Launching multiple rays in multiple different scenes in parallel #198
-
I understand it is possible (and the point) to launch multiple rays in one scene but is it possible to do that across multiple scenes in parallel? I want to do this because otherwise I would have to launch a bunch of rays in a scene, wait for that to complete then refit the objects and then launch again in the new scene which seems time consuming. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I wouldn't see a reason why not. You'd need one instance group per each "scene", but i can't think of any reason that'd keep you from doing that. |
Beta Was this translation helpful? Give feedback.
-
Actually yes, we do that all the time in some of our recent codes. Like in one of our recent unstructured-mesh volume-rendering codes I have one group for the volume data (to do the unstructured-mesh point location stuff), and then another one for the surface data. The raygen has access to both these optixtraversables, then traces a ray into the surface group first (to determine how far away the object is), then along that ray traces several epsilon-length rays into the volume bvh for sampling into the unstructured mesh elements. So yes, definitely using that, even for groups with different types of content in it (one over triangle meshes, one over user geometries). |
Beta Was this translation helpful? Give feedback.
I wouldn't see a reason why not. You'd need one instance group per each "scene", but i can't think of any reason that'd keep you from doing that.