Вузол «Задання Альфа» – Set Alpha Node

../../../_images/compositing_node-types_CompositorNodeSetAlpha.png

Вузол «Задання Альфа» – Set Alpha Node.

Вузол «Задання Альфа» – Set Alpha Node додає альфа канал у зображення.

Уводи – Inputs

Зображення – Image

Стандартний увід зображення.

Alpha – Альфа

Величина Альфа може бути задана для цілого зображення за допомогою числового поля уводу або по-піксельно через роз’єм.

Властивості – Properties

Mode

Method to mix the alpha with the input Image.

Apply Mask

Multiply the input images RGBA channels by the Alpha input value. In this cases, the output is using Premultiplied Alpha.

Replace Alpha

Replace the inputs alpha channel with the Alpha input value. In this cases, the output is using Straight Alpha.

Виводи – Outputs

Зображення – Image

Стандартний вивід зображення.

Примітка

This is not, and is not intended to be, a general-purpose solution to the problem of compositing an image that does not contain alpha information. You might wish to use «chroma keying» or «difference keying» (as discussed elsewhere) if you can. This node is most often used (with a suitable input being provided by means of the socket) in those troublesome cases when you cannot, for some reason, use those techniques directly.

Приклад – Example

Зникання у Чорноту – Fade To Black

To transition the audience from one scene or shot to another, a common technique is to «fade to black». As its name implies, the scene fades to a black screen. You can also «fade to white» or whatever color you wish, but black is a good neutral color that is easy on the eyes and intellectually «resets» the viewer’s mind. The node tree below shows how to do this using the Set Alpha node.

../../../_images/compositing_types_converter_set-alpha_fade-to-black.png

Ефект «Зникання у Чорноту» – Fade to black.

In the example above, the alpha channel of the swirl image is ignored. Instead, a Time node introduces a factor from 0.0 to 1.0 over 60 frames, or about 2 seconds, to the Set Alpha node. Note that the time curve is exponentially-shaped, so that the overall blackness will fade in slowly and then accelerate toward the end. The Set Alpha node does not need an input image; instead, the flat (shadeless) black color is used. The Set Alpha Node uses the input factor and color to create a black image that has an alpha set which goes from 0.0 to 1.0 over 60 frames, or completely transparent to completely opaque. Think of alpha as a multiplier for how vivid you can see that pixel. These two images are combined by the Alpha Over node completely (a Factor of 1.0) to produce the composite image. The Set Alpha node will thus, depending on the frame being rendered, produce a black image that has some amount of transparency. Setup and animate, and you have an image sequence that fades to black over a two-second period.

Примітка

Жодна Інформація зі Сцени Не Використовується

This example node tree does not use the Render Layer node. To produce this 2-second animation, no Blender scene information was used. This is an example of using Blender’s powerful compositing abilities separate from its modeling and animation capabilities. (A Render Layer could be substituted for the Image layer, and the «fade-network» effect will still produce the same effect.)

Поява Титру – Fade In a Title

Для уведення у вашу анімацію ви схочете, щоб була представлена назва (титр) вашої анімації на певному задньоплані. Ви можете зробити, щоб титр влітав на екран або появлявся на ньому. Для створення ефекту появи титру на екрані скористайтеся вузлом «Задання Альфа» – Set Alpha разом з вузлом «Час» – Time, як показано нижче.

../../../_images/compositing_types_converter_set-alpha_fade-in-title.png

Використання вузла Set Alpha для створення ефекту появи титру.

У прикладі вище, крива вузла «Час» – Time забезпечує значення Альфа для увідного роз’єму вузла «Задання Альфа». Поточний вузол «Шари Рендера» – Render Layers, який містить титр в огляді, забезпечує увідне зображення. Як і раніше, вузол Alpha Over змішує (використовуючи значення альфа) вихор на задньоплані та титр з альфа для продукування композитного зображення.

Забарвлення ЧБ зображення – Colorizing a BW Image

../../../_images/compositing_types_converter_set-alpha_colorizing-image.png

Використання вузла Set Alpha для забарвлення зображення.

In the example above, notice how the blue tinge of the render input colors the swirl. You can use the Set Alpha node’s color field with this kind of node tree to add a consistent color to a BW image.

In the example tree to the right, use the Alpha value of the Set Alpha node to give a desired degree of colorization. Thread the input image and the Set Alpha node into an Alpha Over node to colorize any black-and-white image in this manner.