Using & creating images to use for Images as Planes

Heya, just finished this video. I've a quick few Q's about the above mentioned.

For an Image to be used as a cookie, must it be a PNG file? I tried with a jpeg on my comp files but that didn't work (it was just a solid shadowed rectangle) - I'm assuming it's because a png allows for transparency in its data, ie instead of white, there's nothing (I don't know the correct terms for how png's work so consider this layman's terms.) I used the png that Jonothan used in the video and that works. I figure this is the case, I'm just after clarification.

Secondly, does using an image as a plane work kind of like a film negative when developing photography in a dark room?
If I were to create my own images to use as planes, would it work as if all the darks and blacks in the image are essentially blocking the light, and the lights and whites allow it to pass through? I suppose in the case of a png, would the lights and whites be the afformentioned 'nothing' in its data? This Q is more a case of, "I know how to make it work, I'd just like to know why it works" if that makes sense.

Cheers

1 love
Reply
  • Omar Domenech replied

    Yep, you got it on both things.

    The math is easy. Since black in numbers term is zero, then where it's black it's off. White is 1 so that means there's white it's on. 

    Zero (0)= Off

    One (1)= On

    In other words...

    Black in RGB is 0 (off)

    White in RGB is 1 (on)

    And again for the cookie, the alpha being transparent it lets light through. 


    2 loves
  • Harris Clook(Yeehawcowboyletsgo) replied

    That's great, cheers, Omar!

    1 love
  • Martin Bergwerf replied

    Hi Harris Yeehawcowboyletsgo ,

    Just to be clear, if the Alpha is 0 (black), it is fully transparent (let's the light through in the case of a cookie)). If the Alpha is 1 (white) it is fully opaque.

    If the Alpha is 0 and the Color is, for instance red, then the light (assuming the light is white) going through that part of the cookie will be tinted red.

    1 love
  • Adrian Bellworthy replied

    Yeah as mentioned, It can be a little confusing at first when using an alpha channel.

    Alpha, not only is it the first letter of the Greek ALPHAbet (second letter Beta, see where the name alphabet comes from?)
    It also has a value of 1 in the Greek Numerals System.

    Alpha is understood to mean transparency and Opaque means non-transparent
    The 0 = Off and 1 = On is correct, however it is not alpha off or on, its more like Opaqueness that is off or on, or somewhere in between.

    0 = Opaque Off = Alpha On = Transparent
    1 = Opaque On = Alpha Off = Non Transparent

    Confused?
    When Alpha means 1 or transparent, but needs to be set to 0 to actually be transparent.
    Opaque channel makes more sense than Alpha channel. Or switching the value.

    • True
  • Dwayne Savage(dillenbata3) replied

    It can't be opaque channel. Why? because opaqueness formula affects the entire element. Alpha only affects the color. An alpha channel is a linear gradient not just 0 and 1. So in alpha compositing, which later was added as a color channel called the alpha channel in some image formats, the alpha controls the amount of mix between 2 images. The mathematical formula uses the Greek alpha symbol(α) as the linear value. Thus how it got it's name. The other 2 variables where A and B which is why you see it listed as image/video A to image/video B in most video editors. Sorry I don't remember the formula. In this case, you are mixing the texture's color (A) to the color behind it(B). This is similar to how the factor(Fac) on a mixRGB/Mix color node set to mix. The top color is the background(B) and the bottom color is the color being mixed(A). The Fac would be the alpha. Fac of 0 would be fully the background color. Fac 0.5 would be a 50% mix of the bottom color with the top color. Fac of 1 would 100% the bottom color. Note: Since this has more to do with video editing/color grading I don't think CGC covers this, but just for your information. Opacity compositing using A over B usually gives the same results as alpha compositing. With Opacity compositing you also have A in B, A atop B, and A out B which all give you different results and honestly I'm still try to figure out.