I'm adding some motionblur feature to my raytracer and I'm using an uniform grid acceleration scheme (it will be updated to bvh later on) to speed up the rendering time.
My problem is that if I have a strong motion blur the grid will need to intersect with too many objects in every cell and kill the rendering time by a lot.
Essentially what happens is the following: for each triangle mesh I intersect it's bbox with the cells of the uniform grid and if there is an intersection I add that triangle to the intersected cell. Until now everything it's well accelerated, but now if the triangle mesh bbox contains the frame before and the frame after vertex positions (which is necessary to get the proper motion blur) that bbox grows a lot (especially if the mBlur is considerable) making it intersecting with many more cells (from let's say 15 to 200) and the raytrace engine struggles too much to be usable.
So I haven't found a solution to that problem and I'm sure there is one somewhere. What am I doing wrong here? is there any other way to make the motion blur faster?