Page MenuHome

Cycles: Improved robustness of hair motion blur.

Authored by Stefan Werner (swerner) on Sep 14 2018, 4:20 PM.



In some instances, the number of control vertices of a hair could change mid-frame.
Cycles would then be unable to calculate proper motion blur for those hairs. This adds
interpolated CVs to fill in for the missing data. While this will not necessarily result in
a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it.

Diff Detail

rB Blender

Event Timeline

Unfortunately, I have no .blend file to demonstrate this bug, at least not one that I could legally share.

It did arise though in the production of Next Gen that we'd see individual frames in which hair motion was absent. Since the camera and the character were both moving fast, this led to the hair showing up as long streaks as the camera shot past it. It turns out that Blender's hair simulation does not guarantee that a given hair has a constant number of CVs through time, it can actually change. Since Cycles' motion blur requires a constant number of CVs for the duration of a frame, this led to motion blur dropping out in rare cases.

This patch then synthesises a new hair curve that matches the CVs count of the original (center frame) curve.

A future improvement would be to use spline interpolation instead of linear interpolation for the new hair curves to better approximate its original shape.

  • Fixed whitespace.

One thing which seems weirs is that mismatch in key points will force motion blur to be enabled. Not sure this is an issue in production though, and logic can be tweak later anyway.

@Brecht Van Lommel (brecht), this patch actually solves issue with the opening shot of our movie. So i am voting for getting this fix in ;)


To be less prone to precision issues is better to do step = i * step_size.

This revision is now accepted and ready to land.Nov 19 2018, 5:06 PM

Sure, I have no objection to this.

This revision was automatically updated to reflect the committed changes.
Stefan Werner (swerner) marked an inline comment as done.Nov 23 2018, 1:25 PM