10 ms·
CRT simulation (2014)
- Aqwis 11y agoWhy the motion trails? The Mario example doesn't have them and I can't recall any extreme motion trails from my days of playing console games on CRT TVs.
- tadfisher 11y agoThe screenshots are exaggerated; you didn't notice them because they lag by only about a frame. They did in fact exist, because it took time for the phosphors to lose their excitation.
- herpaderpa 11y ago> you didn't notice them There are four lights. http://en.wikipedia.org/wiki/Asch_conformity_experiments http://en.wikipedia.org/wiki/Asch_conformity_experiments ...anyway, the apparent presence of the motion trails would depend heavily on a person's use of the brightness, contrast and saturation setting per each individual television set.
- DiThi 11y ago> One unfortunate downside to this implementation of trails is that it depends on having a consistent frame rate; it has been tuned for 60fps and will not behave exactly as expected at other rates or if vsync is disabled. It's a very subtle effect, and probably absent in more recent CRTs.
- tdicola 11y agoI love these CRT shaders but have always wondered, has anyone thought about or worked on a physically accurate simulation of a CRT television? Something that takes a framebuffer as input and simulates the electric signals that control the magnets around the tube, how those magnets affect the electron beam, how the beam interacts with the shadowmask, etc. elements in the front of the tube, and finally how each individual phosphor on the screen is illuminated by the beam. I wouldn't even worry about doing stuff in real time to start with, instead just focus on the most accurate physical simulation possible. Then use the learnings from the simulation to try to create more accurate shaders that any program could use for simulating CRT tubes.
- rogerbinns 11y agoYes, they have. There are terminal emulators (Cathode) and a very accurate simulation as part of xscreensaver. See jwz's post about it - http://www.jwz.org/blog/2011/01/cathode-vintage-terminal-emulator/ http://www.jwz.org/blog/2011/01/cathode-vintage-terminal-emu... - and a mirror of the file where it is implemented - https://github.com/danfuzz/xscreensaver/blob/master/hacks/analogtv.c https://github.com/danfuzz/xscreensaver/blob/master/hacks/an... The comments in that C file show just how much attention to detail was made.
- tdicola 11y agoYeah that looks like a great start, especially with how the NTSC signal is generated and interpreted. I don't see much around simulating the electron beam and its interaction with the phosphors and front of the tube though. I imagine a truly accurate physical simulation would need to use monte carlo methods or similar techniques, almost like an advanced 3D renderer does for global illumination.
- FireBeyond 11y agoEverything I saw about Cathode (also available on the App Store) didn't seem to actually give much detail or confirmation that there was any simulation of those characteristics, more a "fast, accurate emulation", which could easily be a stereotyped / exaggerated experience.
- pp19dd 11y agoThis ..... redefines the concept of "ray tracing" as I know it. An interesting proposition. Wonder if you could write a pov-ray module for this.
- fake-name 11y agoWhile this is technically awesome, I'd much, MUCH prefer to play without all the visual munging. Nostalgia aside, CRTs didn't actually look that good originally. They weren't used for their visual effects, they were used because they were cheap and easy. Why would you actively make your content look shittier? I suspect if you went back, and offered the people developing these games the option to play them on a modern display, without all the distortion and such, they'd much prefer it over the "CRT look". At least, please, PLEASE let the player turn the effects off.
- drewolbrich 11y agobashtian, I suggest that you disregard fake-name's criticism. Do whatever you think looks best to you, and stick with it.
- fake-name 11y agoTo be clean, I think this is quite cool. Just, if you're going to release it, give me an option to turn it off.
- Sephiroth87 11y agoExcept developer totally used the CRTs limitations to their advantages for cool effects (transparency, more colors on screen than allowed, etc...), so having them enabled, while maybe not looking sharp, are how the game is actually supposed to look... Look at the first post for a concrete example
- bitwize 11y ago> Nostalgia aside, CRTs didn't actually look that good originally. They weren't used for their visual effects, they were used because they were cheap and easy. Why would you actively make your content look shittier? For the same reason Quentin Tarantino is pouring much of his personal fortune into a movie theater that will run films in celluloid only. For the same reason vinyl is making a huge comeback. People think the shitty output is "richer", "warmer", and "more authentic"; and the better output is "cold" and "mechanical". It's post hoc justification of nostalgia: people want to recreate the experience they had when they first saw a movie/listened to a record/played a game. They want the thrill back, or at least a reminder of it. I'm guilty of this myself; when I run an xterm it's usually green (#7fff7f) on black or amber (#daa520, X11 color "goldenrod") on black, in a nice pixely font like Glass Tty VT220. Because I'm on a Unix system and want to feel the thrill of Unixing.
- tadfisher 11y agoThis technique is very important for emulation and simulating the look of early games. For example, the Genesis/Mega Drive did not support hardware alpha transparency. Many games (including the Sonic series) simulate the effect by alternating vertical lines, and relying on the "visual munging" of CRTs to produce a convincing effect. Here is a video that demonstrates the effect in Shinobi 3: https://youtu.be/YFOkbfpIlaY?t=2m52s https://youtu.be/YFOkbfpIlaY?t=2m52s (You can also notice the stippled pattern in the pool of water to the right, used to produce the same effect.) Another technique is the use of stippling to simulate smooth textures and surfaces. For example, this screenshot of the Super Metroid start screen looks pretty terrible by modern standards: http://static.giantbomb.com/uploads/original/0/4527/1093273-super_metroid___title_screen_550x.jpg http://static.giantbomb.com/uploads/original/0/4527/1093273-... This would have looked much more convincing on a CRT display. Without simulating CRT distortion, you are not getting the same visual experience one would have had when running the game on hardware it was designed for. For modern games looking to simulate this experience, using these techniques along with a CRT shader will be very effective at bringing back the home console experience of the 80s and 90s.
- mrob 11y agoIt's hardly fair to call it "terrible" when you're scaling it with non-integer ratio nearest neighbor scaling (causing uneven original pixel sizes), then compressing with a lossy algorithm designed for completely different images. SNES (and NES) screenshots are difficult to display well on modern systems because the (S)NES had rectangular pixels instead of square pixels as used today. I recommend scaling to some large integer multiple of the original size with nearest neighbor, and then scaling to the correct aspect ratio with your favorite resampling filter. And if you insist on using JPEG compression then at least use 4:4:4 chroma subsampling - chroma artifacts are very obvious in pixel art. I also dispute the assertion that CRT artifacts were required or intended by all graphics designer back then. Evidence: LCD based portable systems and line doubled mode 13h DOS games both used the same dithering techniques, but they had sharp pixels. And many games used dithering type patterns to represent fine detail instead of blended colors, eg. the typewriter in the background near the start of Chrono Trigger. I grew up with DOS games so I personally prefer sharp pixels. The most important feature of a CRT is the low persistence - eliminating sample and hold blur. This is now available in fast modern LCDs with strobing backlights, or with black frame insertion displaying 60Hz content on a 120Hz monitor. It makes a very big difference for fast scrolling 2D games.
- Animats 11y agoIt's not a CRT thing, it's a NTSC thing. He seems to be trying to emulate NTSC (analog broadcast TV) color, not RGB. NTSC color signals have much lower bandwidth than the intensity signal. You can only go through the entire color gamut about 10 times across the width of the screen. So, for NTSC emulation, you should convert each scan line from RGB to YUV, then low-pass filter the UV component, then reassemble. You'll now have sharp edges where the intensity changes and fuzzy edges where the color changes, just like crappy old NTSC devices. This is strictly a horizontal phenomenon - in the vertical dimension, adjacent scan lines can be completely different colors without artifacts.
- 6502nerdface 11y agoI think TFA's also trying to emulate specifically CRT-related effects like phosphor glow/trails. Maybe sort of conflating NTSC and CRT effects into one "CRT simulation"