How to create subsets of the vector of rays in a custom integrator? #615
-
I have implemented a custom integrator in python following the Direct Integrator for a curved cylinder and the curved cylinder is represented as a set of poly-lines. In the integrator for the vector of rays generated from the camera, they are intersected one-by-one with each poly-line to find the closest one and it works but takes time since all the poly-lines are checked. One way to speed it up would be through space partitioning. I have built an octree around the poly-lines and I want to intersect the rays with an octree while traversing it such that the vector of rays are divided as well to only use the rays that go through that octant to get be tested with the child node of the tree. Is it possible to extract a subset of the rays vector to achieve this in the Python environment or do I need to define a custom shape in C++ to handle curved cylinders similar to hair from Mitsuba where a KD-Tree is created? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would add a custom shape that handles a single polyline, and then let OptiX/Embree handle the heavy lifting for the acceleration structure. This indeed need to be implemented in C++. |
Beta Was this translation helpful? Give feedback.
Hi @apoorvkhattar
I would add a custom shape that handles a single polyline, and then let OptiX/Embree handle the heavy lifting for the acceleration structure. This indeed need to be implemented in C++.