My raytracer supports a wide variety of objects. To intersect them, I use the standard technique of transforming rays into object-space. This works fantastically until I add motion blur.
I model motion blur as a sequence of transforms (to simplify discussion, let's say exactly two) instead of one. My approach is to take the inverse transform of the ray at both keyframes and lerp the positions/directions.
This seems to work fine for translations, but it breaks down for rotations. E.g. here are two triangles undergoing 30 and 90 degree rotations:
(4 samples, MN reconstruction, the red samples came from near the two keyframes)
At the corners, I would expect the lerped samples to lie on a straight line between the the two vertices. Instead, they bulge outward. This is wrong. In more interesting scenes with more interesting transformations, it causes a variety of failure modes. E.g. here's a propeller undergoing a 45 rotation:
(100 samples, normals visualized)
Some problems are due to the BVH breaking (it assumes the extrema of objects lie at keyframes), but even a brute force render is incorrect.
I can fix all this by doing forward transforms only (transform object, not the ray), but this only works for objects where that is possible (only triangles, really).
How can I make my raytracer produce linear approximations to transformation (especially rotation) by transforming rays, not objects?