Search Unity

Silhouette effect with standard lighting

Discussion in 'General Graphics' started by jeffcrouse, Aug 8, 2019.

  1. jeffcrouse

    jeffcrouse

    Joined:
    Apr 30, 2010
    Posts:
    18
    I'm trying to achieve a silhouette effect like Inside or Kentucky Route Zero, but using the standard lights and shaders in Unity. And in 3D. Is this possible?



    I've been playing with directional lights pointing at the camera from a distance, but it's not working. For a minute I thought an orthographic camera would help the silhouette effect, but now I'm not sure. I know volumetric fog will ultimately help achieve the overall effect, but I think that is separate from the silhouette effect. This is what I've been getting:



    Whereas what I want is to only see the silhouette of the tree branches. Maybe I need to have a light bouncing off some faraway plane?

    Any general tips would be greatly appreciated! Thanks.
     
  2. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    If by silhouette you mean just rendering whatever in black, then use unlit shader with black color.
     
  3. jeffcrouse

    jeffcrouse

    Joined:
    Apr 30, 2010
    Posts:
    18
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    KRZ is essentially an unlit 2D game, they're doing it by careful control over character "lighting" and using layers of hand placed transparent surfaces with gradients to fake fog, or just straight up using Unity fog in some cases.

    Inside is using a custom volumetric haze and lighting solution, along with fog. Something like Aura may get you what you want. Alternatively the new HDRP could be used to get even nicer integrated volumetrics. There are a number of paid assets on the store as well with different strengths and weaknesses. Aura's biggest strength being that it's free.
     
  5. jeffcrouse

    jeffcrouse

    Joined:
    Apr 30, 2010
    Posts:
    18
    Thanks, @bgolus This is super helpful. I am going to play with Aura 2 (no longer free, but that is fine).

    About HDRP: do you know of an example that I look at to start to understand? I am completely new to volumetric lighting.