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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Feature Request Add a "dark spotlight" or similar to make parts of a scene darker (subtractive light)

Discussion in 'High Definition Render Pipeline' started by akent99, Sep 25, 2022.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    496
    Consider the following shot - one character in the scene (the foreground one) is purposely darkened for cinematic effect. Using spotlights I know how to lighten things, but is there like an anti-light spotlight that can darken an object? It is for this sort of effect - making a character look dark and mysterious, or have them hide in a corner.

    upload_2022-9-25_12-15-10.png

    I was wondering about using a local volume like for fog, but I don't want to darken the air around the character - just the character. Here the character is separated from the other characters, so I could try putting objects just out of camera shot to cause shadows.

    Is there a better approach? I like spotlights for example as they have angle and ranges, so you can control what is affected, but a volume (box, sphere, etc) is fine as well.
     
  2. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    246
    If you are using HDRP (I am assuming that you are given where you posted) you can use Light Layers for something like this.
     
    chap-unity and akent99 like this.
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    496
    Ah, thanks. I will check that out. My first quick test of just turning it on was weird (all the characters got darker instantly, but not their surroundings, even through they are all the in Default layer), so I must have some weird settings somewhere or need to increase some buffer sizes (its strange - the Scene window light is right, its the Game window that they are darker in - maybe a post processing effect I messed up somewhere - I did have light layers on once in the past not really understanding them, then went through and turned things off if I did not understand them).
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    496
    I gave light layers a go, but it was not very convenient. What I really would like is all the existing lights (point, spot, etc) to have a "subtractive" mode. They absorb the light using all their standard capabilities. Or allow negative intensities instead of capping them with a minimum of zero.

    For example, I had a character lurking in an alleyway. I wanted the alley *and* the character darkened (for cinematic effect). I also wanted to control different characters in different shots in different ways - I did not want a light layer per character!

    Creating a dark transparent object in front of the alley is my best idea at the moment, but "negative lights" would give a lot more control more easily.