Page MenuHome

EEVEE: Motion Blur: Add accumulation motion blur for better precision
ClosedPublic

Authored by Clément Foucault (fclem) on Jun 19 2020, 5:44 PM.
Tags
None
Tokens
"Baby Tequila" token, awarded by lopoIsaac."Love" token, awarded by Firepal64."Love" token, awarded by EAW."Love" token, awarded by szap."Love" token, awarded by 295032."Love" token, awarded by dbystedt."Love" token, awarded by Zino."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by brecht.

Details

Summary

This revisit the render pipeline to support time slicing for better motion
blur.

We support accumulation with or without the Post-process motion blur.

If using the post-process, we reuse last step next motion data to avoid
another scene reevaluation.

This also adds support for hair motion blur which is handled in a similar
way as mesh motion blur.

The total number of samples is distributed evenly accross all timesteps to
avoid sampling weighting issues. For this reason, the sample count is
(internally) rounded up to the next multiple of the step count.

Only FX Motion BLur:

FX Motion Blur + 4 time steps:

FX Motion Blur + 32 time steps:

Diff Detail

Repository
rB Blender
Branch
eevee-motionblur-timestep (branched from master)
Build Status
Buildable 8641
Build 8641: arc lint + arc unit

Event Timeline

Clément Foucault (fclem) requested review of this revision.Jun 19 2020, 5:44 PM
Clément Foucault (fclem) created this revision.
Dalai Felinto (dfelinto) requested changes to this revision.Jun 22 2020, 4:31 PM

The patch as it is is causing the render to be too dark.

The file I tested was: //scenes/light/coffee_run.B.light.02-apartment.blend:

  • Render Size 50%
  • Enable Motion-Blur
  • Shutter 0.5

Without motion blur:

Without the patch:

With the patch:

This revision now requires changes to proceed.Jun 22 2020, 4:31 PM
source/blender/blenloader/intern/versioning_290.c
288

Best check specific for this attribute.

source/blender/blenloader/intern/versioning_290.c
288

Ah right this was because I thought it might be committed with part 1.

  • Fix issue with SSS in large scenes.
  • Merge branch 'master' into eevee-motionblur-timestep

Codewise everything seems clear and fits in current architecture. Optimization hacks have been documented. So only want to do a functional test.

source/blender/draw/engines/eevee/eevee_private.h
598

Consider using a typedef enum. better for debugging...

I checked with the cycles motion blur scene. but I do see some samples to be more visible than others. Could be a limitation of the algorithm or an error.

1 Motion Blur Sample

2 Motion Blur Sample

4 Motion Blur Sample

8 Motion Blur Sample

16 Motion Blur Sample

Overscan does not work, but that is related to T78073: EEVEE new motion blur and overscan produce wrong render

When using cycles motion blur test scene with 256 or more samples it crashes. Seems like the Python post frame handler with factory startup it renders fine. I think it isn't related to this patch.

@Jeroen Bakker (jbakker) this test file has a downside, it has prebaked animation. So sampling the animation at higher frequency reveal the stepping subframe motion caused by animation interpolation (check f-curves and you will see what I mean).

Ah yes I see. Basically I don't have any comments except the few mentioned in the code.

This revision is now accepted and ready to land.Jun 23 2020, 1:56 PM