Search Unity

How to cast only shadows

Discussion in 'General Graphics' started by massaiTHEdog, Jan 14, 2016.

  1. massaiTHEdog

    massaiTHEdog

    Joined:
    Nov 16, 2012
    Posts:
    26
    Hello, I have a baked level and I would like to know how to cast only shadows of non-static objects:

    I placed some dynamic objects on my map and a directionnal light only for shadows and I want that this light generates only shadows for dynamic objects without being affected by the light itself...

    Can someone help me?

    Thank you!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    You can use a mixed directional light, but there's no easy way to just cast shadows with out affecting lighting. There are some examples for doing blob shadows or otherwise faking shadows with projectors, and some assets on the store that do a decent job of this as well.

    https://www.assetstore.unity3d.com/en/#!/content/35558 For example.
     
  3. massaiTHEdog

    massaiTHEdog

    Joined:
    Nov 16, 2012
    Posts:
    26
    Thank you that's exactly what I was looking for!
    Working perfectly!
    Now have to see if it impacts performance... :)