"Alpha Over" Equivalent in Hitfilm



  • DrIgnatiusCole
    DrIgnatiusCole Posts: 52 Just Starting Out*

    Yep I am getting up to speed with alpha channels. Mostly my experience is a hand-wavey "it sort of works like this I think".

    I think why Frank is not running into problems is because he is probably using a safer method of ensuring there is black background which is the basis for pre-multiplied alpha images that HF defaults to. I think HF is guessing but never seems to guess straight.

    It COULD be a bug in Blender or just a user-not-knowing issue when exporting images with transparency. My bet is that if I rendered to my file output THROUGH an alpha over or mix node set to convert to pre-mult, or with a background image set to black, then I would be able to bring the images with transparencies in to HF without issue.

    Most of the images are coming in correctly as pre-mult and I don't have to do anything.

    Thanks for the tips regarding bit depth. I'm familiar with this from the music world (I am a composer by trade) - 32-bit floating point is generally how audio engines work. In audio, you get vastly greater detail out of the headroom that comes from higher bit depth than you do from sample rate. So CD audio is 44.1/16bit, broadcast standard is 48k/16 or 24...but when recording we always choose 24 bit regardless of the sample rate.

    Would you say this is true in the video world? So PNGs would be fine provided I chose 16 bit rather than 8? I am using OpenEXR Float (Half) which is 16bit, but I don't know if it is saved as floating point or fixed point.

  • Triem23
    Triem23 Posts: 20,394 Power User

    Yeah, the bit depth comparison with audio is close enough (I also have a background in production audio). In audio the bit depth determines amplitude "resolution" from inaudible to clipping, in digital imaging it's the number of values in each color/alpha channel between 0 and full. Just like with audio, where 24-bit recording and editing gives you more leeway in mixing before 16-bit output, high color depth gives you more leeway in color mixing before outputting an 8-bit/channel video for upload. You'll also see a huge difference in things like glows and gradients.

    So, your project color depth is found in File Menu>Project Settings, Rendering tab. It's probably at 8-bit. Since you're working with EXR, I would certainly say go to 32-bit. As noted in my prior post there's a glitch with 32-bit linear and 3D models imported directly into Hitfilm, but, since you're comping render passes, you should be ok. @spydurhank Frank, you'd know if that bug is affecting EXR passes, I assume?

    Default color depth settings are in File>Options>Render. Once you figure out which 32-bit mode is better for you you'll want to set that as default so you don't have to set that up for every new project.

    Now, I'd say if your EXRs are 16-bit you can probably get away with one of Hitfilm's 16-bit modes (which will display faster than 32-bit, but Frank will advise all 32-bit, all the time).

    16-bit PNG also would work. I haven't tested those to compare between 16 or 32-bit EXR.

    Note Hitfilm only exports 8-bit PNG. You can export higher bit depth with TIFF, TGA, or EXR. Good to know if you intend on exporting stills or image sequences from Hitfilm. There's a Feature request thread for 16-bit PNG export if you want to Up Vote.

    I can't speculate on how your Blender nodes affect your render passes for straight/premultiplied alpha. My Blender skills are less than wonderful, and, surprisingly, my brain doesn't like dealing with nodes in cg software, despite the workflow being similar to setting up audio hardware routing, busses and patchbays back when everything was still hardware based - and I used to (literally) design patchbay diagrams in my sleep! (Literally - an ex gf teased me once at breakfast about taking in my sleep. "A 1 out to F 1 in, B 2 out to F 2 in, etc..." I chuckled and handed her the notebook I was writing in, where I had just connected the outputs of channels 1-8 of patchbay A to inputs 1-8 of Patchbay F, which was intended to take the channels of the portable 8-track recorder - input into A - to the studio mixer on F. By default those mixer channels were the individual outputs of a Kawaii K4R, and I remember waaaaay too much about a 22 year old setup...) Why the heck Blender nodes don't want to compute is a mystery.