English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   request.UAE Wishlist (https://eab.abime.net/forumdisplay.php?f=56)
-   -   CRT Curvature simulation. (https://eab.abime.net/showthread.php?t=65301)

Leandro Jardim 06 August 2012 01:14

CRT Curvature simulation.
 
Would be very "retro", CRT curvature simulation with adjustable threshold, to be used with PAL filter or aperture grilles or both. :)

Photon 10 August 2012 18:37

It's not dead difficult technically, but it's very difficult to make slight curves look good. I bet you can't find a single home computer emulator that has this and it doesn't look crap!

Toni Wilen 10 August 2012 21:59

Perhaps hardware D3D tessellation can be used to create good looking results, at least it would allow configurable ratio = the better PC, the better result!

Photon 10 August 2012 23:07

Exactly, it's about resolution. I think it would look like vomit without scanlines - you'd have to see the curvature to understand/accept the distortion (and to avoid antialiasing-pixels getting stuck together regardless of technique and becoming blobs).

The PC demos that have attempted this for some strange nostalgic-but-not-nostalgic-enough-to-code-for-the-platforms-to-which-they-pay-homage reason have heavily exaggerated the curvature and added layers of interference -- to cover up the fact they cannot produce the lovely pillow-shaped pixels and the not-ridiculously-exaggerated-contrast-ratio-neon-colors-but-subdued-candy-glow that are the reasons CRTs are awesome (not scanlines, curvature distortion, or TV type PAL coloring and moire patterns).

I still think results that look good are simply not achievable, but of course WinUAE could be the first ;) Me, I liked PAL+Scanlines on the 15", 1920x1080 of my Dell laptop, and I haven't had similar success with same on bigger non-CRT screens.

You can tell how passionate I am about this by the sheer number of hyphens in this post. Don't mess with the hyphens!

Leffmann 10 August 2012 23:52

Cathode makes it look pretty authentic: http://www.secretgeometry.com/apps/cathode/

Leandro Jardim 11 August 2012 00:45

Nestopia for example, can simulate the CRT curvature and even have a threshold, what do you think about its quality? :)

PS. I seen myself, Nestopia effect looks like a blob.

Leffman: Its so authentic the look of that effect!

gullden 11 August 2012 07:09

@Leffmann

Thanks for the link, that was a really cool terminal, just had to give it a go.

Toni Wilen 11 August 2012 10:33

Actually I think not that complex shader code could do this quite easily without need for any real vertex geometry.

Amiga demos that had real-time magnifying lens used similar simple pixel shifting method.

Retroplay 11 August 2012 14:26

It take it, it's something similar to HLSL, like in MAME ?

http://www.youtube.com/watch?v=iCSUOQalFcQ
http://www.mameworld.info/ubbthreads...&Number=270919

Toni Wilen 11 August 2012 19:36

Yes. WinUAE already has D3D shader support, someone only need to write the shader :)

Photon 11 August 2012 19:58

Quote:

Originally Posted by Leffmann (Post 833291)
Cathode makes it look pretty authentic: http://www.secretgeometry.com/apps/cathode/

Hah :) That's what I mean by exaggerating the curvature (they also exaggerate some other things like phosphorescence delay etc.)

Now, the Mac has a very high resolution, 2560x1440, so 720x256 blown up to this size poses less of a problem. At <1600px, the artifacts would start to creep in.

Toni: I think it's better to focus on emulating the positive properties of CRTs: shaping the pixels as pillows and allowing users to calibrate settings for some handy 4096-color test graphic to where it looks correct (you could implement a proper palette and match it to the monitor's color profile, but noone ever installs those profiles).

Leandro Jardim 12 August 2012 04:20

I think that Photon is right too. :) The algorithm chosen should simulate only the properties that give the best properties of the CRT.

For example, I personally like the PAL filter but it lacks the color correction that it needed. This is bad because we all use it to see its CRT-like colors, but they arent very correct yet, at least compared to many CRT TVs that we have.

The blurring of the pixels is nice too, it gives a soft appearance to the jagged lines that none other filter does.

With it I personally use the aperture grille 2x4rb.png that we find on the WinUAE home page to emulate that rectangular dots of the CRT TVs. It works superb on a window, at least I think! But when I resize it or show it in fullscreen, they do not adapt regularly to the resized display, and loses resolution, losing the cool effect of how the pixels are affected by the mask. :(

Yes, this is a very fun subject... :D

Leffmann 12 August 2012 14:10

Quote:

Originally Posted by Photon (Post 833413)
Hah :) That's what I mean by exaggerating the curvature (they also exaggerate some other things like phosphorescence delay etc.)

