MfToon
m (1 revision) |
(Update documentation to latest version (v0.54) - still needs some work!) |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{FilterCat4|External_filters|Scripts|Adjustment_filters|Line_darkeners}} |
− | {{ | + | {{Filter3 |
− | | mf | + | | {{Author/mf}}, {{Author/Manao}} |
− | | | + | | v0.54 |
− | | [ | + | | [[Media:mfToon-v0.54.avsi|mfToon-v0.54.avsi]] |
− | | | + | | Line darkeners |
| | | | ||
− | + | |6=[http://forum.doom9.org/showthread.php?t=53364 Doom9 Thread]}} | |
− | |}} | + | ==Description== |
+ | In default operation, it performs line darkening, Xsharpening, and warp sharpening. Sharpening is slow, and because of that I've made it optional. | ||
− | + | Because of colorspace conversions, most of the operations are done on luma only. Warp sharpening can be done either on luma only or on luma and chroma (chroma linked to luma). Input requires to be [[YV12]], this is not checked, it's probably safe to use other colorspaces but the output will always be YV12. I'm not responsible for what happens if you use something other than YV12. | |
+ | <br> | ||
+ | <br> | ||
+ | == Drawbacks == | ||
+ | Sometimes a strange "dark edge" effect on seemingly low-detail surfaces, and a VERY slight darkening along non-line edges (this is the effect you get from sharpeners ala MSharpen and aSharp, so you probably won't notice it). | ||
+ | <br> | ||
+ | <br> | ||
+ | == Requirements == | ||
+ | * AviSynth 2.5.8 or later | ||
+ | * Supported color formats: [[YV12]] | ||
− | + | === Required Plugins === | |
+ | Latest version of the following plugins are recommended unless stated otherwise.<br> | ||
+ | *<strike>[[aWarpSharp]]</strike> | ||
+ | *[[aWarpSharp2]] - recommended drop-in replacement for aWarpSharp. | ||
+ | *[[MaskTools2]] | ||
+ | *[[WarpSharp]] | ||
+ | <br> | ||
+ | == [[Script variables|Syntax and Parameters]] == | ||
+ | === mfToon2 === | ||
+ | :{{FuncDef|mfToon2(clip orig, int "twidth", int "theight", int "ssw", int "ssh", int "xstren", int "xthresh", bool "cwarp", bool "sharpen", int "strength", float "wdepth", int "wblur", float "wthresh", int "drange", float "dboost", int "dlimit", bool "debug", bool "doutput", string "dclip", bool "show", int "scolor")}} | ||
+ | <br> | ||
+ | ::{{Par2|orig|clip| }} | ||
+ | :::Input clip. | ||
− | + | ::{{Par2|twidth|int|width(orig)}} | |
+ | ::{{Par2|theight|int|height(orig)}} | ||
+ | :::Target width and height (useful for cropping), 0-inf. If these parameters are not defined they default to the dimensions of the input clip. | ||
− | + | ::{{Par2|ssw|int|4}} | |
− | + | ::{{Par2|ssh|int|4}} | |
− | + | :::Horizontal/vertical supersampling factor, 0-inf. | |
− | + | ::{{Par2|xstren|int|255}} | |
+ | :::Xsharpening strength, 0-255. | ||
− | + | ::{{Par2|xthresh|int|255}} | |
+ | :::Xsharpening threshold, 0-255. | ||
− | + | ::{{Par2|cwarp|bool|true}} | |
+ | :::Chroma warp on/off. | ||
− | + | ::{{Par2|sharpen|bool|true}} | |
+ | :::Sharpening on/off. | ||
− | + | ::{{Par2|strength|int|255}} | |
− | + | :::Line darkening strength, 0-255. | |
− | + | ||
− | + | ::{{Par2|wdepth|float|16.0}} | |
+ | :::Warping depth, 0.0 - 64.0. | ||
− | {| | + | ::{{Par2|wblur|int|1}} |
− | + | :::Warping blur level, 1-4. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ::{{Par2|wthresh|float|0.5}} | |
+ | :::Warping threshold, 0.0-1.0. | ||
− | + | ::{{Par2|drange|int|64}} | |
+ | :::Detail range, 0-255. | ||
− | {| | + | ::{{Par2|dboost|float|1.0}} |
− | + | :::Detail boost, 0.1-10.0. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ::{{Par2|dlimit|int|30}} | |
+ | :::Detail limiter, 0-255. | ||
− | + | ::{{Par2|debug|bool|false}} | |
+ | :::Debug mode; on/off. | ||
− | + | ::{{Par2|doutput|bool|true}} | |
+ | :::Print debug info on processed image, only has an effect when debug=true. | ||
+ | |||
+ | ::{{Par2|dclip|string|"rclip1"}} | ||
+ | :::which stage of the processing to show, only has an effect when debug=true. | ||
+ | ::{{Par2|scolor|int|$FF00FF}} | ||
+ | :::Which color to show lines in, colors are represented in hex values, take a look at the [[color presets]]. | ||
+ | <br> | ||
+ | <!--'''Normal parameters:''' <code>strength, sharpen, cwarp, wdepth, wblur, wthresh, ssw, ssh</code> | ||
+ | |||
+ | '''Advanced parameters''': <code>xstren, xthresh, ustren, urange, uboost, dstren, drange, dboost, dlimit</code> | ||
+ | |||
+ | * Explanation of advanced parameters (You're not likely to be tweaking these): mfToon uses masks, and these parameters influence them. Strength means opacity of the effect, range means the value compression, boost means an opaque/transparency boost, where a value below 1.0 is negative, and limiter means the final range compression.--> | ||
+ | |||
+ | |||
+ | ----- | ||
+ | |||
+ | |||
+ | === mfToonLite === | ||
+ | Lite version of mfToon2, originally intended for realtime playback. | ||
+ | |||
+ | :{{FuncDef|mfToonLite (clip orig, int "twidth", int "theight", int "strength", int "dstren", int "drange", float "dboost", int "dlimit", string "mask")}} | ||
+ | <br> | ||
+ | ::{{Par2|orig|clip| }} | ||
+ | :::Input clip. | ||
+ | |||
+ | ::{{Par2|twidth|int|width(orig)}} | ||
+ | ::{{Par2|theight|int|height(orig)}} | ||
+ | :::Target width and height (useful for cropping), 0-inf. If these parameters are not defined they default to the dimensions of the input clip. | ||
+ | |||
+ | ::{{Par2|ssw|int|4}} | ||
+ | ::{{Par2|ssh|int|4}} | ||
+ | :::Horizontal/vertical supersampling factor, 0-inf. | ||
+ | |||
+ | ::{{Par2|strength|int|255}} | ||
+ | :::Line darkening strength, 0-255. | ||
+ | |||
+ | ::{{Par2|dstren|int|255}} | ||
+ | :::detail strength, 0-255 | ||
+ | |||
+ | ::{{Par2|drange|int|64}} | ||
+ | :::Detail range, 0-255. | ||
+ | |||
+ | ::{{Par2|dboost|float|1.0}} | ||
+ | :::Detail boost, 0.1-10.0. | ||
+ | |||
+ | ::{{Par2|dlimit|int|30}} | ||
+ | :::Detail limiter, 0-255. | ||
+ | |||
+ | ::{{Par2|mask|string|"fastest"}} | ||
+ | :::Quality of the mask, any string other than "fastest" will use the slower mask. | ||
+ | <br> | ||
+ | == Examples == | ||
+ | [[AviSource]]("Blah.avi") | ||
+ | mfToon2() | ||
+ | <br> | ||
+ | == Changelog == | ||
+ | Version Date Changes<br> | ||
+ | v0.54 2006/01/14 - adapted to MaskTools 2.0 by Manao [http://forum.doom9.org/showpost.php?p=764490&postcount=123] | ||
+ | - change function name to mfToon2 | ||
+ | v0.52 ????/??/?? - [http://web.archive.org/web/20120110041853/http://mf.creations.nl/avs/functions/mfToon-v0.52.avs mfToon-v0.52.avs] | ||
− | ---- | + | <br> |
− | Back to [[ | + | ==External Links == |
− | + | *[http://forum.doom9.org/showthread.php?t=52066 Doom9 Forum] - initial mfToon development thread. | |
+ | *[http://forum.doom9.org/showthread.php?t=53364 Doom9 Forum] - mfToon continued development. | ||
+ | *[http://www.aquilinestudios.org/avsfilters/sharpeners.html#mftoonlite Scintilla's Guide] - additional mfToonLite documentation. | ||
+ | <br> | ||
+ | <br> | ||
+ | ----------------------------------------------- | ||
+ | '''Back to [[External_filters#Line_Darkening|External Filters]] ←''' |
Latest revision as of 13:13, 15 June 2015
Abstract | |
---|---|
Author | mf, Manao |
Version | v0.54 |
Download | mfToon-v0.54.avsi |
Category | Line darkeners |
License | |
Discussion | Doom9 Thread |
Contents |
[edit] Description
In default operation, it performs line darkening, Xsharpening, and warp sharpening. Sharpening is slow, and because of that I've made it optional.
Because of colorspace conversions, most of the operations are done on luma only. Warp sharpening can be done either on luma only or on luma and chroma (chroma linked to luma). Input requires to be YV12, this is not checked, it's probably safe to use other colorspaces but the output will always be YV12. I'm not responsible for what happens if you use something other than YV12.
[edit] Drawbacks
Sometimes a strange "dark edge" effect on seemingly low-detail surfaces, and a VERY slight darkening along non-line edges (this is the effect you get from sharpeners ala MSharpen and aSharp, so you probably won't notice it).
[edit] Requirements
- AviSynth 2.5.8 or later
- Supported color formats: YV12
[edit] Required Plugins
Latest version of the following plugins are recommended unless stated otherwise.
aWarpSharp- aWarpSharp2 - recommended drop-in replacement for aWarpSharp.
- MaskTools2
- WarpSharp
[edit] Syntax and Parameters
[edit] mfToon2
- mfToon2(clip orig, int "twidth", int "theight", int "ssw", int "ssh", int "xstren", int "xthresh", bool "cwarp", bool "sharpen", int "strength", float "wdepth", int "wblur", float "wthresh", int "drange", float "dboost", int "dlimit", bool "debug", bool "doutput", string "dclip", bool "show", int "scolor")
- clip orig =
- Input clip.
- clip orig =
- int twidth = width(orig)
- int theight = height(orig)
- Target width and height (useful for cropping), 0-inf. If these parameters are not defined they default to the dimensions of the input clip.
- int twidth = width(orig)
- int ssw = 4
- int ssh = 4
- Horizontal/vertical supersampling factor, 0-inf.
- int ssw = 4
- int xstren = 255
- Xsharpening strength, 0-255.
- int xstren = 255
- int xthresh = 255
- Xsharpening threshold, 0-255.
- int xthresh = 255
- bool cwarp = true
- Chroma warp on/off.
- bool cwarp = true
- bool sharpen = true
- Sharpening on/off.
- bool sharpen = true
- int strength = 255
- Line darkening strength, 0-255.
- int strength = 255
- float wdepth = 16.0
- Warping depth, 0.0 - 64.0.
- float wdepth = 16.0
- int wblur = 1
- Warping blur level, 1-4.
- int wblur = 1
- float wthresh = 0.5
- Warping threshold, 0.0-1.0.
- float wthresh = 0.5
- int drange = 64
- Detail range, 0-255.
- int drange = 64
- float dboost = 1.0
- Detail boost, 0.1-10.0.
- float dboost = 1.0
- int dlimit = 30
- Detail limiter, 0-255.
- int dlimit = 30
- bool debug = false
- Debug mode; on/off.
- bool debug = false
- bool doutput = true
- Print debug info on processed image, only has an effect when debug=true.
- bool doutput = true
- string dclip = "rclip1"
- which stage of the processing to show, only has an effect when debug=true.
- int scolor = $FF00FF
- Which color to show lines in, colors are represented in hex values, take a look at the color presets.
- string dclip = "rclip1"
[edit] mfToonLite
Lite version of mfToon2, originally intended for realtime playback.
- mfToonLite (clip orig, int "twidth", int "theight", int "strength", int "dstren", int "drange", float "dboost", int "dlimit", string "mask")
- clip orig =
- Input clip.
- clip orig =
- int twidth = width(orig)
- int theight = height(orig)
- Target width and height (useful for cropping), 0-inf. If these parameters are not defined they default to the dimensions of the input clip.
- int twidth = width(orig)
- int ssw = 4
- int ssh = 4
- Horizontal/vertical supersampling factor, 0-inf.
- int ssw = 4
- int strength = 255
- Line darkening strength, 0-255.
- int strength = 255
- int dstren = 255
- detail strength, 0-255
- int dstren = 255
- int drange = 64
- Detail range, 0-255.
- int drange = 64
- float dboost = 1.0
- Detail boost, 0.1-10.0.
- float dboost = 1.0
- int dlimit = 30
- Detail limiter, 0-255.
- int dlimit = 30
- string mask = "fastest"
- Quality of the mask, any string other than "fastest" will use the slower mask.
- string mask = "fastest"
[edit] Examples
AviSource("Blah.avi") mfToon2()
[edit] Changelog
Version Date Changes
v0.54 2006/01/14 - adapted to MaskTools 2.0 by Manao [1] - change function name to mfToon2 v0.52 ????/??/?? - mfToon-v0.52.avs
[edit] External Links
- Doom9 Forum - initial mfToon development thread.
- Doom9 Forum - mfToon continued development.
- Scintilla's Guide - additional mfToonLite documentation.
Back to External Filters ←