Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Make a Directional Light to only produce shadows, no light.

Discussion in 'Global Illumination' started by aLeXmOrA, Oct 26, 2015.

  1. aLeXmOrA

    aLeXmOrA

    Joined:
    Aug 23, 2013
    Posts:
    9
    Hello,

    I've been doing research and looking for a way to create a Directional Light that doesn't light, but only produce shadows of the objects in its way.

    Do you know if that's even possible?

    I want one static (no movement) Directional Light to light the scene and no shadows (already know how to do that) and another Directional Light moving like a Sun that doesn't light, but only produce the shadows of the objects.

    Any ideas?

    Thank you in advance.
    Cheers!

    Alejandro Mora.
     
  2. halfshey

    halfshey

    Joined:
    Apr 26, 2015
    Posts:
    15
    Hi,

    I've been looking for a solution for this for a long time since realtime shadows don't work after baking a lightmap. (Mixed lighting doesn't work since the release of Unity 5 :mad:)

    Unfortunately I haven't found a good solution yet. You can take a look at Shadow Projection, especially the dynamic Shadow Projector Asset in the store ( its' for free ). But this would only be good if you have just a few objects that need shadows.
     
  3. halfshey

    halfshey

    Joined:
    Apr 26, 2015
    Posts:
    15
    I just found out that in the latest beta mixed light works for directional lights :):)

    I don't know if that helps you out with your problem though.

    EDIT Ooops still not working for directional specular maps...
     
    Last edited: Oct 26, 2015
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366