I E

Sunstone dev log 26: luminance histogram

Today I tried to improve automatic exposure to get less grey scenes. Nothing has worked so far.

I wrote a compute shader that produces a histogram of log-luminance. Deriving the binning formula was fun:

Here’s the histogram produced for the helmet scene:

No wonder automatic exposure is having such a hard time. Bucket 170, which corresponds to luminances of roughly [9600,10100)[9600, 10100), has 3.5 million entries due to the pure white skybox. That easily wins the battle for the mean.

I’m still not sure of a good way to handle this automatically. If I were making a game engine, I’d be tempted to add ways to work around it. Exposure compensation could be applied to different parts of the map. Certain meshes could be marked as exposure targets, which would form a mask that only allows the subject’s luminance to be counted for automatic exposure. Seems like a bit of a rabbit hole.

What I learned

Next steps

← Sunstone dev log 25: automatic exposure Newest