<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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?</p>

CC BY-SA 4.0
2022-07-27T06:50:40.963Z
I'm guessing you are using something like Cook et al's https://graphics.pixar.com/library/DistributedRayTracing/   where each ray has a sample time.   Can you make your bboxes 4-D, i.e. xyz & time, and subdivide those with a lot of motion into distinct intervals of time? Perhaps use different length intervals depending on how fast the object is moving.
Simon F
CC BY-SA 4.0
2022-07-27T20:35:47.897Z
thanks for your answer and yes, you guessed well. I'm using stochastic sampling for each ray precisely. Okay, that can be a solution, by creating multiple subframe subdivision, the trick would be to find the right number of subdivisions based on the speed of the moving mesh.
ytrox
<raytracing><blur><motion><grid>
RayTracing grid acceleration slowness using motion blur
ytrox
# RayTracing grid acceleration slowness using motion blur

(Asked by: username_0 on 2022-07-25)

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?

**Tags:** raytracing, blur, motion, grid

> **Comments:**
> **username_1**: I'm guessing you are using something like Cook et al's https://graphics.pixar.com/library/DistributedRayTracing/   where each ray has a sample time.   Can you make your bboxes 4-D, i.e. xyz & time, and subdivide those with a lot of motion into distinct intervals of time? Perhaps use different length intervals depending on how fast the object is moving.  
> **username_0**: thanks for your answer and yes, you guessed well. I'm using stochastic sampling for each ray precisely. Okay, that can be a solution, by creating multiple subframe subdivision, the trick would be to find the right number of subdivisions based on the speed of the moving mesh.  

---

## 0 answers

