Text with glow effect

Right now for my game, I am using new Unity UI. I want to display my text some thing like following way :


At present I can able to display text normally but cant able to find a way to display some sort of glow around it. Please give me some suggestion in this. Thanks for your time and efforts.

Just in case anyone else was having troubles with this:

I don’t know if what I found existed back when this question was asked, but I found a script that comes with Unity, called “Outline”, which gives text a kind of glow or halo effect. It’s found under Component > UI > Effects > Outline. Set the colour of the effect, and then set the “Effect Distance” X and Y properties of the script to how much you want the effect to radiate out from the text.

It may not give the best effect, but it worked well for what I needed.

I found that the most simple way to do this is go just use a image instead of a text element

here is a link to a glowing text generator

I found this one the best

The glow effect illustrated in the image is typically achieved by rendering the stuff that glows by itself, bluring that texture one or multiple iterations, taking the luma component of the blurred texture and multiply the luma by the glow color or gradient map (color/tone mapping) and then add the resulting color to the original image. This is similar, but not equivalent, to what the Unity Image Effect Bloom does.

If you want to do something like that to UI text elements, you could (quick and dirty solution) I guess setup two overlapping text objects that are equivalent. Use white color for the first and total transparent color on the second with red outline and use a blur/glow/bloom filter/shader with addivitive blending on the outline to achieve something similar to what you posted as an image. Something like this is required if you want the red to bleed into both the white area and to the background.

Add a bunch of outlines at lower and lower opacities.

There’s no easy way to do that. The only things I found for this are:

1 - Make a custom font with the glow effect and import it into Unity. You can setup custom fonts based on an image with all the characters (it’s what Unity does when you import a new font, but you have to do the same manually). Or…

2 - Write a shader that adds the effect to the text. Or…

3 - Write some script that draws the effect at runtime in an image file and put that image behind the text. Or…

4 - Just make some images of the texts you want with the glow effect already on them, and use images instead of text.

If you don’t mind spending a little money you might take a look at TextMesh Pro. It’s pretty high quality and lots of good text related features. It has good support and they keep up with Unity updates pretty quickly.

Maybe adding more than one outline components to a text objects and tinkering with their opacity values could help. You could even write a script for them that changes the alpha value so you get an animated glow. It won’t brighten up the font’s body, though you could also play with it’s color values in script. Work, but a fun one at least :slight_smile: