• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Upscalers, CRTs, PVMs & RGB: Retro gaming done right!

Status
Not open for further replies.
I've tried 3:2, 5:4 in addition to 4:3. Really looking for a way to force an exact number of samples per line. Thought maybe forcing the custom H.ACTIVE values might do it but I'm not getting it yet. I tried 512 aka 256 times two but that wouldn't account for the horizontal blanking.

I assume you also tried not forcing a specific aspect ratio?

hm. does other capture software also have that scaling issue? My amarec seems 1:1 with my input, though tbf it's 1080p so there's more room for leeway.
 

Timu

Member
Yeah, I have. It's actually pretty great, almost perfect now. I'm thinking it repeats a frame maybe every eight seconds apart or so, which probably has to do with my video card not outputting at the exact same frequency or something. NTSC is what, like 59.94 fields per second, I'm not sure what my video driver is outputting when I choose "59" instead of 60. Or maybe it's something else.

Either way, it's pretty good and the vertical axis is PERFECT, which is what I'd expect because the capture device has to sync to it. The horizontal axis is doing some scaling/averaging, but that's to be expected given that every console has various timings for resolution on the horizontal, various modes per console etc. So I don't know if there's too much to be done, and if so it would have to be tweaked regularly depending on the system and game.

Here's an example from the checkerboard image (I zoomed WAY in to illustrate). Note that there is no averaging from scanline to scanline, but there is definitely some sampling error along the X axis.

1gACeax.png


Horizontal resampling issues not withstanding, it's crazy how much screen grabs and lossless video look like emulator screenshots if you don't zoom in.

YlVPgzl.png
TBH, when I capture 240p games they all output at 720x240 but with scan doubling or using RGB(from the capture card itself) it outputs at 720x480, and 720x480 is also what Dreamcast, PS2, Xbox, Gamecube and Wii games outputs as well.
 
TBH, when I capture 240p games they all output at 720x240 but with scan doubling or using RGB(from the capture card itself) it outputs at 720x480, and 720x480 is also what Dreamcast, PS2, Xbox, Gamecube and Wii games outputs as well.

Same here. But integer resampling doesn't hurt image quality, so that's fine. I'm looking to get integer resampling in the X axis aka the horizontal.
 
720x480p is the standard NTSC progressive res. That's the '480p' you should get from consoles. 240p is a bit more varied, but that's also frequently 720
 

Mega

Banned
^Consoles are tightly fit underneath in two similar metal shelves. I have a small night stand to the right holding the 14" and 8" PVMs and a scart switch. I tend to shoot close because it's our bedroom and I'm not trying to show off out personal clutter. :)

i look forward to cameras being good enough that CRTs photograph well.

...what? Cameras can already do a great job of off screen capture of CRTs.

But is that your takeaway from my post? The above was not taken to show off the quality of CRT tubes. It's a cropped image from my phone's default camera app, casually taken to show we're having fun playing games on my setup. No calibration or effort was put into taking an amazing exemplary photo.
 

Khaz

Member
TBH, when I capture 240p games they all output at 720x240 but with scan doubling or using RGB(from the capture card itself) it outputs at 720x480, and 720x480 is also what Dreamcast, PS2, Xbox, Gamecube and Wii games outputs as well.

What happens when the horizontal resolution isn't 720? For example, something that doesn't scale well like 640? Does it distort pixels to have them fit in a 720 scale?
 

Timu

Member
What happens when the horizontal resolution isn't 720? For example, something that doesn't scale well like 640? Does it distort pixels to have them fit in a 720 scale?
It's always been 720 for everything I do when it comes to direct feed.=O Unless you use an converter/upscaler, which I have one that actually does 640x480.
 

Khaz

Member
It's always been 720 for everything I do when it comes to direct feed.=O Unless you use an converter/upscaler, which I have one that actually does 640x480.

I mean, the grid posted above look like a random horizontal resolution fit into an arbitrary 720 scale. If you have 640 alternating black and white pixels on a line, and you try to fit them in 720 boxes, you're going to have problems, either fill some with greys, or nearest black or white.

I'm not up to par (at all) about capture cards and digitizing devices in general. But it seem to me that being able to identify the horizontal resolution, or for the user to put the number in, is essential for an accurate capture. You can then stretch the pixels as you will to get the aspect ratio you want (just like an actual tube).
 
I mean, the grid posted above look like a random horizontal resolution fit into an arbitrary 720 scale. If you have 640 alternating black and white pixels on a line, and you try to fit them in 720 boxes, you're going to have problems, either fill some with greys, or nearest black or white.

Most SNES games render somewhere in the neighborhood of 256 pixels across. Doubled that is 512 (and SNES can actually render 512, though almost no game does).

It isn't a 640->720 issue, it's more of a (512 + the blanking on the sides) - > 720 issue.

Ideally you'd probably sample something like 572 (ish) across to get 512 (integer scaled 256) of actual game display when removing the black bars. Or sample super high so the results are better when scaled into 640 or 720 or whatever.

Of course, you'd end up with non-square pixels so the image would look skinny on a fixed-pixel display, but that's better than the scaling artifacts. That's why people are so happy about the new SNES games for 3DS, they offer a pixel-perfect mode.
 
This TV is within reach, Wega 40" TV - KV-40XBR800. Is it worth the muscle and effort to get it in my house? I now have the space and would use it for all retro consoles and light gun games, it also has HDMI.
 
...what? Cameras can already do a great job of off screen capture of CRTs.

But is that your takeaway from my post? The above was not taken to show off the quality of CRT tubes. It's a cropped image from my phone's default camera app, casually taken to show we're having fun playing games on my setup. No calibration or effort was put into taking an amazing exemplary photo.
You really take my posts far too seriously. It's cool that you and the kids are playing Zelda together, let alone on high quality monitors like that. My comment was speaking to the weird visual effects you get when photographing a crt from anything distance. The strange warped lines that I assume are representative of the curvature of the screen and the nature of crt images in general. In short, it looks even better in person.
 
This TV is within reach, Wega 40" TV - KV-40XBR800. Is it worth the muscle and effort to get it in my house? I now have the space and would use it for all retro consoles and light gun games, it also has HDMI.

In my experience, this type of Sony set typically re-scans all 480i-timed content (including 240p) to 960i and 480p (your choice) and this process messes up light guns. 240p may not even look like 240p on it. Take something to test it with.
 
In my experience, this type of Sony set typically re-scans all 480i-timed content (including 240p) to 960i and 480p (your choice) and this process messes up light guns. 240p may not even look like 240p on it. Take something to test it with.
Aw, I don't like this answer lol. Does this apply to all Trinitrons, or just the one with the HDMI?
 

Mega

Banned
You really take my posts far too seriously. It's cool that you and the kids are playing Zelda together, let alone on high quality monitors like that. My comment was speaking to the weird visual effects you get when photographing a crt from anything distance. The strange warped lines that I assume are representative of the curvature of the screen and the nature of crt images in general. In short, it looks even better in person.

Posts, plural? I think I had one interaction with you ITT I'd call serious. Your post read as critical and out of place to me. If nothing was meant by it, no worries. No one's mad.

It's possible to take photos of CRTs that don't show any weird effects at all. People in the Scanline thread do it all the time. Some factors are the camera,lens, shutter speed, distance, the CRT tube, refresh rate, resolution, etc. A 15KHz, 240p 8/16-bit game is probably the easiest of all. I've had some trouble with PSP recently and Wii games in the last. Also, you may be seeing fringing and moire on your display that isn't in the actual photo... this commonly happens if the browser is scaling the image down to a weird percentage of the original size. GAF's quote can make an ugly mess out of pics too.

Beautiful! That must be so fun :D

Thanks, it is! Except when they start asking to play what the other is playing, then change their mind. Like one was playing Gamecube OOT, switched to Wii TP, then wanted to go back to OOT when his little brother was already playing it! I put my foot down and said no, you had your turn on that! Commit to the new game you picked. They should be so lucky to each have a screen and game. I shared one TV, one console with all of my family.
 

mdzapeer

Member
Dont know if this is the right thread, but I have been playing around with CRT shaders, Lotte's CRT (sweetfx) shader is the one I really like but feel can do better. The biggest problem is that there is no way to use the same shader between applications. Remember to view them in full screen...

This is with the FF7 PC verison:

CB9E7CCE45B1F6D210D85618C5084CA2B595886B


013E43A7DF1FFD1D99AA04858E6AE42AAC9B39C1


This one is more matching the Low res PS1 output, it works better with PS1 native res emulation but the PC version the text gets garbled since its for higher resolutions.

341FEB2F1072D31172F9D4B79E0280DCB5EA3C98


69EABEE2B6C1FBB40B7CAEEA9B96F325F75BF474
 

