Avisynth mToon
mToon is a light-weight line darkener for drawn material, based on the "toon" function of mf.
Filtering → Avisynth → Line → Darkening

What it does
mToon builds a line mask from a morphological difference, narrows it with an aWarpSharp2 warp, and darkens the lines through a lookup with a lower and an upper threshold. It is faster than mfToon and works on cartoon and anime outlines.
The filter works on progressive material.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Strength | str | 0.001–256 | 1.0 | Strength of the line darkening. |
| Line threshold (min/max) | l_thr / u_thr | −128–127 | 2 / 12 | Lower and upper threshold of the line mask. |
| Warp (level/depth) | wlevel / wdepth | 0–100 / −128–127 | 2 / 32 | aWarpSharp2 blur level and warp depth. Level 1 is faster. |
| fast | fast | on/off | off | Faster processing with a slightly different result. |
Example
Default settings on a 10-bit YUV 4:2:0 source (no conversion is needed):
mtoon()
How Hybrid calls it
- The mToon script is loaded together with masktools2 and aWarpSharpMT (which provides aWarpSharp2).
- Only parameters that differ from the defaults are written.
- mToon works on gray and planar YUV clips with 8–16 bit integer samples.
- mToon also offers the common options and can be added to the filter queue several times.
Background
- "mToon Toon v0.82 edit, 2021.03.24 HBD mod based on MOmonster edit". The toon function was created by mf with support by Soulhunter, ported to masktools2 by Didée and extended with parameters by MOmonster.
- The script also has a
liteparameter. Hybrid does not offer it. - The same Toon v0.8 family exists for VapourSynth: Vapoursynth Toon.
Sources
- Hybrid's tooltips
- The AviSynth+ documentation does not cover mToon.
See also: Avisynth mfToon, Avisynth FastLineDarken