Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th April 2018, 14:50   #101  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
And here, can you see the differences ?

Don't tell me that you can't see them please !

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 : https://youtu.be/PrrUjauNGto


I called the new script "Ultimate style - Clean version" 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 ]


Script for booya style with 8:7 aspect ratio :

Quote:
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 :

Quote:
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/original/5ad3dc5ce628e.png


Script for booya style with 4:3 aspect ratio :

Quote:
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 :

Quote:
AviSource()
Spline16Resize(2560, 1920)
BicubicResize(5640, 4320)
BicubicResize(2820, 2160)

https://media.joomeo.com/original/5ad3dcb96b9aa.png


What do you think ?

Last edited by SuperLumberjack; 18th April 2018 at 12:30.
SuperLumberjack is offline   Reply With Quote
Old 14th April 2018, 16:25   #102  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
Somebody knows how to remove the ringing like MadVR do with Media Player Classic please ?

I talked about it on the previous page.
SuperLumberjack is offline   Reply With Quote
Old 14th April 2018, 19:04   #103  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,573
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
Atak_Snajpera is offline   Reply With Quote
Old 14th April 2018, 19:55   #104  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
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

But I have to do lots of experimentations...

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

Last edited by SuperLumberjack; 14th April 2018 at 20:19.
SuperLumberjack is offline   Reply With Quote
Old 14th April 2018, 20:39   #105  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
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/original/5ad3dedddbcce.png

Video to compare : https://www.youtube.com/watch?v=51iwiDlcQKk


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 !

Last edited by SuperLumberjack; 16th April 2018 at 00:25.
SuperLumberjack is offline   Reply With Quote
Old 14th April 2018, 21:32   #106  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
Here are the video, if you want to test :

https://mega.nz/#!K5FRlJhb!pKqQ06WOn...yGiozQuikkk77A

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.

Last edited by SuperLumberjack; 4th May 2018 at 10:44.
SuperLumberjack is offline   Reply With Quote
Old 15th April 2018, 01:01   #107  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
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...
SuperLumberjack is offline   Reply With Quote
Old 15th April 2018, 17:28   #108  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,573
Quote:
Originally Posted by SuperLumberjack View Post
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

But I have to do lots of experimentations...

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
Instead of simple scan lines you should use crt grid



This looks very convincing to me
https://youtu.be/xrpm8o17cHE?t=16m11s
Atak_Snajpera is offline   Reply With Quote
Old 15th April 2018, 18:14   #109  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
Quote:
Originally Posted by Atak_Snajpera View Post
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.

Shader source: https://github.com/libretro/slang-sh...ree/master/crt
raffriff42 is offline   Reply With Quote
Old 15th April 2018, 20:19   #110  |  Link
magiblot
Eurobeat Fan
 
Join Date: Sep 2014
Posts: 87
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....9617#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:

magiblot is offline   Reply With Quote
Old 15th April 2018, 21:12   #111  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,499
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
poisondeathray is offline   Reply With Quote
Old 15th April 2018, 21:15   #112  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
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... Sorry !
SuperLumberjack is offline   Reply With Quote
Old 16th April 2018, 06:36   #113  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
Somebody knows for the anti-ringing please ?

Quote:
Originally Posted by SuperLumberjack View Post
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/original/5ad08bdd809a6.png

Without the anti-ringing filter in MadVR :


https://media.joomeo.com/original/5ad08c0657899.png

With the anti-ringing filter in MadVR :


https://media.joomeo.com/original/5ad08c21358af.png

Last edited by SuperLumberjack; 16th April 2018 at 07:20.
SuperLumberjack is offline   Reply With Quote
Old 16th April 2018, 23:58   #114  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
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_a...ing_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

Code:
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)

(LQx)


(xBRZ)

Last edited by raffriff42; 17th April 2018 at 00:56. Reason: typpo
raffriff42 is offline   Reply With Quote
Old 17th April 2018, 01:35   #115  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
Very interesting raffriff42 ! Thanks !

But a light "Oil painting" effect... Sorry, but I'm not totally convinced But however, it's interesting !

Apart from that, I did an alternative version of my "Ultimate script" I called it "New vintage version"

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

I found that we have approximately the sensation of a vertical resolution 4 times bigger !

So I tried to do a trick

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/original/5ad67461ab76f.png


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 :

Quote:
AviSource()
Spline16Resize(2560, 7680)
PointResize(1280, 7680)
BicubicResize(2468, 2160)

https://media.joomeo.com/original/5ad671ef5d28f.png


Script for ultimate style new vintage version with 4:3 aspect ratio :

Quote:
AviSource()
Spline16Resize(2560, 7680)
PointResize(1280, 7680)
BicubicResize(2820, 2160)

https://media.joomeo.com/original/5ad6724d0a1f6.png

I will do a video soon, because it's hard to see the differences with screenshots !

Last edited by SuperLumberjack; 17th April 2018 at 23:30.
SuperLumberjack is offline   Reply With Quote
Old 17th April 2018, 17:45   #116  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,130
Quote:
Originally Posted by raffriff42 View Post
Very interesting!

This is a shader effect BTW - maybe @MysteryX can help in getting them to work in AviSynth Shader.

Shader source: https://github.com/libretro/slang-sh...ree/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.
MysteryX is offline   Reply With Quote
Old 17th April 2018, 21:18   #117  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
Quote:
Originally Posted by MysteryX View Post
it's completely different technology.
Oh, too bad -- thanks for letting us know though.
raffriff42 is offline   Reply With Quote
Old 17th April 2018, 23:37   #118  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 221
Here is a new video I did to compare my script "Ultimate style - Clean version" with "Ultimate style - New vintage version" :

https://youtu.be/uVmmpPIkKPY

Last edited by SuperLumberjack; 19th April 2018 at 00:19.
SuperLumberjack is offline   Reply With Quote
Old 18th April 2018, 02:46   #119  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 986
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.
lansing is offline   Reply With Quote
Old 18th April 2018, 04:51   #120  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
Quote:
Originally Posted by lansing View Post
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
  1. smoothly sizing to 1/4 or 1/2 of the final size, then pixel sizing the rest of the way (to retain some jagginess);
  2. de-registering the RGB colors slightly (to imitate the phosphor arrangement); and
  3. 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). The grids are not exactly like the shader grids, but they might be close "enough."





Code:
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")
}

Last edited by raffriff42; 18th April 2018 at 11:56. Reason: image
raffriff42 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:36.


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