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 29th May 2022, 00:01   #1  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Fixing and adding things onto a new DotCrawlPlus version

Hi, guys.

So, since the original DotCrawlPlus is a little less than 10 years old, it's expected to become somewhat obsolete.

I'm thinking of forking this filter, after all, this filter has last updated in 2014, and many things changed, specially on my perception of analog video artifacts in general.

So, yeah, i'm starting making an unofficial version 3.
After all, some parts of the filter are not as realistic as actual analog video footage (like this comment).

On the moment, my missions on this project are:
- Improvements in performance
- Moving rainbows
- Better rainbowing
and some missions i'm starting to think otherwise...

I'm still new to some stuff, so any help are appreciated.

I'm starting with the moving rainbows thing.
Just need to know if i can animate mt_lutspa or something like that?

Also, credits to @raffriff42, the nice guy who created the original filter.

RGMOfficial is offline   Reply With Quote
Old 31st May 2022, 15:44   #2  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
I fully endorse your plan. Degradation filters for AVISynth are in short supply and they would definitely be of use on occasion. Training neural networks for instance.

When it comes to fake composite rainbows, there's been some discussion on one of the Discord channels I'm on by using the following:

AddGrain(0,0.6,0.4,50000,seed=1) #credit to @Zarxrax

Overlaying it with a diagonal edge mask gives a decent approximation.
SaurusX is offline   Reply With Quote
Old 31st May 2022, 19:54   #3  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
maybe someone can use https://forum.doom9.org/showpost.php...9&postcount=19 to make a plugin for avs
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 1st June 2022, 17:29   #4  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Quote:
Originally Posted by SaurusX View Post
I fully endorse your plan. Degradation filters for AVISynth are in short supply and they would definitely be of use on occasion. Training neural networks for instance.

When it comes to fake composite rainbows, there's been some discussion on one of the Discord channels I'm on by using the following:

AddGrain(0,0.6,0.4,50000,seed=1) #credit to @Zarxrax

Overlaying it with a diagonal edge mask gives a decent approximation.
So, i tried.

Changed the makedotcrawl function, but maintained the mask.

Code:
##################################
### generate a rainbow pattern
##
## @ sat    - chroma intensity (default 1.0)
## @ xluma  - ratio of clip cross-luma to fixed pattern (0..1; default 0.75)
## 
function dpc_makerainbow(clip C, float "sat", float "xluma")
{
    sat  = Float(Default(sat, 1))
    xluma = Float(Min(Max(0, Default(xluma, 0.75)), 1))
	
    C
    AddGrain(0,0.6,0.4,50000,seed=1)
}
Test images on attachments (using rainbow=1.0)
Attached Images
  
RGMOfficial is offline   Reply With Quote
Old 1st June 2022, 23:09   #5  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Did some changes on the code, and actually...

the rainbowing looks great and realistic.

Code:
function dpc_makerainbow(clip C, float "sat")
{
    sat  = Float(Default(sat, 1))
    
    color_sat = int(50000*sat)
	
    C
    AddGrainC(var=0,uvar=color_sat,hcorr=.9,vcorr=.4,seed=1)
}
Also, i added a new preset, that i've been using with the original plugin. It's the preset used on the screenshot below.

Code:
## @ preset - choices:
##            "mild"     - minimal effect
##            "medium"   - softer chroma; a little added noise
##            "heavy"    - very soft & noisy
##            "strong"   - like medium but more so
##            "bigdot1"  - larger dots #1
##            "bigdot2"  - larger dots #2
##            "bigdot3"  - larger dots #3
##            "betacam"  - Analog formats - Betacam
##            empty string ("") defaults to "medium";
##            unrecognized values raise an error.
RGMOfficial is offline   Reply With Quote
Old 3rd June 2022, 15:27   #6  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
Another thing to consider regarding rainbows is that they generally live only on DIAGONAL edges. Would it be preferable to alter the mask to only affect diagonal edges? It would add another layer of realism to the effect.
SaurusX is offline   Reply With Quote
Old 7th June 2022, 00:00   #7  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Quote:
Originally Posted by SaurusX View Post
Another thing to consider regarding rainbows is that they generally live only on DIAGONAL edges. Would it be preferable to alter the mask to only affect diagonal edges? It would add another layer of realism to the effect.
Can you provide an example script?

Here's the mask script:
Code:
function dpc_uumidpass(
\   clip C, int "tlo", int "thi", bool "setupmode")
{
    tlo    = Default(tlo, 128)
    thi    = Default(thi, 148)
    setupmode = Default(setupmode, false)

    CG = C.Grayscale()
    Last = CG
    Blur(1, 1)
    FFT3DFilter(bt=1, bw=64, bh=64, ow=32, oh=32,
    \  sigma=0, sigma2=0, sigma3=500, sigma4=100000)
    Subtract(UUGaussianBlurY(rad=1))
    mt_expand()
    Grayscale()
    return (setupmode) 
    \ ? dpc_histostretch(50.0, 0.01, 1.8, true)
    \ : Levels(tlo, 1.8, thi, 0, 255, coring=false)
}

function UUGaussianBlurY(clip C, float "var", float "rad")
{
    var = Max(0.0, Float(Default(var, 1.0)))
    rad = Max(1.0, Float(Default(rad, Pow(var, 0.5))))
    var = Pow(Min(Max(0.0, rad), 60.0), 2.0)
    
    w0 = C.Width
    h0 = C.Height
    w1 = Round(w0/rad)
    h1 = Round(h0/rad) /* formerly "w0/rad" ?? */

    B = C.BilinearResize(
    \         Min(Max(12, w1 + (w1 % 2)), w0), 
    \         Min(Max(12, h1 + (h1 % 2)), h0))

    B = B.Blur(1.0).Blur(1.0)
    
    return (var<0.01) ? C 
    \    : (var<1.5)  ? C.Blur(0.85 * var)
    \    : (B.Width>8 && B.Height>8) ? B.GaussResize(w0, h0)
    \    : B.BilinearResize(w0, h0)
}
Also, sorry for the late reply.

Last edited by RGMOfficial; 7th June 2022 at 00:36.
RGMOfficial is offline   Reply With Quote
Old 11th June 2022, 11:56   #8  |  Link
ognirats
Registered User
 
Join Date: Sep 2021
Posts: 30
Holy hell that looks nice
ognirats is offline   Reply With Quote
Old 11th June 2022, 11:57   #9  |  Link
ognirats
Registered User
 
Join Date: Sep 2021
Posts: 30
Now how do I implement it
ognirats is offline   Reply With Quote
Old 11th June 2022, 12:41   #10  |  Link
ognirats
Registered User
 
Join Date: Sep 2021
Posts: 30
Nvm, found this thread https://forum.doom9.org/showthread.php?t=184188
it works wonderfully
ognirats is offline   Reply With Quote
Reply

Tags
dot crawl, rainbow, simulation

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 16:49.


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