I don’t need it, I am only curious.
Color is 4 values, I believe, but I can’t find a node that converts it into RGBA.
I don’t need it, I am only curious.
Color is 4 values, I believe, but I can’t find a node that converts it into RGBA.
In the Compositor there is Combine RGBA but in the Shader Editor there is only Combine RGB… you have to mix with a MixGB maybe add with a black color with 0 alpha…
The way I see it (I could be wrong)
Alpha is not a colour value.
Colour can be determined with 3 values (RGB or HSV)
Some image formats (not all) such as png, exr can also contain alpha information.
The alpha value is an added value for each pixel that describes the amount of “transparency” to apply.
Alpha values are stored as greyscale values, white (1) is opaque and black (0) transparent.
When you add an image texture with an alpha channel to the shader editor there are 2 outputs “colour” and “Alpha”.
They are separate outputs because they are different things. The colour output has 3 values per pixel that determine the colour. The alpha output gives a value of “opacity” per pixel.
The alpha value is basically a greyscale mask that you can use to plug into the alpha socket of the Principled BSDF or use to mix shaders (like mixing a transparent shader with a diffuse shader). You can also use it for other things that have nothing to do with transparency, for example as a mask for a bump map or a factor to mix 2 totally opaque shaders.
The shader editor does not produce an “image”, it tells the render engine how to interpret the shader. It is the render engine that produces an image, thus the utility of baking.
If you want to produce an image with RGBA information from a shader you have to render it or bake it.
The compositor on the other hand does manipulate and produce images in a similar way as PS or GIMP that is why in the compositor you can overlay RGBA images using their alpha channel, and there are nodes to separate/combine RGBA etc.