Khaz

Member
Most SNES games render somewhere in the neighborhood of 256 pixels across. Doubled that is 512 (and SNES can actually render 512, though almost no game does).

It isn't a 640->720 issue, it's more of a (512 + the blanking on the sides) - > 720 issue.

Ideally you'd probably sample something like 572 (ish) across to get 512 (integer scaled 256) of actual game display when removing the black bars. Or sample super high so the results are better when scaled into 640 or 720 or whatever.

Of course, you'd end up with non-square pixels so the image would look skinny on a fixed-pixel display, but that's better than the scaling artifacts. That's why people are so happy about the new SNES games for 3DS, they offer a pixel-perfect mode.

Wait, the sampling happen before or after the pixels have been captured? I feel like it would make a world of difference. Capturing 512 actual pixels and then sample them to whatever, instead of trying to fit 512 pixels on a 720 scale with approximations in between, with the approximate result sampled to whatever native resolution.

It's the observation that "capture always happen at an assumed 720 resolution" that triggered me. It just seems like an odd thing to do, from an outside perspective.
 

Timu

Member
It's the observation that "capture always happen at an assumed 720 resolution" that triggered me. It just seems like an odd thing to do, from an outside perspective.
I've used like 5 or so capture cards(own 2 now) and it's always been like that! It's probably due to the NTSC signal, just as NormalFish said.
 

Peltz

Member
Dont know if this is the right thread, but I have been playing around with CRT shaders, Lotte's CRT (sweetfx) shader is the one I really like but feel can do better. The biggest problem is that there is no way to use the same shader between applications. Remember to view them in full screen...

This is with the FF7 PC verison:

CB9E7CCE45B1F6D210D85618C5084CA2B595886B


013E43A7DF1FFD1D99AA04858E6AE42AAC9B39C1


This one is more matching the Low res PS1 output, it works better with PS1 native res emulation but the PC version the text gets garbled since its for higher resolutions.

341FEB2F1072D31172F9D4B79E0280DCB5EA3C98


69EABEE2B6C1FBB40B7CAEEA9B96F325F75BF474

tumblr_inline_o203ksdwTf1rrn1y1_500.gif
 

Khaz

Member
This TV is within reach, Wega 40" TV - KV-40XBR800. Is it worth the muscle and effort to get it in my house? I now have the space and would use it for all retro consoles and light gun games, it also has HDMI.

This is an HD CRT TV. In my experience, Consumer HD CRTs only do HD, not SD. They would scale up 240p and 480i to 480p. One frame of lag for the upscale, no lightguns allowed. No lag for HD content though.

Try to research if this model can do 240p 480i natively. As it's a consumer TV I doubt it would, but you never know. Check the horizontal scan rate, if it's a range like 31-41kHz then it's HD only, if it goes as low as 15kHz then it supports SD natively. You may have to delve into service manuals to get that info.

It's still a very good TV, I'd take it to play 6th gen games, PS2, GC, Dreamcast, Xbox. Maybe Wii but widescreen is cool on Wii.

Trinitron is a Sony brand describing how the tube is made (aperture grille). You can have HD Trinitrons, SD Trinitrons... It gives a sharper picture, but some people prefer the softer aspect of non Trinitron TVs (slot mask).
 

televator

Member
Dont know if this is the right thread, but I have been playing around with CRT shaders, Lotte's CRT (sweetfx) shader is the one I really like but feel can do better. The biggest problem is that there is no way to use the same shader between applications. Remember to view them in full screen...

This is with the FF7 PC verison:

CB9E7CCE45B1F6D210D85618C5084CA2B595886B


013E43A7DF1FFD1D99AA04858E6AE42AAC9B39C1


This one is more matching the Low res PS1 output, it works better with PS1 native res emulation but the PC version the text gets garbled since its for higher resolutions.

341FEB2F1072D31172F9D4B79E0280DCB5EA3C98


69EABEE2B6C1FBB40B7CAEEA9B96F325F75BF474

Pretty cool. There's a dedicated thread for this sort of thing, but what you're doing completely overlaps with this thread. There are people who will poo-poo comment here, but I totally invite all display discussion here. There are things worth discussing whether it's emulated or on real hardware. For instance, in lieu of a CRT, emulation totally has the upper hand in the lack of dithering artifacts. If you hooked up real hardware to an HDTV, the result would likely be a cross hatched dither pattern all over the screen.
 
