View Full Version : I want to upscale a Super Nes video in HD
SuperLumberjack
14th April 2018, 14:50
And here, can you see the differences ? :)
Don't tell me that you can't see them please ! :p
See how the background moves, the sensation of weight of the characters and objets, the fluidity...
I know it looks identical with static pictures. I admit that it's hard to see. But there are subtle differences that make the sensation different too.
It's not only a question of "how it looks", but "how it moves" ! ;)
You will only see it if you watch the videos in fullscreen and with 1080p or 4k resolution.
Here is a new video, with a new script :D : https://youtu.be/PrrUjauNGto
I called the new script "Ultimate style - Clean version" :p It's a comparison between "Booya style" and "Ultimate style" !
[Edit : I did a new version of the script, with a more "old" look. It's interesting, because it's modern, but reminds the old sensations I find. But I kept the "Clean version", so I have a pure modern look or a mix modern/old... still without the scanlines or grids :D ]
Script for booya style with 8:7 aspect ratio :
AviSource()
Spline16Resize(1024, 1792)
BicubicResize(4936, 4320)
BicubicResize(2468, 2160)
PointResize(4936, 2160)
BicubicResize(2468, 2160)
Script for ultimate style clean version with 8:7 aspect ratio :
AviSource()
Spline16Resize(2560, 1920)
BicubicResize(4936, 4320)
BicubicResize(2468, 2160)
Note : I first upscaled in a resolution of 2560x1920 with Spline16 because it's a multiple of 320x240, and the output resolution of the Super Nintendo was 240p. I find the relief of the image is more correct like this.
https://media.joomeo.com/medium/5ad3dc5ce628e.jpg (https://media.joomeo.com/large/5ad3dc5ce628e.jpg)
https://media.joomeo.com/original/5ad3dc5ce628e.png
Script for booya style with 4:3 aspect ratio :
AviSource()
Spline16Resize(1024, 1792)
BicubicResize(5640, 4320)
BicubicResize(2820, 2160)
PointResize(5640, 2160)
BicubicResize(2820, 2160)
Script for ultimate style clean version with 4:3 aspect ratio :
AviSource()
Spline16Resize(2560, 1920)
BicubicResize(5640, 4320)
BicubicResize(2820, 2160)
https://media.joomeo.com/medium/5ad3dcb96b9aa.jpg (https://media.joomeo.com/large/5ad3dcb96b9aa.jpg)
https://media.joomeo.com/original/5ad3dcb96b9aa.png
What do you think ? :scared:
SuperLumberjack
14th April 2018, 16:25
Somebody knows how to remove the ringing like MadVR do with Media Player Classic please ? :)
I talked about it on the previous page.
Atak_Snajpera
14th April 2018, 19:04
Retro games look much better with CRT emulation enabled. Your upscalled images look weird and unnatural. Games didn't look like this in old days.
I definitely prefer this over your weird upscalling routine.
https://www.youtube.com/watch?v=B8Jea_k5DI4
SuperLumberjack
14th April 2018, 19:55
Yes I know, but the videos with scanlines can be problematic if not watched in full screen, you know ! :(
It's not for nothing that I try to find something in between, a subtitute :p
But I have to do lots of experimentations... :D
You know what ? I will share the original videos. So you will be able to test, if you want ;)
It's interesting me, because I'm not a big boss with AviSynth :o
SuperLumberjack
14th April 2018, 20:39
I think it's not so bad with my last script (even if I know that it's hard to see differences with static images, but I persist to say that I can see them with movement in videos) :)
https://media.joomeo.com/medium/5ad3dedddbcce.jpg (https://media.joomeo.com/large/5ad3dedddbcce.jpg)
https://media.joomeo.com/original/5ad3dedddbcce.png
Video to compare : https://www.youtube.com/watch?v=51iwiDlcQKk
https://media.joomeo.com/medium/5ad3df1c6069e.jpg (https://media.joomeo.com/large/5ad3df1c6069e.jpg)
https://media.joomeo.com/original/5ad3df1c6069e.png
Video to compare : https://www.youtube.com/watch?v=YXW6OOGxC-k
But it will never be like in the old days, it's clear !
SuperLumberjack
14th April 2018, 21:32
Here are the video, if you want to test ;) :
https://mega.nz/#!K5FRlJhb!pKqQ06WOnZVI5gLnSzpLj5Ix2aa36yGiozQuikkk77A
For the Donkey Kong Country games, the output resolution must be 1410x1080 or 2820x2160, and for Mr. Nutz and Super Mario World it must be 1234x1080 or 2468x2160.
SuperLumberjack
15th April 2018, 01:01
The difference between the renderer on a CRT and a LCD is quite impressive :) :
https://www.youtube.com/watch?v=6Iwq-blhOtE
Hard to reproduce I think...
Atak_Snajpera
15th April 2018, 17:28
Yes I know, but the videos with scanlines can be problematic if not watched in full screen, you know ! :(
It's not for nothing that I try to find something in between, a subtitute :p
But I have to do lots of experimentations... :D
You know what ? I will share the original videos. So you will be able to test, if you want ;)
It's interesting me, because I'm not a big boss with AviSynth :o
Instead of simple scan lines you should use crt grid
http://nix.moderatelyimpressive.com/shaders/ULUS10251_00000.png
This looks very convincing to me
https://youtu.be/xrpm8o17cHE?t=16m11s
raffriff42
15th April 2018, 18:14
Instead of simple scan lines you should use crt grid
[...]
This looks very convincing to me
https://youtu.be/xrpm8o17cHE?t=16m11s
Very interesting!
This is a shader effect BTW - maybe @MysteryX can help in getting them to work in AviSynth Shader (http://forum.doom9.org/showthread.php?t=172698).
Shader source: https://github.com/libretro/slang-shaders/tree/master/crt
magiblot
15th April 2018, 20:19
I made some research on this a few days ago and found the same picture as Atak_Snajpera.
Appearently the source is this one: http://forums.ppsspp.org/showthread.php?tid=6594&pid=109617#pid109617 (I guess what raffriff found was the source of the shader used in the video, instead)
The author offers the fragment shader code, but it is designed to work with the PPSSPP emulator (which I have never used). We really need MysteryX's help here.
It's not just the CRT grid, but also the bowing effect that makes me doubt wether this is an actual screen or not:
http://nix.moderatelyimpressive.com/shaders/ULUS10062_00000.png
poisondeathray
15th April 2018, 21:12
Personally, I like the look and style of the last few posts more
For producing the barrel image distortion, you can use DH's defish plugin
SuperLumberjack
15th April 2018, 21:15
This is very joli ! :)
But maybe a little too many grids ! If it's a CRT that is simulated here, it's very impressive, but I have the sensation to have the nose glued to the screen... :D Sorry ! :p
SuperLumberjack
16th April 2018, 06:36
Somebody knows for the anti-ringing please ? :p
Somebody knows how to remove the ringing like MadVR do with Media Player Classic please ? :)
I talked about it on the previous page.
https://media.joomeo.com/large/5ad08bdd809a6.jpg
https://media.joomeo.com/original/5ad08bdd809a6.png
Without the anti-ringing filter in MadVR :
https://media.joomeo.com/large/5ad08c0657899.jpg
https://media.joomeo.com/original/5ad08c0657899.png
With the anti-ringing filter in MadVR :
https://media.joomeo.com/large/5ad08c21358af.jpg
https://media.joomeo.com/original/5ad08c21358af.png
raffriff42
16th April 2018, 23:58
I have two humble suggestions. Forgive me if either one has been mentioned before in this thread.
One is PointSize to smooth the jaggies and create the partial illusion of higher resolution.
http://forum.doom9.org/showthread.php?t=154674
http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms
http://avisynth.nl/index.php/PointSize
PointSize only scales by integer factors such as 2x, 3x, 4x.
The other is GaussResize to perform the final resize and aspect ratio correction. GaussResize does not ring at all; no de-ringing is needed.
http://avisynth.nl/index.php/Resize#GaussResize
LoadPlugin("<path>\PointSize_x64.dll")
## (source RGB32)
LQx(4) ## retains some jaggies (best for 'digital' look)
#xBRZ(2) ## softer gradients (best for 'smooth' look)
ConvertToYV12(matrix="Rec709")
## (other filters here -- try QTGMC for example)
GaussResize(1408, 1080, p=70)
https://www.dropbox.com/s/c92e9srof78zhbc/PointSize-test-LQx4.jpg?raw=1
(LQx)
https://www.dropbox.com/s/7zlhfbaiy4s11yl/PointSize-test-brz4.jpg?raw=1
(xBRZ)
SuperLumberjack
17th April 2018, 01:35
Very interesting raffriff42 ! Thanks ! ;)
But a light "Oil painting" effect... Sorry, but I'm not totally convinced :p But however, it's interesting ! :)
Apart from that, I did an alternative version of my "Ultimate script" :D I called it "New vintage version" :p
This video of comparison between a CRT display and a LCD display inspired me : https://www.youtube.com/watch?v=6Iwq-blhOtE
My impression was that with the CRT display, the picture has almost a HD look with low resolution material (a Super Nintendo game in this case) compared to the LCD display which is showing big pixels, even if in reality, it's the LCD which is HD :o
I found that we have approximately the sensation of a vertical resolution 4 times bigger !
So I tried to do a trick :rolleyes:
I remind you that I choose to begin with a upscaling of the resolution 320x240, so I rose up to 2560x7680 and reduce the horizontal resolution to 1280 with PointResize.
It's like a vertical resolution approximately 4X more defined.
To create this script, I used this video of Donkey Kong Country played on a CRT display as a model : https://www.youtube.com/watch?v=3GtsHXgB4lM
And this too : https://www.youtube.com/watch?v=X3egFl03LVc
To have a similar image without scanlines or grids, I find it's not so bad :) :
https://media.joomeo.com/medium/5ad67461ab76f.jpg (https://media.joomeo.com/large/5ad67461ab76f.jpg)
https://media.joomeo.com/original/5ad67461ab76f.png
https://media.joomeo.com/medium/5ad6749b24a9b.jpg (https://media.joomeo.com/large/5ad6749b24a9b.jpg)
https://media.joomeo.com/original/5ad6749b24a9b.png
Anyway, it has always been a kind of trick or illusion ! So, I tried to do the same to get relief !
Here is my script :
Script for ultimate style new vintage version with 8:7 aspect ratio :
AviSource()
Spline16Resize(2560, 7680)
PointResize(1280, 7680)
BicubicResize(2468, 2160)
https://media.joomeo.com/medium/5ad671ef5d28f.jpg (https://media.joomeo.com/large/5ad671ef5d28f.jpg)
https://media.joomeo.com/original/5ad671ef5d28f.png
Script for ultimate style new vintage version with 4:3 aspect ratio :
AviSource()
Spline16Resize(2560, 7680)
PointResize(1280, 7680)
BicubicResize(2820, 2160)
https://media.joomeo.com/medium/5ad6724d0a1f6.jpg (https://media.joomeo.com/large/5ad6724d0a1f6.jpg)
https://media.joomeo.com/original/5ad6724d0a1f6.png
I will do a video soon, because it's hard to see the differences with screenshots ! ;)
MysteryX
17th April 2018, 17:45
Very interesting!
This is a shader effect BTW - maybe @MysteryX can help in getting them to work in AviSynth Shader (http://forum.doom9.org/showthread.php?t=172698).
Shader source: https://github.com/libretro/slang-shaders/tree/master/crt
slangp? Looks like a shader language for Vulkan drivers. What I wrote works with old DirectX 9 with pixel shaders version PS_3; Vulkan driver stuff didn't exist back then, so it's completely different technology.
raffriff42
17th April 2018, 21:18
it's completely different technology.Oh, too bad -- thanks for letting us know though.
SuperLumberjack
17th April 2018, 23:37
Here is a new video I did to compare my script "Ultimate style - Clean version" with "Ultimate style - New vintage version" :p :
https://youtu.be/uVmmpPIkKPY
lansing
18th April 2018, 02:46
Oh gosh, please just simply number your test scripts, no one cares about what they call.
For the ringing problem, you'll need to go with some higher end resizer like nnedi3.
And it's pretty clear now that adding a shader on top gives the best visual effect for these retro games. As the main problems with these low resolution images are the pixelated diagonal lines and the lack of texture when upscaled, so you can't blur them because that will turn them into ugly color blocks. The vertical and gird shader looks like the answer here, as they both added fake details to "smooth" out the diagonal lines and added fake "textures" into the color blocks.
raffriff42
18th April 2018, 04:51
The vertical and gird shader looks like the answer here, as they both added fake details to "smooth" out the diagonal lines and added fake "textures" into the color blocks.Very clear description of why the shader effect looks good!
Which gives me an idea! Suppose we emulate the shader by
smoothly sizing to 1/4 or 1/2 of the final size, then pixel sizing the rest of the way (to retain some jagginess);
de-registering the RGB colors slightly (to imitate the phosphor arrangement); and
superimposing a black grid pattern?
I already have a grid pattern generator function, made years ago (part of an attempt to recreate NTSC dot crawl artifacts (http://forum.doom9.org/showthread.php?t=170433)). The grids are not exactly like the shader grids, but they might be close "enough."
https://www.dropbox.com/s/ydp9qxjrsz1ocl4/PointSize-test-brz2%2Bdots-x4.gif?raw=1
https://www.dropbox.com/s/wosmwpr5ep72vlz/PointSize-test-brz2%2Bdots.jpg?raw=1
LoadPlugin("<path>\PointSize_x64.dll")
## (source RGB32)
xBRZ(2)
Org = Last
Org
GaussResize(1408, 1080, p=70)
ConvertToYV24
gridmask_square(2)
ConvertToRGB32
Trim(0, length=1)
Loop(Org.FrameCount)
Dots = Last
Org
GaussResize(1408/4, 1080/4, p=70)
PointResize(1408, 1080)
ShiftRedBlue(rx = -2, bx = +2)
Overlay(Dots, mode="darken", opacity=0.25)
Levels(0, 1.0, 255-64, 0, 255, coring=false)
ConvertToYV12(matrix="Rec709")
return Last
# https://forum.doom9.org/showthread.php?p=1803247#post1803247
##################################
### shift and/or resize Red and Blue relative to Green
##
## @ rx, ry, bx, by - "shift" red & blue position
## @ rxd, ryd, bxd, byd - "delta" width & height
##
function ShiftRedBlue(clip C,
\ float "rx", float "ry",
\ float "bx", float "by",
\ float "rxd", float "ryd",
\ float "bxd", float "byd")
{
Assert(C.IsRGB,
\ "ShiftRedBlue: source must be RGB")
rx = Float(Default(rx, 0))
ry = Float(Default(ry, 0))
bx = Float(Default(bx, 0))
by = Float(Default(by, 0))
rxd = Float(Default(rxd, 0))
ryd = Float(Default(ryd, 0))
bxd = Float(Default(bxd, 0))
byd = Float(Default(byd, 0))
C
return (C.IsRGB24)
\ ? MergeRGB(
\ ShowRed.Spline64Resize(Width, Height, -rx, -ry, Width-rxd, Height-ryd)
\ , ShowGreen
\ , ShowBlue.Spline64Resize(Width, Height, -bx, -by, Width-bxd, Height-byd)
\ )
\ : MergeARGB(
\ ShowAlpha
\ , ShowRed.Spline64Resize(Width, Height, -rx, -ry, Width-rxd, Height-ryd)
\ , ShowGreen
\ , ShowBlue.Spline64Resize(Width, Height, -bx, -by, Width-bxd, Height-byd)
\ )
}
## http://forum.doom9.org/showthread.php?t=170433
#######################################
### create a fixed pattern of dots.
function gridmask_square(clip C, int size)
{
C
return mt_logic(
\ mt_lutspa(mode="absolute", chroma="-128",
\ expr="x "+String(size)+" / pi * cos 108 * 126 + "),
\ mt_lutspa(mode="absolute", chroma="-128",
\ expr="y "+String(size)+" / pi * cos 108 * 126 + "),
\ "andn")
}
SuperLumberjack
18th April 2018, 11:50
Oh gosh, please just simply number your test scripts, no one cares about what they call.
For the ringing problem, you'll need to go with some higher end resizer like nnedi3.
And it's pretty clear now that adding a shader on top gives the best visual effect for these retro games. As the main problems with these low resolution images are the pixelated diagonal lines and the lack of texture when upscaled, so you can't blur them because that will turn them into ugly color blocks. The vertical and gird shader looks like the answer here, as they both added fake details to "smooth" out the diagonal lines and added fake "textures" into the color blocks.
Oh gosh, please be nice and maybe a little more fun ! :D It's not more complicated with names than with numbers, because it follows a logic order. Besides, I think it's easier to recognize a script with a name ;)
But thanks for the advice of the nnedi3 ! :)
But I already used it, and it's not really an anti-ringing filter like MadVR uses :( The other problem is to begin a script with nnedi3. I never begin a script with this filter because the straight lines become distored. But it's true that it's good to clean the image ;)
Otherwise, I just want to remind that I don't want scanlines or grids. Il will tell you why. It's because in the old times, even if we have these kinds of picture with the CRT display, it was always when we were close to the screen, but never at a certain distance. And personnally, I never glued my nose to the screen :D
So I think, this passion for the scanlines and grids are a bit too exagerated. To a certain distance, the old CRT displays delivered a normal and clean picture I think. I never had the souvenirs of having seen scanlines at this time.
But you can post your experimentations here. It's always interesting and I think it's the good subject for this :p Long live diversity ! :)
Very clear description of why the shader effect looks good!
Which gives me an idea! Suppose we emulate the shader by
smoothly sizing to 1/4 or 1/2 of the final size, then pixel sizing the rest of the way (to retain some jagginess);
de-registering the RGB colors slightly (to imitate the phosphor arrangement); and
superimposing a black grid pattern?
I already have a grid pattern generator function, made years ago (part of an attempt to recreate NTSC dot crawl artifacts (http://forum.doom9.org/showthread.php?t=170433)). The grids are not exactly like the shader grids, but they might be close "enough."
https://www.dropbox.com/s/ydp9qxjrsz1ocl4/PointSize-test-brz2%2Bdots-x4.gif?raw=1
https://www.dropbox.com/s/wosmwpr5ep72vlz/PointSize-test-brz2%2Bdots.jpg?raw=1
LoadPlugin("<path>\PointSize_x64.dll")
## (source RGB32)
xBRZ(2)
Org = Last
Org
GaussResize(1408, 1080, p=70)
ConvertToYV24
gridmask_square(2)
ConvertToRGB32
Trim(0, length=1)
Loop(Org.FrameCount)
Dots = Last
Org
GaussResize(1408/4, 1080/4, p=70)
PointResize(1408, 1080)
ShiftRedBlue(rx = -2, bx = +2)
Overlay(Dots, mode="darken", opacity=0.25)
Levels(0, 1.0, 255-64, 0, 255, coring=false)
ConvertToYV12(matrix="Rec709")
return Last
# https://forum.doom9.org/showthread.php?p=1803247#post1803247
##################################
### shift and/or resize Red and Blue relative to Green
##
## @ rx, ry, bx, by - "shift" red & blue position
## @ rxd, ryd, bxd, byd - "delta" width & height
##
function ShiftRedBlue(clip C,
\ float "rx", float "ry",
\ float "bx", float "by",
\ float "rxd", float "ryd",
\ float "bxd", float "byd")
{
Assert(C.IsRGB,
\ "ShiftRedBlue: source must be RGB")
rx = Float(Default(rx, 0))
ry = Float(Default(ry, 0))
bx = Float(Default(bx, 0))
by = Float(Default(by, 0))
rxd = Float(Default(rxd, 0))
ryd = Float(Default(ryd, 0))
bxd = Float(Default(bxd, 0))
byd = Float(Default(byd, 0))
C
return (C.IsRGB24)
\ ? MergeRGB(
\ ShowRed.Spline64Resize(Width, Height, -rx, -ry, Width-rxd, Height-ryd)
\ , ShowGreen
\ , ShowBlue.Spline64Resize(Width, Height, -bx, -by, Width-bxd, Height-byd)
\ )
\ : MergeARGB(
\ ShowAlpha
\ , ShowRed.Spline64Resize(Width, Height, -rx, -ry, Width-rxd, Height-ryd)
\ , ShowGreen
\ , ShowBlue.Spline64Resize(Width, Height, -bx, -by, Width-bxd, Height-byd)
\ )
}
## http://forum.doom9.org/showthread.php?t=170433
#######################################
### create a fixed pattern of dots.
function gridmask_square(clip C, int size)
{
C
return mt_logic(
\ mt_lutspa(mode="absolute", chroma="-128",
\ expr="x "+String(size)+" / pi * cos 108 * 126 + "),
\ mt_lutspa(mode="absolute", chroma="-128",
\ expr="y "+String(size)+" / pi * cos 108 * 126 + "),
\ "andn")
}
Thanks to share your ideas and your experimentations ! It's always very (very very) interesting and enriching ! :)
But as I said to lansing, I don't want scanlines or grids, but I love to see the knowledge you share ;)
Let's say that my idea is rather to rethink the original picture, imitate a kind of old feeling, but keep a maximum quality.
It's like a remastering the idea ! :p
raffriff42
18th April 2018, 12:14
I'm just posting ideas that interest me. You can use them, or not use them, or take parts of them and leave other parts out! It's your video! :)
SuperLumberjack
18th April 2018, 12:34
I'm just posting ideas that interest me. You can use them, or not use them, or take parts of them and leave other parts out! It's your video!
Yes, I have no problem with this ! As I said, it's always interesting and inspiring ! ;)
Atak_Snajpera
18th April 2018, 13:54
So I think, this passion for the scanlines and grids are a bit too exagerated. To a certain distance, the old CRT displays delivered a normal and clean picture I think. I never had the souvenirs of having seen scanlines at this time.
No They don't! You clearly forgot about color bleeding effect (bloom). Games on CRT have never been pixel perfect even from distance.
SuperLumberjack
18th April 2018, 17:09
You didn't understand me. I never said it was pixel perfect. I only said that from a certain distance, we didn't notice the scanlines. It looked almost clean, not like some filters with scanlines or grids ;)
SuperLumberjack
18th April 2018, 17:35
I still did just one last script, but I start from a new beginning, with another logic : just remaster the image ! :o
It was just for the fun ! :p This time, I didn't care about old feeling ! I just remastered ! :)
I compared the image of my script with a screenshot from an emulator called Higan (one of the most precise) to see if what I did was what I want :
https://media.joomeo.com/medium/5adbc4752e8da.jpg (https://media.joomeo.com/large/5adbc4752e8da.jpg)
https://media.joomeo.com/original/5adbc4752e8da.png
And I compare with a video which shows different versions of the game "Mr. Nutz", but played on a CRT display : https://www.youtube.com/watch?v=mh3KWHrwvhE
https://media.joomeo.com/medium/5adbc4bc33ef2.jpg (https://media.joomeo.com/large/5adbc4bc33ef2.jpg)
https://media.joomeo.com/original/5adbc4bc33ef2.png
In any case, I find that it's magic ! :) So I called it "Magic" ! :D
Script for magic style with 8:7 aspect ratio :
AviSource()
Spline16Resize(5120, 1920)
GaussResize(2560, 1920, p=50)
nnedi3_rpow2(rfactor=2, nsize=0, nns=4, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
BicubicResize(2468, 2160)
https://media.joomeo.com/medium/5adbc52d1fb13.jpg (https://media.joomeo.com/large/5adbc52d1fb13.jpg)
https://media.joomeo.com/original/5adbc52d1fb13.png
Script for magic style with 4:3 aspect ratio :
AviSource()
Spline16Resize(5120, 1920)
GaussResize(2560, 1920, p=50)
nnedi3_rpow2(rfactor=2, nsize=0, nns=4, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
BicubicResize(2820, 2160)
https://media.joomeo.com/medium/5adbc589dda6b.jpg (https://media.joomeo.com/large/5adbc589dda6b.jpg)
https://media.joomeo.com/original/5adbc589dda6b.png
raffriff42 inspired me with his script and the GaussResize ! :p
Thanks ! ;)
lansing
18th April 2018, 19:07
Oh gosh, please be nice and maybe a little more fun ! :D It's not more complicated with names than with numbers, because it follows a logic order. Besides, I think it's easier to recognize a script with a name ;)
You're just confusing everybody with those names. And I found no logic between "ultimate style - clean version" and "ultimate style - new vintage" whatsoever, what do they even mean?
But thanks for the advice of the nnedi3 ! :)
But I already used it, and it's not really an anti-ringing filter like MadVR uses :( The other problem is to begin a script with nnedi3. I never begin a script with this filter because the straight lines become distored. But it's true that it's good to clean the image ;)
I read your earlier posts, those are not straight lines, those are just single-pixels. And you don't need deringing filter because nnedi3 doesn't produces ringing. The ringing problem you have on your images came from the low quality resizers you used.
Otherwise, I just want to remind that I don't want scanlines or grids. Il will tell you why. It's because in the old times, even if we have these kinds of picture with the CRT display, it was always when we were close to the screen, but never at a certain distance. And personnally, I never glued my nose to the screen :D
So I think, this passion for the scanlines and grids are a bit too exagerated. To a certain distance, the old CRT displays delivered a normal and clean picture I think. I never had the souvenirs of having seen scanlines at this time.
The scanlines had always been there in the old CRT TV, you just don't see them because of the low resolution.
Let's say that my idea is rather to rethink the original picture, imitate a kind of old feeling, but keep a maximum quality.
It's like a remastering the idea ! :p
If that is your goal then I think you can just simply achieved that by changing your window resolution to 640 x 480.
SuperLumberjack
18th April 2018, 19:37
You're just confusing everybody with those names. And I found no logic between "ultimate style - clean version" and "ultimate style - new vintage" whatsoever, what do they even mean?
Why am I confusing you with these names, while in any case you don't like my scripts, because there are nos scanlines ? :p
Besides, I shared a playlist with the videos of all my scripts and wrote them in their description ;) : https://www.youtube.com/playlist?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
I read your earlier posts, those are not straight lines, those are just single-pixels. And you don't need deringing filter because nnedi3 doesn't produces ringing. The ringing problem you have on your images came from the low quality resizers you used.
On this picture, you can see the problem of the Nnedi3 filter with straight lines (in red) :
https://www.repaire.net/forums/attachments/avisynth-nnedi3-png.34437/
These distorsions aren't in the original picture. They disappear if I put the Nnedi3 filter after another one.
The scanlines had always been there in the old CRT TV, you just don't see them because of the low resolution.
Yes, the scanlines had always been there, but from a certain distance, we can't see them. It's what I said :)
It's why I don't want them in my upscaling. Only if it's very very subtle... eventually !
If that is your goal then I think you can just simply achieved that by changing your window resolution to 640 x 480.
This is not my idea of a remastering ! :D It means to be adapted to a modern HD display I think, not an old CRT display. Open your mind lansing ! :p
I already played all this old games on a CRT display and I will keep excellent souvenirs from them. But now, it's another time ;)
lansing
18th April 2018, 21:11
Why am I confusing you with these names, while in any case you don't like my scripts, because there are nos scanlines ? :p
Besides, I shared a playlist with the videos of all my scripts and wrote them in their description ;) :
https://www.youtube.com/playlist?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
There're no meaning in those names and they doesn't follow logical orders. Numbering them makes logical order because it tells people what came first.
On this picture, you can see the problem of the Nnedi3 filter with straight lines (in red) :
These distorsions aren't in the original picture. They disappear if I put the Nnedi3 filter after another one.
In the original image, those areas were just single-dot pixels, they were not a representation of straight lines. They were pixels that were connected to form a shape, in this case, a curve. Nnedi3 connected these pixels by smoothing them so you don't see jagged diagonal lines.
Yes, the scanlines had always been there, but from a certain distance, we can't see them. It's what I said :)
It's why I don't want them in my upscaling. Only if it's very very subtle... eventually !
I have never said to use a scanline shader either because it looks bad on motion.
This is not my idea of a remastering ! :D It means to be adapted to a modern HD display I think, not an old CRT display. Open your mind lansing ! :p
I already played all this old games on a CRT display and I will keep excellent souvenirs from them. But now, it's another time ;)
You're not going to get a HD remastering out of a 300 x 200 source. If you're to upscale it 6x, you're going to have to deal with chunks of ugly color blocks and jagged diagonal lines. The only reasonable way to do is to hide them with shaders.
SuperLumberjack
18th April 2018, 21:53
There're no meaning in those names and they doesn't follow logical orders. Numbering them makes logical order because it tells people what came first.
I remember that you said that you don't see any difference between all my screenshots. And here, I give you a playlist with all the videos of my scripts, which are in order and where you can see (maybe) the differences, but you are still not satisfied... :p
In the original image, those areas were just single-dot pixels, they were not a representation of straight lines. They were pixels that were connected to form a shape, in this case, a curve. Nnedi3 connected these pixels by smoothing them so you don't see jagged diagonal lines.
I'm ok with what you say, but in the original picture, it was straight ! :)
PointResize X4
https://media.joomeo.com/large/5adbc6a8e6a69.jpg
Nnedi3 X4
https://media.joomeo.com/large/5adbc6d92ab01.jpg
I have never said to use a scanline shader either because it looks bad on motion.
Ok. We agree ! ;)
You're not going to get a HD remastering out of a 300 x 200 source. If you're to upscale it 6x, you're going to have to deal with chunks of ugly color blocks and jagged diagonal lines. The only reasonable way to do is to hide them with shaders.
I know. It's just a word that I used to make you understand what is my goal. I don't expect miracles !
SuperLumberjack
19th April 2018, 00:24
Here is the video of my last script that I called "Magic style" :p : https://youtu.be/CHXsyhBZJ5g
In fact, I love my new script ! :)
It's close to what I wanted ! :o
I remind you that I shared some of the original videos, if you want to test with you own scripts ;) : https://mega.nz/#!K5FRlJhb!pKqQ06WOnZVI5gLnSzpLj5Ix2aa36yGiozQuikkk77A
SuperLumberjack
19th April 2018, 00:33
Just a question ! Does anybody know how to circumvent this error please ? :confused:
https://media.joomeo.com/medium/5adbc7a06e389.jpg (https://media.joomeo.com/large/5adbc7a06e389.jpg)
I got this with a script with high resolutions, but think it's just a limitation of AviSynth, not a material limitation, so there must be a way ! :)
Thanks for you help !
lansing
19th April 2018, 02:18
Here is the video of my last script that I called "Remastering style" :p : https://youtu.be/Mb0YFEbf_7g
In fact, I love my new script ! :)
It's close to what I wanted ! :o
I remind you that I shared some of the original videos, if you want to test with you own scripts ;) : https://mega.nz/#!X59ijIKR!QwVlLwNnQ24x-xTgtahRC814mBzloQovwFhZP2ErqhU
Your script is wrong. The power of nnedi3 on upscale is its quality, so it is pointless to use it on a 2560x1920 clip. It has to be the first in your filter chain if you are to use it.
And the purpose of the upscale-then-downscale process is for the anti-aliasing effect, but since your videos are pixelated stuffs, it pretty much did nothing to the images.
AviSource()
Spline16Resize(5120, 1920)
GaussResize(2560, 1920, p=50)
nnedi3_rpow2(rfactor=2, nsize=0, nns=4, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
BicubicResize(2468, 2160)
BicubicResize(2820, 2160)
poisondeathray
19th April 2018, 02:30
Just a question ! Does anybody know how to circumvent this error please ? :confused:
<snip>
I got this with a script with high resolutions, but think it's just a limitation of AviSynth, not a material limitation, so there must be a way ! :)
Thanks for you help !
Are you using avisynth x86 ? If yes, then use x64
SuperLumberjack
19th April 2018, 06:39
Maybe. In fact, I don't find the information :p
But I will try the x64 version if I have not ;) Thanks for your help ! :)
SuperLumberjack
19th April 2018, 11:00
Your script is wrong. The power of nnedi3 on upscale is its quality, so it is pointless to use it on a 2560x1920 clip. It has to be the first in your filter chain if you are to use it.
And the purpose of the upscale-then-downscale process is for the anti-aliasing effect, but since your videos are pixelated stuffs, it pretty much did nothing to the images.
AviSource()
Spline16Resize(5120, 1920)
GaussResize(2560, 1920, p=50)
nnedi3_rpow2(rfactor=2, nsize=0, nns=4, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
BicubicResize(2468, 2160)
BicubicResize(2820, 2160)
The screenshots that I posted about the effect of the Nnedi3 on straight lines was quite telling.
I just used that :
AviSource()
nnedi3_rpow2(rfactor=4, nsize=0, nns=4, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
SuperLumberjack
19th April 2018, 16:08
Are you using avisynth x86 ? If yes, then use x64
I was looking for AviSynth 64 bits, but the only version that I found is the 2.5.8 :(
Is there a more recent version ? :confused:
If not, what version have I to take please ?
Thanks for your help ! ;)
magiblot
19th April 2018, 17:20
Here!
https://github.com/pinterf/AviSynthPlus/releases
It will only work with the x64 versions of AvsPmod / VirtualDub:
AvsPmod: https://forum.doom9.org/showpost.php?p=1801766&postcount=1202
VirtualDub: https://sourceforge.net/projects/vdfiltermod/
SuperLumberjack
19th April 2018, 17:44
OK. Thank you very much ! :)
I just tried and I got a similar error :
"VirtualDub Error
Avisynth read error:
Could not allocate video frame. Out of memory. memory_max = 1073741824, memory_used = 495732537 Request=235929663"
But I will try with AvsPmod or the x64 version of AviSynth ;)
SuperLumberjack
19th April 2018, 18:07
It works with VirtualDub2 ! x64 :) You're the boss man ! :p
Thank you so much magiblot ! :thanks:
I just had to copy the x64 version of the Nnedi3 plugin in the "plugins64+" folder of AviSynth, and it ran like a war machine ! :D
You gave me hope ! :o I was effraid that I could never use this script. It's for another video with a resolution of 640x480 :p
Original
https://media.joomeo.com/medium/5adbc8270a2f0.jpg (https://media.joomeo.com/large/5adbc8270a2f0.jpg)
https://media.joomeo.com/original/5adbc8270a2f0.png
Upscaled to 2160p
https://media.joomeo.com/medium/5adbc8742f01c.jpg (https://media.joomeo.com/large/5adbc8742f01c.jpg)
https://media.joomeo.com/original/5adbc8742f01c.png
Thanks to poisondeathray too ! ;)
foxyshadis
20th April 2018, 05:31
Very clear description of why the shader effect looks good!
Which gives me an idea! Suppose we emulate the shader by
smoothly sizing to 1/4 or 1/2 of the final size, then pixel sizing the rest of the way (to retain some jagginess);
de-registering the RGB colors slightly (to imitate the phosphor arrangement); and
superimposing a black grid pattern?
I already have a grid pattern generator function, made years ago (part of an attempt to recreate NTSC dot crawl artifacts (http://forum.doom9.org/showthread.php?t=170433)). The grids are not exactly like the shader grids, but they might be close "enough."
https://www.dropbox.com/s/ydp9qxjrsz1ocl4/PointSize-test-brz2%2Bdots-x4.gif?raw=1
https://www.dropbox.com/s/wosmwpr5ep72vlz/PointSize-test-brz2%2Bdots.jpg?raw=1
I have no idea what SuperLumberjack is hoping to accomplish, but sign me up for your newsletter, because this is a seriously awesome filter. Even if you hate scanlines, you can blend it down a bit to minimize them; otherwise, it looks mindblowing on 4K.
SuperLumberjack
22nd April 2018, 15:33
I updated my last script and I think I will never touch it again ! :p
I understand that you have difficulty to follow my logic, but I will tell you why I did so complicated things :) It's only for videos of these old Super Nes games, but for other videos of old video games, of the PS2 and Xbox era too. It's why I didn't want scanlines or other things like that ;)
But now, I tested my script with something else, and I think it's better like this. Because as I said, I wanted a kind of logical formula that could be all right with lots of low resolution videos from old games.
So I abandoned the idea to have something perfect with the Super Nintendo games. I want unity with all the old videos.
Consequently, I tried with this video taken from the game "Legacy of Kain: Defiance". The advantage is that this video was done with the engine of the game, so I can compare with the graphics of the game to see if it's credible. Little precision : the video has a resolution of 640x480 with black bars, and wasn't in the exact correct aspect ratio compared to the game. So I correct it too.
Original
https://media.joomeo.com/medium/5adc7c56c1e4a.jpg (https://media.joomeo.com/large/5adc7c56c1e4a.jpg)
https://media.joomeo.com/original/5adc7c56c1e4a.png
Upscaled to 2160p with my script
https://media.joomeo.com/medium/5adc7c7ea4f42.jpg (https://media.joomeo.com/large/5adc7c7ea4f42.jpg)
https://media.joomeo.com/original/5adc7c7ea4f42.png
Graphics in-game
https://media.joomeo.com/medium/5adc98d934370.jpg (https://media.joomeo.com/large/5adc98d934370.jpg)
https://media.joomeo.com/original/5adc98d934370.jpg
This picture is from this site : http://www.pcmrace.com/2015/01/06/epic-shots-legacy-of-kain-defiance/
But apparently some textures mods were used to enhance the display in 2160p. But it seams that it's compliant with the original graphics. No extravagances ! :p
Original
https://media.joomeo.com/medium/5adc7e6d8cf96.jpg (https://media.joomeo.com/large/5adc7e6d8cf96.jpg)
https://media.joomeo.com/original/5adc7e6d8cf96.png
We clearly see the deformation of the picture (see the barrels) compared to the picture in-game.
Upscaled to 2160p with my script
https://media.joomeo.com/medium/5adc7e961716a.jpg (https://media.joomeo.com/large/5adc7e961716a.jpg)
https://media.joomeo.com/original/5adc7e961716a.png
Graphics in-game
https://media.joomeo.com/medium/5adc7f0e99004.jpg (https://media.joomeo.com/large/5adc7f0e99004.jpg)
https://media.joomeo.com/original/5adc7f0e99004.jpg
Here was my script for this :
AviSource()
Crop(0, 80, 0, -80)
Spline16Resize(2560, 1280)
GaussResize(10240, 2880, p=50)
BicubicResize(3840, 2160)
If I multiplied the horizontal resolution 4 times with the GaussResize, it's because compared to a video with 4:3 AR (2880x2160), we need more precision horizontaly.
Besides, we keep a certain ratio between the resolution of the GaussResize and the final resolution.
We have :
(10240x2880)/(3840x2160) = 3,55
With a video with a 4:3 resolution of 640x480, I used this script :
AviSource()
Spline16Resize(2560, 1920)
GaussResize(5120, 3840, p=50)
BicubicResize(2880, 2160)
We have :
(5120x3840)/(2880x2160) = 3,16
And with the script for Super Nes video games :
AviSource()
Spline16Resize(2048, 1792)
GaussResize(5120, 3840, p=50)
BicubicResize(2820, 2160)
We have :
(5120x3840)/(2820x2160) = 3,22
Similar ratio ! :)
SuperLumberjack
22nd April 2018, 15:44
I post my video again for my last script ;) : https://youtu.be/CHXsyhBZJ5g
Playlist of all my scripts : https://www.youtube.com/playlist?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
If you want to test scripts with some original videos of Super Nes games :) : https://mega.nz/#!K5FRlJhb!pKqQ06WOnZVI5gLnSzpLj5Ix2aa36yGiozQuikkk77A
SuperLumberjack
25th April 2018, 20:00
Hello my friends ! :)
I'm back ! :D I tried so many things (sometimes, there is no big difference, it's true) and I'm never satisfied :(
But I know what I want ! It's just hard to achieve... :rolleyes:
I want something that reminds me the picture on CRT but clean ! :cool:
https://media.joomeo.com/medium/5ae0ce366b87e.jpg (https://media.joomeo.com/large/5ae0ce366b87e.jpg)
https://media.joomeo.com/original/5ae0ce366b87e.png
source : https://youtu.be/3uB52C4zE_4
I tried the WarpResize in VirtualDub and it gives the type of image I want, so you will see better. It's very similar to the picture on CRT I think, but without the black scanlines (furthermore, we don't see them like everybody says, it's more subtle).
This is in 2160p :
https://media.joomeo.com/medium/5ae0ce6c47bd3.jpg (https://media.joomeo.com/large/5ae0ce6c47bd3.jpg)
https://media.joomeo.com/original/5ae0ce6c47bd3.png
In 4320p it's a bit better :
https://media.joomeo.com/medium/5ae0cec0c10c3.jpg (https://media.joomeo.com/large/5ae0cec0c10c3.jpg)
https://media.joomeo.com/original/5ae0cec0c10c3.png
The only problem are these defaults :scared: :
https://media.joomeo.com/medium/5ae0cf0272b54.jpg (https://media.joomeo.com/large/5ae0cf0272b54.jpg)
https://media.joomeo.com/original/5ae0cf0272b54.png
This is the picture only with the Spline16Resize :
https://media.joomeo.com/medium/5ae0cf2e41d9e.jpg (https://media.joomeo.com/large/5ae0cf2e41d9e.jpg)
https://media.joomeo.com/original/5ae0cf2e41d9e.png
It's not so bad, but a bit boring...
So, now you know what I'm looking for :) Have you an idea how to get the same kind of picture but without the defaults please ?
Thanks a lot ! ;)
Edit : I added the video from the title menu of Killer Instinct in my WinRAR archive, if you want to test with your own scripts ;)
real.finder
26th April 2018, 04:59
don't know if it already mentioned here or not, but there are http://ldesoras.free.fr/src/avs/crt-display-1.0.zip
it will give you feel like you see old SONY Trinitron
edit: raffriff42 Post here was good too
SuperLumberjack
26th April 2018, 09:44
No, thanks ! :p
I already said that I don't want scanlines ;)
bxyhxyh
26th April 2018, 17:29
Ok I tried small combination with scanlines again. Just check it if it works for you or not.
Tested with your Mr.Nuts and Donkey Kong samples since they were NOT strictly made for crt screen.
But your Super Mario World one NEEDS strong crt effects.
Since I'm not a fan of 2160p upscale (or even 1080p) I tested by upscaling them to 1080p.
AVISource("C:\Users\BallGNM\Desktop\Super Nintendo videos\Donkey Kong Country 3.avi")
#AVISource("C:\Users\BallGNM\Desktop\Super Nintendo videos\Mr. Nutz.avi")
small=last
w=1440 h=1080
normal=Spline16Resize(512,384).ConvertToYV24(matrix="Rec709").maa2().nnedi3_rpow2(rfactor=4,nns=4,fwidth=w,fheight=h,cshift="bicubicresize",ep0=0,ep1=0.6)
crt_str=0.25
crt=crt_display(small,4,4,gainb=1.2,gamma=1.9).spline16resize(w,h).ConvertToYV24(matrix="Rec709")
expr="x " + string(crt_str) + " * y + " + string(crt_str+1) + " /"
mt_lutxy(crt,normal,expr,u=3,v=3)
ConvertToYV12(matrix="Rec709",chromaresample="spline16")
#normal
#crt
#small.spline36resize(w,h)
#small.pointresize(1536,1120).spline16resize(w,h)
SuperLumberjack
26th April 2018, 19:27
Thanks ! :)
But I'm not sure if I understand this kind of script. It's a bit too complex for me I think ! :D
Can you post a screenshot please ? :p
Just a question : does somebody know how to use the "Precise bicubic (A=-0.75)" filter from VirtualDub in AviSynth please ?
I read that "BicubicResize(b=0, c=0.75, x, y)" is the same thing, but I tested, and it isn't exactly identical.
Thanks for you help ! ;)
StainlessS
26th April 2018, 19:39
D9 forum search is a bit limited when looking for something like "precise bicubic" as one phrase,
try google
"precise bicubic" site:forum.doom9.org
Plenty of hits, not viewed them.
Or here link to same:- https://www.google.com/search?client=firefox-b&ei=ThziWpCnG8X7kwXiqpXoBQ&q=%22precise+bicubic%22+site%3Aforum.doom9.org&oq=%22precise+bicubic%22+site%3Aforum.doom9.org&gs_l=psy-ab.3...98162.98644.0.99108.2.2.0.0.0.0.340.458.0j1j0j1.2.0....0...1c.1.64.psy-ab..0.0.0....0.5UhwE1cp86I
EDIT: Also, just want to point out that the below has a hyphen in it ie, ' - 0.75 '.
"Precise bicubic (A=-0.75)"
EDIT: Actually D9 search dont do too bad if phrase is wrapped in double quotes.
SuperLumberjack
27th April 2018, 09:16
I searched, but I didn't find anything about how to use the "Precise bicubic (A=-0.75)" from VirtualDub in AviSynth :o
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.