Як було описано в попередніх розділах, кінцевим результатом маски модуля (комбінований ефект будь-яких намальованих та параметричних масок) є растрове зображення у градаціях сірого, що представляє ступінь, до якого ефект модуля повинен застосовуватися до кожного пікселя. Це растрове зображення зберігається внутрішньо для активних модулів і може бути згодом повторно використано іншими модулями в конвеєрі обробки.

Як і у випадку з будь-якою маскою, якщо значення непрозорості для пікселя в растровій масці дорівнює нулю, вхід модуля проходить через модуль без змін. Якщо непрозорість 1.0, модуль має повний ефект. Для кожного значення від 0 до 1.0 ефект модуля застосовується пропорційно в цьому місці.

Enable the raster mask from its tab and choose a source from the combobox. Raster masks can be identified by the name of the module against which they were originally generated.

Combining with drawn and parametric masks

In Ansel, a raster mask is no longer a mutually-exclusive mode: it can be combined with a drawn and/or parametric mask on top. When you do, the raster mask serves as the base, and the drawn and parametric masks refine it — their opacities are multiplied together pixel-by-pixel. Because masks combine multiplicatively, adding a drawn or parametric mask on top of a raster mask can only restrict its area further, never extend it.

This lets you reuse a mask computed elsewhere in the pipeline (for instance a luminance or edge mask produced by another module) and then trim it to a region with a drawn shape, or restrict it by color with a parametric mask, without having to rebuild it from scratch. In Darktable, selecting a raster mask disabled the other mask types entirely.


Note: Raster masks are generated as part of a module’s internal processing. Once a module’s processing is complete its mask then becomes available to subsequent modules in the pixelpipe.

Це має два наслідки:

  1. Raster masks cannot be generated by disabled modules since they do not participate in pixelpipe processing. As soon as you disable a module, its mask is no longer available for use.

  2. Raster masks are passed up the pixelpipe after module processing – they can only be used by modules that come later in the pipe than the generating module.