5 ms·
Simulating a CRT TV with C++ and OpenGL
- dtx1 4y agoQuite interesting. The hardest part would probably not be the simulation but actually displaying what is simulated (in real time). You would need pretty high peak brightness and an insane refresh rate.
- jeroenhd 4y agoI think modern (HDR with loads of nits of brightness, 144+ fps) gaming monitors should be able to get the effect down quite well. Nothing you'll find in a productivity oriented laptop but with the right tools you should be able to come quite close.
- dtx1 4y agoThe peak brightness is there but not in per pixel dimmable displays (OLEDs) and you would need well above 15000 Hz to simulate a CRT.
- mrandish 4y agoWow, I consider myself a pretty obsessive retro-gaming enthusiast (a custom-built arcade with 25-inch multi-scanning CRT, hacked graphics card and hand-tweaked GroovyMAME build) but damn, physically simulating a cathode ray tube is next level. Respect.
- simonblack 4y agobut damn, physically simulating a cathode ray tube is next level. Respect. Definitely. While I have simulated monitor screens that were originally physical CRTs, I still simulated them as though they were digital monitors with defined pixels. Definitely respect.
- VikingCoder 4y agoIf you enjoy this look, I recommend checking this out: https://github.com/Swordfish90/cool-retro-term https://github.com/Swordfish90/cool-retro-term
- 323 4y agoHas author actually seen a CRT TV image in real life? Because it didn't look like that, you didn't have those clear distinct lines. Color CRT displaying a game, no lines: https://i.imgur.com/eI2yb7Y.jpeg https://i.imgur.com/eI2yb7Y.jpeg Black & white CRT, you can barely make out the lines: https://d23gn3985hkc32.cloudfront.net/wp-content/uploads/2020/12/464876-h1.jpg https://d23gn3985hkc32.cloudfront.net/wp-content/uploads/202...
- bjt2n3904 4y agoYeah -- it seems that so many of the CRT simulations way overemphasize the scan lines. I think if they added a bit of "bloom" to each pixel, it would make them less obvious?
- jeffbee 4y agoThey over-emphasize the negative space between the scan lines without getting the details of the raster scan correct. The forward scan lines are not horizontal, they are slightly tilted, because the vertical sweep is continuous. The retrace is also slightly slanted, but less because the retrace is faster. So in the diagram on this site the solid lines should be the ones that slope, and the dashed retrace lines should be the ones that are nearly horizontal.
- toast0 4y ago> The forward scan lines are not horizontal, they are slightly tilted, because the vertical sweep is continuous You can slightly tilt the yoke to make the horizontal lines more horizontal (although then vertical lines will be less vertical, tradeoffs everywhere)
- Asooka 4y agoSome CRTs do have visible scanlines, some do not. Check out this thread https://shmups.system11.org/viewtopic.php?f=6&t=63197 https://shmups.system11.org/viewtopic.php?f=6&t=63197 . Personally I'd like the simulated CRT to have no scanlines, rather what I want is temporal ghosting (previous frame blending in the next one, used for transparency effects in games by blinking two images rapidly); and a filter to make pixels less blocky and implement colour bleed. Given the great number of CRTs out there you probably can't have a single one be the best ever, but perhaps emulating several known ones by twiddling the parameters of the shader and letting people pick would be the best.
- jeffbee 4y agoThese seem to regularly pop up on HN but the new ones never seem to describe the ways in which they differ from the now-20-years-old xanalogtv hack.
- 71a54xd 4y agoDoes anyone have experience doing this purely with FFMPEG?
- naikrovek 4y agoyes the int10h font guy has some blog posts about it, with accompanying code on GitHub. https://int10h.org/blog/ https://int10h.org/blog/
- atum47 4y agoI did a project a few weeks ago where I was trying to emulate CRT images as well. End up creating a CRT converter for still images. https://victorribeiro.com/CRT/ https://victorribeiro.com/CRT/ I guess each one of us remember CRT a little bit differently, since my images end up with vertical stripes instead of horizontal ones.
- MarkusWandel 4y agoThis may not be perfectly realistic, but it's getting close and can be made closer. Not long ago, replacing a dead 26" colour CRT (say, in an arcade game machine) with a suitably masked 4K LCD panel would have been ludicrous. But we're pretty much there now. I thought when incandescent bulbs pretty much went away that I would miss the bare filament in a clear bulb look. I kind of do, but not much. I have a chandelier with the fake-filament LED type bulbs in it. Despite dubious cooling of the LEDs they seem to be holding up just fine in extended use, and while it doesn't look quite traditional, it's good enough. And emulation of older video game systems has moved into the browser!
- ncmncm 4y agoI was hoping it would distort the image to round the corners and compress the edges. Extra credit for added snow.
- some-guy 4y agoI used a CRT for the first time in a long time a few months ago (embedded in a PowerMac 7200 all-in-one), and I forgot how stunning the picture looked compared to LCD/LED screens throughout the 2000s. Big problem though, I forgot how much they made my eyes _hurt_. I couldn't handle using it for more than 30 minutes. Increasing the refresh rate to 75hz helped a little bit, but wasn't enough to get me to stop causing a headache. I'm all for nostalgia but I think in the end it is good that we moved away from CRT technology (for many reasons).
- anthk 4y agoNFSU2 on CRT looked glorious and vibrant. On LCD's it's pretty much bland and faded off.