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 get dark edges/outlines found in many 2.5d games

Discussion in 'General Graphics' started by Yamoc4, Mar 11, 2015.

  1. Yamoc4

    Yamoc4

    Joined:
    Jul 26, 2013
    Posts:
    10
    I'm trying to get the dark edge effect seen in these examples where the ground just fades to black or objects with their back towards the camera have the black outline.

    http://2nerdsblog.info/wp-content/uploads/2014/04/Deadlight-2.jpg

    http://media1.gameinformer.com/imagefeed/screenshots/Deadlight/deadlight-607-009.jpg

    http://www.oneclickmac.com/wp-content/uploads/2013/02/mzl.fryipcnl.800x500-75.jpg

    https://encrypted-tbn0.gstatic.com/...WIIjbpsk5W8r34BN-3hkkEJANRi-MF5kBA3i9Z-mLGQ3Q

    My current solution is to use a directional light and just point it directly at the camera but it's difficult to get it looking right. I also tried to make a custom shader with a mask that darkens out areas. I'm not exactly getting the outcome that I hoped for. I figured I might as well ask here since it seems to be a pretty common in games and someone might know a better solution. Any help would be greatly appreciated!