Pure black lighting

Hi what i have is a cave that is lit using directional light. What i want to have is the cave in total darkness inside, however the lighting i have seems to light everything with out thinking about other objects blocking the path of light. Is there any way to get almost a fog of darkness inside

Im sorry im very bad at explaining things,
Thanks for your help

This is because there is no shadows being cast, place a white point light in the cave with negative brightness ought to fix that for you :wink:


Ah I forgot we can’t do negative point lights, we will be covering how to do surface lights which allow light subtracting but this won’t be out until february:


Or alternatively edit the texture so it is black inside.

I hope this helps!

By the way you can have negative point lights in Deferred Rendering!

You can hack the light’s color to be negative. Since the built-in color selector is clamped to normalized colors, you cannot use it. You can set negative colors from code, like, l.color = new Color(-0.4f, -0.4f, -0.4f, 1); or just use the following script and attach it to a light, then hack as you like.

using UnityEngine;

public class HackedLight : MonoBehaviour {

    public Vector4 hackColor;
    public float multiplier = 1;

    void Update ()
        var light = GetComponent<Light>();
        light.color = new Color(hackColor.x, hackColor.y, hackColor.z, hackColor.w) * multiplier;