Now, the Mac has a very high resolution, 2560x1440, so 720x256 blown up to this size poses less of a problem. At <1600px, the artifacts would start to creep in.

I guess it's mostly for demo purposes. You can adjust the individual effects anywhere from disabled to extreme. I looks pretty good even on my small 1280x800 screen.

FrodeSolheim 13 August 2012 01:36

Hi, there are curvature / CRT shaders available for FS-UAE. FS-UAE 1.3 implements XML Shader Spec 1.1 which means that it can use shaders written for other emulators as well, such as bsnes. Recent development versions of FS-UAE include a CRT curvature shader.

There are a couple of screenshots in this thread (one showing a curvature shader, and other showing curvature + CRT effect):
http://eab.abime.net/showthread.php?t=64137

Photon 16 August 2012 20:06

The Moire artifact (due to scanlines) in the NES screenshot in that thread is in part what I'm referring to. It's fine with me if someone makes a perfect CRT curvature. Of course lores stuff looks cooler with curvature and filtering, anything looks better than verbatim RGB on a 1000:1 contrast oversaturated screen and Hitler-square doublescan pixels! ;) That's why we think even PAL filters in VICE etc look so much more true to the real thing.

Currently, there are no proper settings to achieve matching colors with scanlines (of course near-impossible without scanlines) for Amiga on a TFT. Even on a PC-CRT with scanlines it's hard, see my thread.

It's just that it would be so typical to see CRT emulation never getting just proper pixel shapes right and allowing users to calibrate matching colors for their TFT, while they will get all kinds of filters that do 'camp' things and mismatch the colors. If I'm sounding like the same-old "we need none of that fancy-schmancy stuff" it's because I understand the real problem and would like to see better things happen for the emulator for this specific computer :)

Basics+curvature, fine. Curvature without the basics, not so good. This is how I feel about it, anyway.

chiark 07 September 2012 09:08

Bear in mind that Cathode is not working with pixels per se, but it's got a vector source (font) to play with: my guess (and it's only a guess) is that it's a lot easier to create a convincing effect with a vector source than it will be with mere pixels...

StingRay 07 September 2012 09:43

Quote:

Originally Posted by Toni Wilen (Post 833328)
Amiga demos that had real-time magnifying lens used similar simple pixel shifting method.

Somewhat off topic but, out of curiosity, can you give an example for such demo? As all demos I can remember used lookup tables/precalculated data to achieve the lens effect. Would be nice to see a realtime implementation. :)

Toni Wilen 07 September 2012 10:49

Quote:

Originally Posted by chiark (Post 838314)
Bear in mind that Cathode is not working with pixels per se, but it's got a vector source (font) to play with: my guess (and it's only a guess) is that it's a lot easier to create a convincing effect with a vector source than it will be with mere pixels...

End result is still pixels and generating curves using vectors is painful.

Pixel shader "only" needs to calculate pixel's distance to center and then use trigonometric functions to calculate pixel offset (and possibly calculate average of nearby pixels if needed to make it smoother).

I'll try to do stupid lens shader just for fun. (Yes, it is far from CRT, I am still not interested in emulating analog artifacts of ancient display technology, Amiga Denise/Lisa output is pure digital, analog is illogical :))

Quote:

Originally Posted by StingRay (Post 838316)
Somewhat off topic but, out of curiosity, can you give an example for such demo? As all demos I can remember used lookup tables/precalculated data to achieve the lens effect. Would be nice to see a realtime implementation. :)

I meant "Real time" = effect was simple (pixel offsetting) and was done in real time, 50fps, instead of ray tracing or similar = easy and fast to simulate in pixel shader. I didn't mean implementation was real time.

StingRay 07 September 2012 10:59

Quote:

Originally Posted by Toni Wilen (Post 838319)
I meant "Real time" = effect was simple (pixel offsetting) and was done in real time, 50fps, instead of ray tracing or similar = easy and fast to simulate in pixel shader. I didn't mean implementation was real time.

Thought you meant it like that but wasn't 100% sure. And yes, it's quite a simple effect indeed.

DH 07 September 2012 11:20

I'm sorry to say this, but I have absolutely no use for something like this with WinUAE. Although the effect may be easy to implement I can't for the life of me understand why anyone would really go to the trouble of creating an effect that would probably and eventually just annoy you (my personal preference).

I'm with Photon on this, I'd rather see better things implemented into WinUAE.


All times are GMT +2. The time now is 13:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04759 seconds with 11 queries