My application creates the scene objects on demand. That is, there are AABBs and if a ray intersects one, the geometry of the object is created. It takes much time. Sometimes it requires more than a minute to render a frame. I wonder if there are some ways to optimize it. Does OptiX have something for it? Maybe it is impossible? I thought about allocation of memory for an array and storing the polygons there. But it seems to be slower than the procedural generation if the hardware is not used. Also, there is a question how to free the allocated memory for an object if no ray hits it. Thank you in advance.