7 ms·
Dither stabilisation
- teej 9y agoThis post is written by the creator of the wonderful game Papers, Please.
- mrob 9y agoThe dithered highlight on the sphere looks odd because it was calculated in a non-linear colorspace. You can get better looking results by converting to a linear colorspace, dithering, then converting back to sRGB. Eg, in ImageMagick, using the same 8x8 matrix: convert Dither2-Exp_crop_resize.png -colorspace RGB -ordered-dither o8x8,2 -colorspace sRGB Dither2-Exp_dithered.png Result: https://imgur.com/a/81bNg https://imgur.com/a/81bNg
- tizzdogg 9y agoI replied on the original thread too, but I wonder if it’d work to use a mipmapped dither texture in texture space like this old hatching paper: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.28.8017&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.28.... It probably won’t give you exact 1 pixel dither without some hacks, but maybe something along those lines could work.
- bno1 9y agoinstead of using textures and downsampling them, would a mathematical formula for the dither pattern applied in the shader work best?
- kmnt 9y agoThat is really cool, especially for the time. Only downside is I think some uv mapping is required to map the hatching onto the models. Here is a video of the paper https://www.youtube.com/watch?v=g6Ta35AiE1I https://www.youtube.com/watch?v=g6Ta35AiE1I
- grenoire 9y agoI think the problem now is that the dithering is no longer done on the screen space, but instead looks like a texture slapped on top of the objects in orthogonal projection. You can easily notice it in the comparison shots; you'll notice that the sphere projection is angled at around 20-30 degrees, and it's not pixel-perfect on the screen as the original effect is. I'm not a fan, to be fair.
- cutcss 9y agoyeah looks strange; I think motion blur to reduce "discomfort" when rotating the camera may have been a better compromise; or maybe removing all single-out black pixels (e.g. those with no adjacent black pixels in a 4x4 radius).
- rossy 9y agoYeah, I couldn't agree more. The original effect is really interesting and evokes nostalgia of old Mac games, as the developer intended. I think he's reacting too harshly to criticism, or overthinking things, because my reaction to the pixel swimming effect matched his first assumption: "yeah that's how dither works." The screen-space solution for stable dithering looks fine, and I'm glad it will be an option in the final game, but the sphere mapping looks weird. With non-screen-aligned "pixels" it looks like it's just a normal 3D game but with a "dither" texture on every object, rather than a true 1-bit game. I just hope the aesthetic from the demo isn't watered down too much for the final game.
- KozmoNau7 9y agoThe original effect is how it's supposed to look and how it would have looked on an old computer with 1-bit graphics. If there is an option to choose between the different effects, I would personally go with the first one, because that's exactly how I remember old games looking.
- Franciscouzo 9y agoI wonder how using error diffusion on the time axis would look, I guess it would stabilise the image a bit.
- ttoinou 9y agoIt would look like sensor noise ?
- thanatropism 9y agoNoise has samples that are statistically independent from each other. Diffusion has samples such that their increments are independent. But it's path dependent.
- contravariant 9y agoWouldn't error diffusion result in the opposite of stabilisation?
- beeforpork 9y agoWhat a delightful attention to detail! I love this! It is totally not weird to me to spend time on something with the goal for it not to be noticed in the end.
- monk_e_boy 9y agoI couldn't find out why he wanted a 1 bit image. Was there a reason other than "it looks cool"?
- jcl 9y agoFrom the first post of the forum thread: "My first computer was a Mac Plus. I've always had a nostalgia-softened spot in my heart for 1-bit graphics. I'd like to capture the detailed black & white look of old Mac games in a realtime 1st person game."
- amai 9y agoRelated: - http://bisqwit.iki.fi/story/howto/dither/jy/ http://bisqwit.iki.fi/story/howto/dither/jy/ - http://pippin.gimp.org/a_dither/ http://pippin.gimp.org/a_dither/
- londons_explore 9y agoThis is the approach I'd use... * Take the previous frame. * Warp to the shape of the new frame using motion vectors. * Dither the new frame using the warped old frame to modulate the white/black threshold when carrying forward the error to the next pixel. That will lead to a pixel remaining white/black, and only a minimal number of pixels changing color between frames.