Today's post is gonna be a bit unusual and it'll be pretty long too, so here goes.
I've spent my entire weekend fixing a VERY nasty problem in my game. To put it shortly, there's a thing
called "The flickering wheel illusion" -
https://www.jneurosci.org/content/33/33/13498The idea is that brain can see various non-existing patterns in static/moving black-and-white images.
The Mission is black-and-white game with a lot of high frequency white details on black background, so one
can observe such effect in the game, especially on the floor/ceiling and walls where there're a lot of white
points/scratches and stones. When the camera is moving it feels like floor/ceiling and walls flicker, especially
small white points and stone borders:
When I first noticed it I though it's some kind of renderer bug and that I'll be able to fix it later, but then I
did a simple test: took a screenshot of the game, opened it in a window and started dragging the window around with
a mouse and the effect was exactly the same.
So after I realized that the problem is broader I started to think how to fix it - I tried nearly everything, all
kinds of post-processing effects such as gaussian blur, motion blur, grain, distortion, etc. All of them either
failed to fix it or fixed it, but the result was not acceptable for a hand-drawn game. I also noticed that changing
black background to dark grey solves the problem, i.e. making the distance between the colors smaller fixes the
problem, but unfortunately this screws up the looks too. But now, I think I found the solution, I used selective
motion blur with brightness threshold. The idea is that I apply special kind of motion blur to parts of the scene
that are affected by the "flickering problem" and I only use pixels that are above certain threshold in brightness,
thus, I somewhat "prolong" the life of the pixels that once were bright and now became black. After showing this to
a couple of people I found out that some of them don't even see the problem at all, some of them see the problem and
agree that my fix fixes it. Some of them see the problem before and AFTER the fix... This is driving my crazy,
really, now I'm not even sure if there's a problem and what I'm fixing exactly or should I work on it more... So I
decided to run a poll here, I made 2 videos: before and after the fix.
Before:
After:
Note that's extremely important to watch this in 720p60HD quality, because scaling and compression artifacts eliminate the flickering problem entirely.
So do you think the flickering problem is fixed ?
Options are:
1) I see the problem in "before" video and it's fixed in "after"
2) I see the problem in "before" video and also in "after", it's not fixed
3) I don't see the problem at all
4) I don't see the problem in "before" video, but I see it in "after"