Change intensity of one light on specific objects

I have a somewhat open pseudo-2D world with caves (think minecraft, but constrained to 2D) lit largely by a directional light. For the outside, this is fine, but in the caves I want to use various point lights for the main source of lighting.

Outside / inside areas are continuous, and may be above / below each other (relative to the light). I define them with simple custom script that interpolates or sets a value over an area (so I can easily make gradual changes from outside to inside).

My issue is how to get the “inside” geometry to be less affected by the one directional light, but remain affected by other lighting. Is this possible? I’m open to shader solutions or whatever really.

What I’ve seen suggested for interior geometry seems to be either using a different layer, or shadows, but neither will work in this case.

Thanks!

In the end I went with my original idea - disabling the directional light in the scene, and using a surface shader to manually applies it from material properties instead.

After trying to use an editor script to apply properties to every material in the scene (waaaay too slow), I switched to using MaterialPropertyBlocks and Graphics.DrawMesh to draw everything. Which was a pain to set up (e.g. objects silently don’t render if you put an invalid property in the block), but worked nicely in the end.

A GlobalLighting script is available for query by moving objects which need to update their directional lighting. Other objects are given a fixed value when the level is generated. (All the values are read in from a painted texture, so I can change the light color quickly and easily).

After this I do rather wonder why MaterialPropertyBlocks aren’t just built into the standard pipeline instead of forcing you to use DrawMesh. Yet another questionable Unity design decision I guess… :-/

I still haven’t considered shadows yet. Not sure how I’ll go about doing that.

**Use Shader , It will be more efficient and cool then using basic scripting **