Aw, I don't like this answer lol. Does this apply to all Trinitrons, or just the one with the HDMI?

All Sonys with DRC.

Wait, the sampling happen before or after the pixels have been captured? I feel like it would make a world of difference. Capturing 512 actual pixels and then sample them to whatever, instead of trying to fit 512 pixels on a 720 scale with approximations in between, with the approximate result sampled to whatever native resolution.

It's the observation that "capture always happen at an assumed 720 resolution" that triggered me. It just seems like an odd thing to do, from an outside perspective.

Still figuring everything out myself.
 

mdzapeer

Member
Those pics of FF7 are from the PC version...so it is the REAL hardware. In this case using a CRT shader to get the original intended effect.

I wish major publishers/developers would start working on developing more advanced CRT shaders.

Imagine if Sony launched the PS1 classics emulation on PS4 with CRT shaders support for the emulated games. I think most younger people don't know how those games were actually meant to look like, it changes the entire look of the game.

It will go a long way on restoring the public image of these games to what they were supposed to look like.
 

televator

Member
Those pics of FF7 are from the PC version...so it is the REAL hardware. In this case using a CRT shader to get the original intended effect.

I wish major publishers/developers would start working on developing more advanced CRT shaders.

Imagine if Sony launched the PS1 classics emulation on PS4 with CRT shaders support for the emulated games. I think most younger people don't know how those games were actually meant to look like, it changes the entire look of the game.

It will go a long way on restoring the public image of these games to what they were supposed to look like.

Oh... Right. I sorta phased that detail out in my mind. lol Still, modern PC rids the issue of dithering as bandwidth and memory is less a problem nowadays. CRT shaders have gotten good, but there's still a lot that can and I imagine will be improved.
 
You can actually down sample from 4K with a CRT shader, It works best with Gedosato because it has the better resizing algorithm options (lanczos). But Nvidia DSR also works too. I will try to get some screenshots.

I'm not sure that'll resolve the current issues with CRT shaders, though, namely clarity. 'true' 4k will able to better represent the various aspects of a CRT without blurring things. Downsampling is definitely better than native 1080, though.
 

mdzapeer

Member
Ugh steam keeps resizing the images to 1080p when I try to upload them...even as Artwork. Forget about it, they are not being captured properly anyway, lots of compression artifacts.
 

Peltz

Member
Pretty cool. There's a dedicated thread for this sort of thing, but what you're doing completely overlaps with this thread. There are people who will poo-poo comment here, but I totally invite all display discussion here. There are things worth discussing whether it's emulated or on real hardware. For instance, in lieu of a CRT, emulation totally has the upper hand in the lack of dithering artifacts. If you hooked up real hardware to an HDTV, the result would likely be a cross hatched dither pattern all over the screen.

I should have clarified... my snarky "poo-poo" gif wasn't about the direction of the discussion, but rather the vaseline-like filter being applied to image. I can't be the only one that thinks that looks way too soft.
 

TeaJay

Member
But FF7 on my PS1 doesn't look even close to that blurred. FF games, Chrono Cross, SoTN, etc. are crisp, colorful and beautiful.
 

Rich!

Member
On the topic of emulation shaders, I too dislike the over the top ones with exaggerated curvature, convergence and signal degradation. I currently use the hylian shader which gives me an image incredibly close to my JVC PVM crt. Some comparisons between the two:

58YK0lkl.jpg


k5LdycSl.jpg


DoDpFRil.jpg


y2lfczIl.jpg
 

Mega

Banned
^That looks spectacular.

I agree a bunch of filters are too heavy handed, incredibly blurry and fuzzy, worse than even RF and Cpmposite on a decent consumer TV. I remember the Rare Replay filter was particularly bad. I have a couple of favorites in RetroArch and stick to them.
 

missile

Member
Those pics of FF7 are from the PC version...so it is the REAL hardware. In this case using a CRT shader to get the original intended effect.

I wish major publishers/developers would start working on developing more advanced CRT shaders.

Imagine if Sony launched the PS1 classics emulation on PS4 with CRT shaders support for the emulated games. I think most younger people don't know how those games were actually meant to look like, it changes the entire look of the game.

It will go a long way on restoring the public image of these games to what they were supposed to look like.
In the works. Yet it's needs much more than just 4K.

Working on a 3d glass shader with light scattering effects and stuff. Will see.
 

televator

