Jump to: Board index » General » Fusion

Alpha slider in Background node

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

friskypixel

  • Posts: 3
  • Joined: Fri Oct 16, 2020 3:03 pm
  • Real Name: David Frisk

Alpha slider in Background node

PostFri Oct 16, 2020 3:12 pm

Sorry for what is probably a totally basic question, and apologies if this has been covered before, but I'm pretty new to Fusion and I can't seem to find the answer to this question anywhere and why this is the case...

In the background node, where you pick a color, I don't understand the logic behind the alpha slider. I can't for the life of me understand why turning down the alpha all the way doesn't just make the whole thing transparent. Why do all the RGB sliders have to be turned down to 0 for that to happen? Likewise, why does the alpha slider do nothing when the RGB sliders are turned all the way to 1?

This just doesn't act like every single other program I've ever worked with, where RGB picks the color, and the Alpha is independent of those color pickers and just controls the opaqueness of the color you've chosen. Somehow the sliders are intermingled in some way and I don't understand how.

For the record, I know the "proper" way to do it is to use Blend in a Merge node, but I'd still like to figure out what the logic is in the Background node.

Thanks so much.
Offline

Sander de Regt

  • Posts: 1892
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Alpha slider in Background node

PostFri Oct 16, 2020 4:02 pm

To see the effect of the alpha slider, copy/paste the following in your Fusion comp area.
It will show that even without alpha, the colors still influence each other, because Fusion merges additively by default. If you set your merges to subtractive, the slider will have the result you expect it to. Either that or put an 'Alpha multiply' node after your background and leave the merges set to additive.

Code: Select all
{
   Tools = ordered() {
      Ellipse1 = EllipseMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.333, 0.666 }, },
            Width = Input { Value = 0.4, },
            Height = Input { Value = 0.4, },
         },
         ViewInfo = OperatorInfo { Pos = { 275, -16.5 } },
      },
      Background1_1 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Ellipse1_1",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftGreen = Input { Value = 1, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 16.5 } },
      },
      Ellipse1_1 = EllipseMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.666, 0.666 }, },
            Width = Input { Value = 0.4, },
            Height = Input { Value = 0.4, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, -16.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 82.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftAlpha = Input { Value = 0, },
            EffectMask = Input {
               SourceOp = "Ellipse1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 275, 82.5 } },
      },
      Background1_1_1 = Background {
         CtrlWZoom = false,
         Inputs = {
            EffectMask = Input {
               SourceOp = "Ellipse1_1_1",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftBlue = Input { Value = 1, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 16.5 } },
      },
      Merge1_1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background1_1_1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 82.5 } },
      },
      Ellipse1_1_1 = EllipseMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.5, 0.333 }, },
            Width = Input { Value = 0.4, },
            Height = Input { Value = 0.4, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, -16.5 } },
      }
   }
}
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

friskypixel

  • Posts: 3
  • Joined: Fri Oct 16, 2020 3:03 pm
  • Real Name: David Frisk

Re: Alpha slider in Background node

PostFri Oct 16, 2020 4:16 pm

Thanks for the response. I pasted that in and took a look at it but I think I'm confused on what I'm supposed to be seeing, or that maybe I didn't explain clearly what I meant. Let's take merge nodes and anything else out of the equation at all.

For example, let's say I have absolutely no other nodes except a background node. I turn the red up to 1, the green and blue down to 0, and the alpha up to 1. I have what I would expect...just a purely red background color. However, if I take the Alpha slider and turn it all the way down to 0, I would expect that I would see nothing in the viewer but the checkerboard background because I turned the Alpha all the way down. But that doesn't happen. I see what looks like a 50% red transparency and 50% checkerboard. Why does turning down the alpha to 0 not just make the entire color disappear? Why do I also have to turn down the Red value to 0 for that to happen? Like in After Effects let's say...I have a Solid I've created, I turn down the opacity slider, and the whole whole things disappears, regardless of what its RGB values are.
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Alpha slider in Background node

PostFri Oct 16, 2020 6:19 pm

The answer to this question is: math

As sander already mentioned there is additive and subtractive layering.
In additive mode its: background * (1 - foreground alpha) + foreground color. Which means if your alpha i 0 its just an background + foreground. That's why it looks like the checkerboard is half there

Other programs may always multiply the color by alpha, which is why the color disappear when you turn down the alpha. You can achieve this in fusion with the the alpha mult node behind the background node

You can argue what is better, but in my opinion alpha is not related to color and therefore you don't automatically premult the color by alpha.
Offline
User avatar

Bryan Ray

  • Posts: 1596
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Alpha slider in Background node

PostFri Oct 16, 2020 6:30 pm

It might be better to think of Alpha as a measure of occlusion.

Imagine you have a streetlight that's creating a glow or flare. The lamp and post are fully opaque—they occlude anything that is behind them and thus have an alpha value of 1.0. The flare, though, doesn't occlude anything. If there's an object behind the streetlight, you could see it through the flare, so if you were to isolate the light, those pixels would have an alpha value of 0. The RGB values might be quite high, but there is no alpha.

Some other compositors don't trust you—they automatically premultiply a color by its alpha, darkening the RGB values, so you can't get proper light transport. It's an artifact of their assumption that you'll be working with integer color values—if a pixel goes above 1.0 (255), bad things can happen, so the software takes steps to prevent it. A code value of (1,0,0,0) is far less likely in AE, which prevents that red channel from being overdriven when you put it on top of something else.

Fusion and Nuke don't try to 'help' you in that way, and that makes them more flexible if you understand what's happening on a technical level.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

friskypixel

  • Posts: 3
  • Joined: Fri Oct 16, 2020 3:03 pm
  • Real Name: David Frisk

Re: Alpha slider in Background node

PostFri Oct 16, 2020 9:01 pm

Thank you so much for the explanation! My knowledge of premultiplying only went as far as its effect on the edges of assets that were exported out of programs like AE without a straight alpha channel, and the fringing that occurs because of that, if that makes sense. So it's kind of hard for me to wrap my head around it's purpose or the terminology in general in other use cases. I'll just have to sit with it for a while to let it sink in. In the end, I'll probably just end up not touching that slider and just use a blend slider in some other node :D

Anyway, please forgive my ignorance and thank you for this.
Offline
User avatar

Bryan Ray

  • Posts: 1596
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Alpha slider in Background node

PostSat Oct 17, 2020 5:44 am

BrightnessContrast, check the Alpha box, then use the Gain if you want a simple opacity control like AE's.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com

Return to Fusion

Who is online

Users browsing this forum: Google [Bot], tifchristopher and 15 guests