I have a Optix Raycasting renderer which loads and renders VTK files. For a single static model this works fine.
But now my dataset consists of multiple timesteps which I want to display in a animated fashion.
Each couple of frames or seconds the displayed model has to be switched out with the next one. If possible I want to refrain from rebuilding the acceleration structure each time this happens.
So my question: Can I just load all models at once, place them in the global acceleration structure and then just switch all off except the one currently displayed. My hope is that this would be more efficient.
Edit 1: I have now build a variant in which I create optix::Acceleration and optix::Group for each of the timesteps separate and each time the active timestep changes I just
_context["top_object"]->set(mesh_group[timestep]);
But each this call takes nearly half a second. I think optix does quite some work in the background when I switch this object out. This delay is not acceptable for me as it makes the playback of my "animation" stutter.
Has anyone a idea how to do this more efficient?