That got me thinking about trying to get this done with AviSynth again, and after consulting with Phan about how to control BlurMod through another function and posting a similar topic on Doom9 about how to pass parameters from Overlay through transparently, the function took shape.
I'll take the time now to stress that this is more or less a purely frivolous video effect, not something you'd use to actually clean a source or enhance its lines the way Hysteria() or FastLineDarken() do.
Code: Select all
# FrostedGlow, version 2010-10-06
#
# Applies blur to the clip, then blends the blurred clip back onto the original.
#
# Range of the effect varies according to the blend mode used; the name of the function
# derives from the appearance when using Darken mode at low blur levels.
#
# Generally, colors get hazier while dark lines become more distinct, although the haze's brightness
# and the overall effect on color is dependent on the mode used.
#
# Requirements:
# BlurMod function by Phantasmagoriat
# gradfun2db
#
# Usage:
# FrostedGlow(clip c, float blurstrength, float opacity, string mode)
#
# All three of the function's parameters are the same as the options they correspond with in their source filters.
#
# 'blurstrength' acts the same as BlurMod(x), where 'x' is a float.
# Recommended values for blurstrength are between 1 and 5, at least from my limited testing.
#
# 'mode' and 'opacity' control the way Overlay treats the video.
#
# 'mode' changes the method by which the blurred video is overlaid onto the source.
#
# 'opacity' changes the degree of transparency of the blurred video.
#
# There are no recommended values for these two parameters.
# Refer to Overlay's documentation for how to use them:
# http://avisynth.org/mediawiki/Overlay
function FrostedGlow(clip c, float "blurstrength", float "opacity", string "mode")
{
blur = c.BlurMod(blurstrength) #[1]
Overlay(c,blur,opacity=opacity,mode=mode)
}