0
\$\begingroup\$

As the question states, is there a way to apply motion blur to UI elements that are being animated in Unity?

I have an animation sequence that mostly consists of the UI text. So what I am trying to achieve is animating the text to rush in to scene like it appears from one side of the screen and it goes to a given position. While text is moving I would like it to have motion blur so you get that effect of it rushing in to scene. I did think about blurring it by changing a shader property but I would like to avoid creating a bunch of material presets just for this, plus I am not sure how to animate shader property.

\$\endgroup\$
5
  • \$\begingroup\$ I think you might need to fake this with shader tricks and smear quads, since the UI won't generate motion vectors for the regular motion blur approaches. You could do the classic afterimage style (display n previous frames at lower opacity stacked on the current one), though each individual image would be crisp so it's not as convincing for fast motion unless the frame rate is very high. Can you give us an idea of the look you're trying to achieve, and if there's anything behind the UI that either needs to be included or excluded from blur? Then we can tailor solutions to that use case. \$\endgroup\$
    – DMGregory
    Dec 20, 2022 at 15:20
  • \$\begingroup\$ I edited the question so it is more clear. \$\endgroup\$
    – Ivan
    Dec 20, 2022 at 18:19
  • \$\begingroup\$ Ah, yeah, I'd say a shader is a good way to achieve that. With TextMeshPro text as distance fields, you could get high-quality blur cheaply. You could smuggle thr blur amount in as a colour/alpha value, which would even let you selectively blur individual words/letters. \$\endgroup\$
    – DMGregory
    Dec 20, 2022 at 22:11
  • \$\begingroup\$ Would I use the default shader or? Also animation window doesn't allowed me to animate tmp shader property. \$\endgroup\$
    – Ivan
    Dec 21, 2022 at 7:55
  • \$\begingroup\$ I don't know, I've never done it, I'm just speculating in a comment to give potential directions that might lead to an answer. \$\endgroup\$
    – DMGregory
    Dec 21, 2022 at 13:51

0

You must log in to answer this question.

Browse other questions tagged .