Thank you for the timely response! I have a heart animation, which happens to be a sequence of non-uniformly deformed meshes. Fortunately, the topology is preserved (i.e., vertex count, half-edge structure), which from what I understood means that I could give motion blur a try. That is very helpful.
Did I understand it right that a single acceleration structure is built over the entirety of all meshes that comprise the motion? It is likely that I may also have animation sequences that similarly can’t be expressed in terms of affine transforms and on top of that have large variations in the dimensions of the bounding boxes of the individual meshes, which may result in a large number of false intersections for certain key-frames.
Which is why I was wondering whether in certain cases I could simply exchange geometry children nodes (key-frame meshes) of, let’s say, a certain optix::Group animated_group. The assumption would be that a child geometry node has its fine acceleration structure built once, and then when the exchange takes place, we simply update bbox of animated_group and rebuild (refit?) coarse acceleration structure of the parent node of animated_group. And then maybe a trade-off between rebuilding acceleration structures and reducing the number of false intersections may end up in favor of the former approach. Conceptually:
optix::Group animated_group = context->createGroup();
animated_group→setChildCount(0); // its one child node will keep getting changed
top_group→addChild(animatedgroup); // top group created earlier
animatedgroup->setChild(some_geometry_group); // some_geometry_group - holds key-frame mesh and has its acc structure built beforehand
animatedgroup->getAcceleration()->markDirty(); // update bbox of animatedgroup
top_group->getAcceleration()->markDirty(); // rebuild coarse structure taking updated bbox of animatedgroup into account
The question is, what happens when I exchange one child node (some_geometry_group) of animated_group with another? Does it get unloaded from the device (its fine acceleration structure gets destroyed, I presume)?