I’m trying to create a soft drop shadow with falloff for UMG or Common UI Text. The built-in shadow only supports a flat offset, so I tried using an outline material instead.
My approach was to use a Font Material (User Interface domain, Translucent blend), sample the font alpha via a FontSample node, and apply a falloff like pow(1 - alpha, falloffPower) to fade the opacity the further the pixel is from the text. You can see my setup in the attached screenshot. However:
- The FontSample node only works properly with RobotoDistanceField.
- Even then, the alpha seems mapped incorrectly.
-> Potentially because the font in UMG is Roboto? I could not select RobotoDistanceField there.
- With any other font, it doesn’t render correctly at all.
So I’d like to ask:
- Why is the Font Sampler not working correctly?
- How was RobotoDistanceField made?
- Is there any way to make this work with any other font?
- And more generally, what’s the recommended way to achieve soft, falloff-based shadows for UMG or Common UI Text?