Member
Yesterday I started playing around with creating a RGB CRT material on UE4, here are the results:

GYv1dJ0.jpg

vyNCdJW.jpg

t2FaHCF.jpg

qpqQbh2.jpg

jz0amX0.jpg

hxuduMd.jpg


The material mimicks an aperture grille TV, not a shadow mask one.



Savage

This interests me beyond belief! I've gone on record saying that TV viewing could go beyond the spacial limitations of modern tech in some way. What resolution is this simulation running at? Details, please. I want to know what you know... I want to know everything. :p
 

televator

Member
VR CRT. All digital, no geometry issues, no squeal, no degradation, no size limit. Imagine a 42" Pro monitor like a Mitsubishi Megaview... Or bigger... Oh Lordy lord...

This could be my true holly grail.
 

M3d10n

Member
This interests me beyond belief! I've gone on record saying that TV viewing could go beyond the spacial limitations of modern tech in some way. What resolution is this simulation running at? Details, please. I want to know what you know... I want to know everything. :p

There's no set resolution, since it's a material on a surface in 3D space. Here's how the TV screen looks up close:

Some details aren't entirely accurrate because I was focused on getting a proof of concept working first. I use two mask textures: one for the apperture grille and other for masking the "raster beam" (aka: the scanlines):
Cf2t2Ad.png

The grill is a picture from a real set, but the "beam mask" is a quick paint.net job that has no basis on any real data, for now. The grille is "fixed" like on a real TV: there are enough for 720 vertical lines and the image is "beamed" on it, no matter what the source's horizontal resolution is. The scanlines are the ones that match vertical resolution.

Here's an overview of the material itself:

I'm not doing anything fancy such as generating a YUV/NTSC signal or anything like that, so you could call this a "virtual RGB monitor", since I'm using RGB values during the entire process.

There's two tricks in the way texture coordinates for sampling the source image are calculated, where I make an attempt to mimic the way the raster beam works:

- There's no vertical interpolation/filtering (I round down the Y coordinates so they always grab a pixel center). The raster beam works line by line, so it shouldn't blend the color of different lines. (I actually had to make the shader gradually re-enable vertical interpolation when the camera gets far away from the screen enough to not make out the scanlines, otherwise the image would shimmer).

- Horizontal interpolation still exists since the beam's color switching isn't instantaneous, but it's made shaper/faster than linear interpolation/filtering by elevating the fractional part of the texel coordinate to some power (I'm using 2). This is another part that isn't based on real data, it just looks good.

One problem I had (and still have) to deal with was dealing with shimmering and moire artifacts on the grille and scanline masks when viewing the screen from afar. It's mostly solved by using mipmaps generated with additional blur settings, so the grille and scanlines gracefully "melt together" when the camera gets far. I still have shimmering issues with the actual game image at a distance, since the emulator buffer has no mipmaps. I'll probably have to multisample it to keep it stable.

The rest is done by UE4's fantastic rendering pipeline: I just output HDR values from my "TV" and UE4 does the rest (bloom, exposure, etc). The material uses UE4's "clear cot" shading, so the CRT's "phosphor" layer has low, diffuse reflectivity compared to the "glass" layer, which is polished and shiny.
 

televator

Member
I don't understand what this is.

It's awesome. Just know that. :p Heck, probably 2/3 of technical stuff goes over my head too. I sometimes feel bad asking questions to answers I don't fully grasp, but I figure someone has to.

There's no set resolution, since it's a material on a surface in 3D space. Here's how the TV screen looks up close:

Well I figured that the surface has no set resolution. Like asking what resolution the wireframe of the TV has. The question makes no sense, of course. I guess I'm wondering what highest resolution is on VR goggles currently that this simulation could run on?

RGB color space is more than just fine. Euro TVs supported it anyway and consumer NTSC TVs upsample back to RGB out of necessity. Down sampling to YUV is just extra work for lost bi-pixel color data. It's almost as pointless as simulating dithering and/or pixel depth down sizing in limited memory, IMO from a purely technical standpoint. Not to say that you have to be concerned with my standards in your personal project, though. Whatever it is you're after, I still find this fascinating for its potential.

Question: Just for the sake of versatility, would it be possible to capture game footage from a real console on the fly and impose that into your simulation? Not that I demand to see you do it, but just wondering if that's possible in any practical sense.

I definitely would love to see how much more you progress with this. Thanks for sharing!
 
Status
Not open for further replies.
Top Bottom