Sprite edge glow

Hi everyone!

So I’ve been wondering if there’s a way to do something like that for mobile:

The idea is that I want to have some sort of glow, or sparks sliding on the edge of the sprite.
BTW this sprite is just an example and it can differ in shape and size.
I had a thought to simply do it in After Effects but in that case it won’t be that easy to modify and the sprite sheet would be quite big and heavy for mobile platforms.

I personally don’t even know how to approach something like that so any suggestions would be much appreciated!

Thank you!

1 Like

Sounds like you might be able to solve this through some kind of post-process solutions, but not sure if this’ll work well on mobile.

A solution I’d look into, which may be a good suggestion is to make a secondary mesh/sprite which you overlay behind your foreground sprite, whatever size/shape you can just duplicate the sprite that it uses and scale x1.1/1.2. However you may need different UV setup, which you can easily add with another UV set to your sprite meshes, or through the shader.

1 Like

There may be several options , each with it’s own cons and pros…One of the options is to create a polygonal mesh that will outline area you want your spec to run on , then unwrap it according to…what you’re up. Once it’s done , you can either create a texture sequence that will mimic the spec’s movement across U or V direction , or make a shader that will take a gradient as an input texture and move it via shader code ( so that you won’t need to use texture sequence )
So if this is a button
image
This may be the outline mesh and it’s uvs
image
Some kind of a gradient animation texture ( may be bigger then 64x64)
image
And the final result is

3 Likes