Best way to make characters visible in low light (in code)?

So I’ve been messing around with some more extreme lighting setups.

More dark/light space differentiation looks great but characters running around in dark areas being unlit is sux.

So what I’ve been doing is just taking character materials (at runtime) swapping in their albedo texture as their emissive, and setting the emission color to like .75 * white. This is… alright. But it kinda washes characters out.

Have any of you dealt with this kind of problem, what’s your approach?

Maybe use character edges highlight?

1 Like

Add another light which only effects the layer your characters are on. Or, add equivalent functionality to your shaders.

To minimise washout with emissive, don’t use white, use the existing colour value with some multiplier.

Otherwise, yes, outlines can work well.

3 Likes

You could boost up exposure (if your game uses it) but in this case night scenes will end up look like day scenes.

So… outlines, and character lights. Where character light is something that is attached to the character to make it visible.

Dark souls use character light for protagonist, because otherwise you wouldn’t see the character itself in “Tomb of Giants”

One other thing to keep in mind is using colour palette rather than actual darkness. Rather than getting actually dark, you can focus on “cool” colours and avoid “warm” colours in darkness. A LUT can help here.

Keep in mind that your game is not showing accurate brightness or contrast anyway. Outdoor light at day is far brighter than the few hundred lumens a screen can produce, and once our eyes adjust to darkness they can see far more subtle stuff than our screens can show in the bottom end of their display spectrums. And our eyes adjust based on ambient light, so there is no one “correct” way for our monitors to show things as our eyes may see them.

So “dark” does not have to be dark, it just has to feel dark.

5 Likes

Oh… THIS! Duh, this is the perfect solution. Just have a separate light that only hits the relevant characters.

In terms of emissive washout, I’ve just been slapping the base albedo into emissive with a grey tint. You have any suggestions on easy ways to further reduce washout that won’t take forever?

If you do that It will keep looking washed out because properly done albedo does not contain any lighting information.

You could multiply it with occlusion map, but nobody bothers with occlusion maps most of the time.

One thing you coudl try to do is grab world space normal, and do something like “emissive = saturate(worldSpaceNormal.y)”.

This will do the same thing as having a global directional light shingin stright down except it won’t have any shadows.

Also see surface shader examples.
https://docs.unity3d.com/Manual/SL-SurfaceShaderExamples.html

Edge lighting is another possible effect to consider.

2 Likes

That’s super clever! Of course! Yeah, multiplying against the occlusion map would make it much, much more subtle.

Maybe post screenshots to get better/more specific suggestions.

I ended up actually just using the suggestions in thread and it worked great. Actual problem solved.

2 Likes