valadaptive / ntsc-rs

Free, open-source analog TV + VHS effect. Standalone application + plugin (After Effects, Premiere, and OpenFX).
Other
241 stars 4 forks source link

(suggestion) vhs emulation luma "smearing" #28

Closed nlolnlolnlolnlo closed 4 months ago

nlolnlolnlolnlo commented 5 months ago

something that i've noticed when comparing the vhs emulation of ntsc-rs to real vhs is that ntsc-rs lacks the ability to replicate any kind of smearing in the luminance channel which is noticeable when using elements with high contrast, or when recreating generation loss. would it be possible to add some options to emulate this behavior?

i have attached some screencaps. the first screencap is a test pattern i created recorded to a real vhs tape in standard play mode. the pattern was recorded losslessly over s-video with a mitsubishi hs-u780 vcr and sony t-120vf vhs videotape, and the recording was captured with an i-o data gv-usb2. no additional shapening was done to the recording in the vcr or afterwards, however i've averaged identical frames together to remove any noise that occurs frame-by-frame.

the second screencap is my best attempt at tuning ntsc-rs to match this output. while the chroma does look close enough, the lack of smearing is very obvious when compared to the real recording. as with the real vhs screenshots, i've averaged together two frames to remove the dot crawl.

the third screencap is the source for both the vhs and ntsc-rs images, the test pattern over s-video. this is exactly what went into the vcr, and once captured was also what went into ntsc-rs.

if you would like, i can provide the raw lossless recording of the pattern on vhs. i have also attached the preset used in ntsc-rs.

--

smear_pattern_averaged

vlcsnap-2024-01-16-14h40m09s658_ntsc2

vlcsnap-2024-01-16-14h40m09s658

smear.json

valadaptive commented 5 months ago

I definitely want to add luma smear at some point. I tried using a lowpass filter a while back and blending it with the original luma, but that didn't produce very good results. Maybe the trick is to use a constant-k filter for separating the luma and chroma? I'll experiment more.

Degamisu commented 5 months ago

This can be achieved by extracting each parts of the VHS picture, then modifying the chroma layer. An example of the parts look like this:

image Parts of a VHS picture

Degamisu commented 5 months ago

for example, gaussian in the chroma channel on the horizontal axis could result in some sort of smear pattern! just a few color adjustments and you could get the different color smear depending on direction.

valadaptive commented 5 months ago

This can be achieved by extracting each parts of the VHS picture, then modifying the chroma layer.

Read over the feature request more closely. They're asking about luma smear, not chroma. A lowpass filter on the chroma signal is already implemented.

Degamisu commented 5 months ago

ah i see. in that case, you could mess with the luma part of this.

fukionline commented 5 months ago

All of you people trying to make the filters even more accurate are actual legends

nlolnlolnlolnlo commented 4 months ago

after doing some testing, i've come up with a sloppy way to approxmiate it. this is a proof of concept and probably not that good .. but it's something!

from tinkering with the output it seems like just nudging the existing luma over by a few pixels at a low intensity is enough to look about 90% of the way correct. this probably isn't how actual vhs luma smear works but it's close enough for my purposes.

i would assume that this would have to go before ringing, since the ringing artifacts are visible over the smeared parts.

Untitled-1

valadaptive commented 4 months ago

I've added experimental luma smear support in 0.5.2. Let me know how well it works.

nlolnlolnlolnlo commented 4 months ago

ntsc_rs_smear_testpattern_ntsc i think that's it! closing this issue now

BruhMomentXDD commented 4 months ago

LET'S GO

fukionline commented 4 months ago

w

Degamisu commented 3 months ago

nice!