CRT luminofor fading simulation

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

CRT luminofor fading simulation

Post by Eugene.S »

I want to ask nesdev people,
Is there an "emulator"or "filter" that capable simulate smooth luminofor fading like CRT?
As you can see, stars has comet tails:
Image
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: CRT luminofor fading simulation

Post by tepples »

I assume that playing with the "motion blur" effect of something like VisualBoyAdvance might provide a similar effect.

ObNES: To run NES games in VisualBoyAdvance, use PocketNES.
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Re: CRT luminofor fading simulation

Post by Eugene.S »

Just tested Stars-Field demo on VBA-M (+ pocketnes) with motion blur.
Absolutely no effect, stars doesn't have tails
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: CRT luminofor fading simulation

Post by lidnariq »

Googling "crt simulator" provides some links:
http://www.bogost.com/games/a_televisio ... ator.shtml (definitely seems to provide some ghosting emulation)
http://ascii.textfiles.com/archives/3786

The current CRT TV I have has a half life noticeably shorter than 1/60th of a second. I'd arbitrarily guess somewhere around 5ms.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: CRT luminofor fading simulation

Post by rainwarrior »

If you're okay with an exponential fade, you can implement something like this fairly cheaply by storing the previous frame buffer and blending it with the new frame buffer at some % blend (e.g. 50% blend). Basically like an audio delay with feedback.
Grapeshot
Posts: 85
Joined: Thu Apr 14, 2011 9:27 pm
Contact:

Re: CRT luminofor fading simulation

Post by Grapeshot »

Simply blending the current frame with the previous one doesn't produce the right result, since it blurs the front of moving objects and doesn't leave tails. What's needed is a blending mode that blends in more of the color of the current frame pixel if it is brighter than the previous frame pixel.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: CRT luminofor fading simulation

Post by lidnariq »

Well, not y[n]=k·y[n-1]+(1-k)·x[n] but y[n]=max(k·y[n-1],x[n]) then.

I guess it's not simply doable with a couple of transparent opengl textures.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: CRT luminofor fading simulation

Post by tepples »

The impression I got when I experimented with moving things around in a BASIC program on an Apple IIe with a monochrome monitor back in middle school is that the a CRT phosphor is like a piano string, decaying quickly over the short term and more slowly over the long term. So you'd need to feed the video signal into two different motion blur processes with two different time constants and then blend the state of both processes to the screen.

As a first approximation, you could try implementing it as 75% current frame, 25% state of feedback motion blur.
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Re: CRT luminofor fading simulation

Post by Eugene.S »

Funny effect: http://youtu.be/SKUHMEgfY_Q
Stars change their size/color and pulsate on motion.

I haven't seen anything like this on software "CRT Filters"
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: CRT luminofor fading simulation

Post by tepples »

This could be one of two things. If it also happens in an emulator, the game is changing CHR banks based on the horizontal scroll position. MetalStorm is known to do this as a way of faking parallax scroll. Otherwise, you're seeing the fact that each pixel covers only 5/6 of a PAL color subcarrier cycle, and an isolated colored pixel may end up darker or lighter depending on its momentary alignment with the subcarrier grid.
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Re: CRT luminofor fading simulation

Post by Eugene.S »

I haven't see size pulsations on emulators.
When you are using blargg's NTSC-filter, you can see color pulsations, but no size pulsations.
I think it's CRT effect.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: CRT luminofor fading simulation

Post by lidnariq »

Are you referring to the effect where the size of the image is proportionate to the brightness of the image? (i.e. crosstalk between the deflection circuit and the electron beam drive)
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Re: CRT luminofor fading simulation

Post by Eugene.S »

Yes, difference colors have different brightness.
Dark-blue star looks smaller than white star on CRT, but in real they have same size.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: CRT luminofor fading simulation

Post by lidnariq »

Oh, you're referring to electron beam size being a function of brightness, especially in older tubes where the electron emitter has eroded. I think MAME's CRT simulator does handle that.
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: CRT luminofor fading simulation

Post by mikejmoffitt »

You can get a similar effect by rendering the previous frame at 15% or so luminisoty, but with additive blending over the new frame, so that it does not darken the new frame at all. A few iterations of this should look similar.
Post Reply