Solid colour light/shadows

Hey everybody,

I’m working on a prototype, inspired by the work of Frank Miller and film noir.

Here is my basic scene:

At the moment, I have a post-processing layer completely isolated from the “Default” layer. The pp volume has an outline effect which effectively acts as edge detection and colours them white. All of my meshes have a simple dark material - no detail yet.

The ceiling fan and freestanding lamp you see within the scene above have “point” and “spot” lights applied and Global Illumination is turned off. All objects you see in the scene are marked as static.


The lighting style I’m aiming to implement (white illuminating detail)


At the moment I’m just trying to work out how to get the light to be a solid white with shadows a solid black.

I’ve tried with Global Illumination, Probes and changing Ambient Color in the Lighting settings but I can’t even get the lighting to render in the scene (I’ve checked that the lighting is toggled on)

Any tips on how to achieve this or Unity tutorials I could be pointed to? All of the tutorials I’ve followed thus far are for “realistic lighting” and HDRP, although Light Types Overview - Unity Learn is very good.

Thanks for taking the time to read this thread :slight_smile:

1 Like

So, I’ve made some progress…

I just can’t seem to get that Spotlighting to be solid white. It adds a weird fade/alpha effect on the edges of the light which doesn’t really match the scene.

I adjusted specular highlights and the scene’s Directional Light outside the room to the correct angle (I’m a noob). That seems to get over the original hurdle of no lighting at all

Hey there, neat looking project you have going. One question I have, are you using URP, HDRP or builtin render pipeline?

The “fade” effect at the rim of the light is expected behaviour; point lights have falloff. AFAIK we do not provide an easy way to change how the falloff behaves for point lights.

I think a better solution might be to write a custom shader which is fed the positions of your point ‘lights’, and simply calculates whether the shading point is over a set distance from each of these lights, setting the color to black if it is, and using the objects texture otherwise. Especially if your lights are not going to be static, this would likely be more performant, and would also allow you full control of the falloff. It will also likely be easier than trying to ‘force’ real lighting into a certain style.

If you really want to use built in lights like you are now, have a look at these links:

http://arthurdaurio.com/2018/05/13/inverse-square-falloff-in-unity/

Hope this helps, cheers

1 Like

Hey Pema,

I think I’m using the built-in render pipeline, as there is nothing in the pipeline settings - I’m not too sure as I’m very new to Unity.

6466003--725395--upload_2020-10-28_12-43-27.png

I’m guessing that it is worth switching to URP and then going for the custom shader approach you suggested. Falloff is new to me - I had been considering a script which draws straight lines from the lamp’s bulb and applying inverse square law, so as to make the light reach higher and lower in the corner of the two intersecting planes.

Though that “Hard Point Light” Unity answer looks to be exactly the type of thing I’m after. I have so much to learn.

Can’t thank you enough!

Hey again,

I was mainly asking about the render pipeline to see if you were using HDRP, in which case I would have recommended switching away. I think either builtin or URP may suit your needs. Keep in mind that URP does not support surface shaders, which is important to consider if you go for something like the post I linked.

Attenuating according to inverse square law is just one kind of falloff. Other methods could be linear attenuation, or even attenuating by a step function (which is basically what you want). When I write falloff, I am essentially referring to the function with which light is attenuated.

Glad I could help.

1 Like