BlurMod() ...because sometimes you just need a really strong blur...
I included a picture below to see how weak blur() is in comparison. Anyways, I ended up with two functions that you may find useful. They work in the same sort of way. BlurMod() shrinks, blurs, then resizes; resulting in a very strong blur. ApplyonAngle() rotates, filters, then rotates back; making any filter appear as if applied on an angle.
original blur(1.58) blurmod(25) blurmod(50) blurmod(90)
------------------------------------------------------
It can be applied vertically and/or horizontally: original blurmod(0, 50) blurmod(0, 90) blurmod(50, 0) blurmod(90, 0)
------------------------------------------------------
And even on angles: original blurmod(0, 40, 30) blurmod(0, 90, 45)
------------------------------------------------------
ApplyonAngle()
Then I decided to turn the same method for rotation above into a stand-alone function so it can be applied with any filter: original addgrain(800, 0, 0.9) applyonangle("addgrain(800, 0, 0.9)", 120)
------------------------------------------------------
function ApplyonAngle(
\ clip c
\, string "filter"
\, float "angle")
{
filter = default(filter, "blurmod(0,50)")
angle = default( angle, 45 )
w = c.width()
h = c.height()
d = (round(sqrt(w*w + h*h))/4)*4
lr = (d-w)/2
tb = (d-h)/2
c
StackHorizontal( c.FlipHorizontal(),last)
StackHorizontal( last,c.FlipHorizontal())
StackVertical(last.FlipVertical(),last)
StackVertical(last,last.FlipVertical())
crop(0,0,0,-h)
lrc = (last.width()-d)/2
tbc = (last.height()-d)/2
crop(lrc,tbc,-lrc,-tbc)
rotate(-angle)
eval("last." + filter)
rotate(angle)
crop(lr,tb,-lr,-tb)
}
[1] Requires gradfun2db()
[2] The "angle" parameter is optional, but requires ApplyonAngle()
[3] Requires rotate()
Installation: [the usual]
copy/paste the scripts into .txt files,
rename to something like "BlurMod.avsi" and "ApplyonAngle.avsi"
put them in your avisynth plugins folder
put any required .dll's in your avisynth plugins folder, usually:
C:\Program Files\AviSynth 2.5\plugins or
C:\Program Files (x86)\AviSynth 2.5\plugins
I know this can be achieved in a lot of editing programs, but at least the option is here; and it might be useful if/when someone makes an avisynth-based NLE. Anyways, this is the second time I've made something with avisynth. Maybe it's been done before? but either way I think moar people should do this. Enjoy?
Last edited by Phantasmagoriat on Fri Oct 08, 2010 11:17 pm, edited 1 time in total.
It might just be the frame you chose, but that last segment really looks like a heavy downpour.
Anime Boston Fan Creations Coordinator (2019-2023) Anime Boston Fan Creations Staff (2016-2018) Another Anime Convention AMV Contest Coordinator 2008-2016
| | |
BasharOfTheAges wrote:It might just be the frame you chose, but that last segment really looks like a heavy downpour.
That's the idea
It doesn't look as realistic in motion since it's all superimposed, but you can add more depth using layers. [you might want to use an NLE for that]