As I find myself doing more character lighting related work in Unreal, I start to miss the tools I tend to use when I shoot real video. So I decided to just build them. Some of them at least.
The basic idea is that you can’t trust your eyes to know if something is bright enough, because things like your monitor settings or the way your room is lit affect your perception. So you use tools that tell you exactly what is going on.
The first one I implemented is the Zebras (Zebra patterning - Wikipedia) :
You set a luminance threshold and any part of the image whose luminance is above that threshold will have a zebra pattern overlaid onto it.
You usually use this to be warned of overexposure, but you could also use as an indicator for when skin tones reach the desired level of brightness.
If you want to go up a level, you might want to look at false colour, which colour-codes the image based of the pixel’s luminance. The idea is once again to easily identify over and underexposed areas or any other range of interest.
There are many ways to do false colour, but I went for the key used in the Flanders Scientific monitors which goes like this:
- luminance is coded as a gradient from blue for black, to red for white, passing through green at the mid point.
- underexposure threshold in black
- overexposure threshold in white
- key mid range in grey
The idea is to set your mid range wherever you want it, and then dial in your exposure until the part you’re interested in (let’s say a character’s face) turns grey. The gradient is also a very good way of telling you how even your lighting is.
I made these as post process materials, so they need to be added to a post process volume or a camera to be visualised.
I’d like to make them available as some sort of a debug view, but I haven’t looked into it yet.
The caveat for this implementation is that I’m not entirely certain I’m computing the luminance correctly. At the moment I’m doing this by desaturating the scene using the Rec.709 coefficients, which seems to yield appropriate results, but I’m not sure whether SceneTexture returns linear of gamma-encoded colours after Tone Mapping.