Search Unity

Question Shader Graph Not Emitting Light

Discussion in 'Shader Graph' started by tchrist14, Oct 13, 2021.

  1. tchrist14

    tchrist14

    Joined:
    Oct 11, 2021
    Posts:
    6
    (To begin: sorry if I'm posting in the wrong spot / not following chat rules, I'm not too good with forums)

    Hi everyone,

    I'm having an issue with the Universal Render Pipeline and Shader Graph and I'm running out of things to try. I'm trying to make an Unlit Shader Graph that emits light like the picture shown below. I was following this video exactly and did everything the same:


    upload_2021-10-12_18-57-58.png

    If everything was followed correctly, the shader should look like the picture above. I know that's true, as I've replicated it perfectly on my school computers many times and got that exact emission repeatedly, so I know how to make it. The problem is when I try to make it on my personal computer, it winds up like this:
    upload_2021-10-12_19-0-20.png

    I don't know what's causing my shader to not emit any light. The color is set to HDR and intensity is increased, I've tried everything and I'm pretty sure I have all the Packages I need, but I don't know why it's not working. I thought it was a problem with my own download of Unity, so I uninstalled and reinstalled everything, to no luck. Any information on how to fix this or reset my Unity completely so I can have a fresh Shader graph would be really appreciated. Thanks
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    I have no time to watch whole video, but this guy most likely forgot to explain the most important thing - post processing setup. For full clarity, this material is not emitting real light, it is kind of faked with post processing.

    What you are looking for is called "Bloom", it works like a blur for pixels with high intensity HDR color.
    Create object with component "Volume" if there is none on the scene and add profile with Tonemapping and Bloom.
    Tonemapping goes first to make HDR work well and then Bloom adds aura to bright pixels (remember to tweak params).
     
  3. tchrist14

    tchrist14

    Joined:
    Oct 11, 2021
    Posts:
    6
    There was actually some Post Processing already installed (although I installed the Package just to be safe). But there was already an object with Volume, Bloom and Tonemapping installed, but tweaking the parameters on there didn't help much.
    upload_2021-10-15_10-39-37.png
     

    Attached Files:

  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    In this case first ensure camera has post processing enabled. My guess is you are looking at scene view all the time and post processing is disabled here by default. Change tab to game window or enable post processing on scene.

    In case this is not the problem, if this is default sample scene everything should be set correctly and if emmision of default urp material works there, then there is no other option than your shader/material.
    By the way tutorial in this link is not the best one in my opinion, first he says Lit material does many calculations, but this is partly true and if you need emission there is default Unlit material for such simple case. Also this supposed to be simple tutorial, so I am not sure why he overcomplicated it with all these Blend nodes.
     
  5. tchrist14

    tchrist14

    Joined:
    Oct 11, 2021
    Posts:
    6
    Oh, switching to Game scene worked, thank you so much! I was doing nearly all of my viewing in Scene mode so I would've totally missed it. Do you know how to enable Post Processing into Scene view so I can see it there too?
     
  6. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    There is dropdown in scene view and you can select what you need
    upload_2021-10-16_10-53-50.png
     
  7. tchrist14

    tchrist14

    Joined:
    Oct 11, 2021
    Posts:
    6
    That was already checked but I found the issue. The Scene lighting was turned off so I wasn't seeing anything. Thank you so much for your help! I was struggling with this for a long time