Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

How to make a sprite glow?

Discussion in '2D' started by SebGM2019, Mar 4, 2020.

  1. SebGM2019

    SebGM2019

    Joined:
    Aug 3, 2018
    Posts:
    34
    Hi, I'm making a 2D game with pixelart style, and I was wondering if there's any way that I can make a sprite of a prefab glow/emmisive, so that other sprites react to the lighting that the prefab is emmiting. It should look something like this:


    Is there a way to achieve this in prefabs? For example, glowing bullets...
     
  2. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    2 prefabs one lit one not
     
  3. Tom-Atom

    Tom-Atom

    Joined:
    Jun 29, 2014
    Posts:
    153
    You have several options:
    - make some glow directly into your image asset in your painting program. This will not make any impressive effect, but it is cheap,
    - make planet without glow and then separate image for glow. In game draw planet and then draw glow over it with additive blending,
    - play with HDR / Bloom (Post Processing). You can create emissive shader and then set bloom parameters so, that parts with intensity higher than X will glow. If shader takes mask, then you can let glow only specific areas - see image below (whole sun is custom shader that simply doubles intensity, deers are using emissive shader with mask for eyes):

    Jeleni.jpg

    Emissive shader used above - here is Shader graph for emissive shader. It is simple sprite shader and emission color is added where mask says:
    EmissiveShader.jpg
     
    unayozan, Rnen, MrHemanik and 6 others like this.
  4. HalalUr

    HalalUr

    Joined:
    Apr 23, 2021
    Posts:
    1
    This one was really helpful, thank you!
     
    davidheeren and basvankuijck like this.