Return of the Obra Dinn: spherical mapped dithering for a 1bpp first-person game (forums.tigsource.com)

by PaulHoule 59 comments 472 points
Read article View on HN

59 comments

[−] m12k 58d ago
If you find this interesting, you might also be interested in this video of someone diving even deeper into how to make the dither surface stable: https://www.youtube.com/watch?v=HPqGaIMVuLs
[−] pvillano 57d ago
IMO, the holy grail of 3d dithering is yet to be achieved. runevision's method does not handle surfaces viewed at sharp angles very well. I've thought a lot about a method with fractal adaptive blue noise and analytic anisotropic filtering but I don't yet have the base knowledge to implement it.
[−] Retr0id 57d ago
My take on it is to use some arbitrary dithering algorithm (e.g. floyd-steinberg, blue noise thresholding, doesn't really matter) for the first frame, and for subsequent frames:

1. Turn the previous dithered framebuffer into a texture

2. Set the UV coordinates for each vertex to their screenspace coordinates from the previous frame

3. Render the new frame using the previous-framebuffer texture and aforementioned UV coords, with nearest-neighbor sampling and no lighting etc. (this alone should produce an effect reminiscent of MPEG motion tracking gone wrong).

4. Render the new frame again using the "regular" textures+lighting to produce a greyscale "ground truth" frame.

5. Use some annealing-like iterative algorithm to tweak the dithered frame (moving pixels, flipping pixels) to minimize perceptual error between that and the ground truth frame. You could split this work into tiles to make it more GPU-friendly.

Steps 4+5 should hopefully turn it from "MPEG gone wrong" into something coherent.

[−] dpatterbee 58d ago
This really is a fantastic video. I don't think I'd considered many of the ideas behind dithering before seeing how it could be extrapolated to this degree.

The video ends in a place where I suspect even further advances could still be made.

[−] m12k 58d ago
There's a follow up video with variations of the technique (some of them with color) demonstrated in a game: https://www.youtube.com/watch?v=EzjWBmhO_1E

But yes, there's still the issue of oblique angles looking different that still remains open AFAIK.

[−] whtrbt 58d ago
Very cool! The dither is no longer in screenspace though, which kills the retro charm.
[−] m12k 58d ago
Fair point, though I think that when it's low rez enough, it becomes less apparent that it's not in screenspace, and it gets closer to a retro look: https://youtu.be/EzjWBmhO_1E?t=102
[−] femto 57d ago
Discussed on HN in January 2025: https://news.ycombinator.com/item?id=42808889
[−] tesseractcat 58d ago
If anyone finds this interesting, I'd like to plug my post analyzing a similar technique, but generalized for perspective pixel art: https://tesseractc.at/shadowglass
[−] schnitzelstoat 57d ago
One of the best games I've ever played. I might play it again now that it's been a few years and I can't remember the solutions.
[−] rokkamokka 58d ago
I gave this game a shot but honestly the art style got in the way of the gameplay for me. Fun to read how much effort went into it
[−] vagab0nd 58d ago
This is great from a technical and artistic perspective. But for me personally, the visual style ruined a great game. I love detective/deduction games. I'm listing some of my all-time favorites in this genre. I'd love to finish Obra Dinn, but god it just makes my eyes hurt so much.

The Case of the Golden Idol

Chants of Sennaar

Her Story

IMMORTALITY

The Painscreek Killings

The Roottrees are Dead

Type Help

[−] progforlyfe 58d ago
I grew up on the small 6 inch 1 bit Mac SE display so the art style has a special place in my heart. Sadly I'm too "dumb" to fully enjoy the game as it requires a lot of attention to detail -- amazing if you enjoy detective style puzzles! I still highly respect it.
[−] surfsvammel 58d ago
I absolutely loved this game. I still think about it often, the story and the characters. I wish there was more games like it.

Interesting read!

[−] mblode 57d ago
I built a mini game with this technique [1][2]

[1] https://dither.blode.co

[2] https://github.com/mblode/dither-3d

[−] car 58d ago
When the Mac and Atari ST first hit the market in the 80's, there were Comics created in this 1-bit "ordered-dither" style. For error-diffusion dithering (Floyd-Steinberg etc.), you needed more bits per pixel, to carry the error.

SHATTER:

https://imgur.com/gallery/shatter-1984-was-first-commerciall...

Robot Empire:

https://www.reddit.com/r/atarist/comments/xgs4rh/comicbook_c...

[−] HelloUsername 58d ago
Previous discussion of "Stabilizing the Obra Dinn 1-bit dithering process (2017)" on 08-nov-2024 https://news.ycombinator.com/item?id=42084080 114 comments
[−] jay_sar 58d ago
Actually saw a great youtube video about this recently - very cool how they were able to accomplish this. https://www.youtube.com/watch?v=_3qzyAHMoUU
[−] abetusk 58d ago
I keep feeling like there's a set of fundamental assumptions that can be optimized for, or relaxed and optimized for, in order to get at what a better method might be.

For example, stability of dithering under rotation and or some type of shear translation. What about stability under scaling?

There's been some other methods that essentially create a dither texture on the surface itself but, to me at least, this has a different quality than the "screen space" dithering that Obra Dinn employs.

Does anyone have any ideas on how to make this idea more rigorous? Or is the set of assumption fundamentally contradictory?

[−] paultendo 58d ago
What a fascinating deep dive. 2x with sphere mapping is my favourite - it starts to take on a sort of pointillism-like quality which gives all the objects (or maybe my brain) a sort of understanding of their texture.
[−] thaumasiotes 57d ago

> Finding this particular spherical mapping took some time. There's no way to perfectly tile a square texture onto a sphere. It would've been possible to redefine the dither matrices in terms of a hexagon grid or something else that does tile on a sphere.

Hexagon grids are flat and can't tile a sphere. Nothing can tile a sphere without knowing some specifics about the sphere, and even then you're pretty much limited to "orange slices", pole-to-pole longitudinal sweeps.

[−] skrebbel 57d ago
This is so cool! Excellent writeup also.

I feel like I understand it all except the last step:

> I could feel the closeness, and a very simple fix for this kind of aliasing is to supersample: apply the dither thresholding at a higher resolution and downsample.

Here he shows a dither pattern that isn't monochrome, but has grays (cause it's downsampled). But the picture in the end is monochrome again. How does this work? How does he downsample the dithered result while staying monochrome?

[−] aqme28 58d ago
One of my favorite games of all time. An incredible kind of puzzle, oozing with its own weird style.
[−] pxx 57d ago
I've never gotten motion sickness playing a video game before Return of the Obra Dinn. it's sad because I hear it's a good game but it's absolutely unplayable for me
[−] martinknopf 58d ago
I remember following dukope‘s well-written devlog back then. Even tried to reproduce his edge detection for a game jam. Thanks for digging this out.
[−] QuaternionsBhop 58d ago
The final dithering effect appears to be mis-sampled and is no longer 1 bit per pixel
[−] antics 58d ago

> It feels a little weird to put 100 hours into something that won't be noticed by its absence. Exactly no one will think, "man this dithering is stable as shit. total magic going on here." I don't want to give people problems they didn't know they should have though so it was worth fixing.

I mean maybe it's just me, but that is literally the first thing I noticed and I appreciated it so much I instantly bought the game. I don't even play video games much!