-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Per-object Motion Blur Pass example #14510
Conversation
This is very cool, but I feel like we might have to put an epilepsy warning on the example! 😆 |
Ha I kinda figured the flying spheres might be be a bit much. I wanted show impact on something a bit further away and fast moving but the character and knots probably do a fine job of showing the effect. |
I was expecting something like this. I'm not really seeing that here -- unless I'm missing something... |
@WestLangley The example you posted looks like it just handles camera motion blur. This example effect applies motion blur per-object even if the camera isn't moving. It handles camera motion blur, as well, though. It can be pretty subtle but it helps blend fast moving objects between frames -- it's pretty common in games now. The effect is easier to see if you stop the animation: |
@gkjohnson Maybe it is that I would expect the silhouettes to be blurred... Tip: avoid calling |
@WestLangley I added an option that lets you interpolate the geometry between the current frame and the previous frame. That coupled with bloating the geometry does allow for sampling outside the silhouette of the geometry, but of course there are some artifacts: There are other approaches to blurring the silhouette but those seem to just have different artifacts and are more intensive.
Thanks! I missed the color clones. Unfortunately these material clones can't be removed but are only called when new geometry is encountered. And due to some issues with |
@gkjohnson I was looking for this has some time for threejs, thanks! |
hey, I used this pass in a project, it is really awesome!! |
I'm gonna close this since it's a bit out of date now and it doesn't seem there's interest in merging it here -- there's a slightly more up to date version over here for those who are interested in checking it out: https://github.com/gkjohnson/threejs-sandbox/tree/master/motionBlurPass It has a couple fixes and new features including using noise in the blur so you can get by with fewer samples: |
There is interest, but the whole transition to es modules, pointer events, ... really made me scaring of adding more code to the repo that we'd have to convert 😕 |
Definitely understand. The code was getting out of date as I worked on it in another repo so I figured it would be best to point people to the latest stuff. Perhaps in the future this can be reintroduced. There are some other PRs / issues in the pipe for three.js that would make this a more viable effect, anyway. |
Add a new per-object motion blur postprocessing pass and an associated example!
Here's a demo.
The motion blur effect works for camera movement, object position / rotation / scale transform updates, and skinned animation movement. It does not work with displacement map animation or morph targets.
Here's a description of the options. Most options can be overridden per object: