Page 1 of 1

Alpha Expression Overrides the RGB?

PostPosted: Fri Jul 30, 2021 5:53 pm
by bentraje
Hi,

I'm aiming to have an alpha from the fresnal pass (grey image).

1) To create an alpha from it, I use Bitmap node set to luminance.
2) To process it further, I use Custom Tool node to set alpha between 1 and 0 only.

It works. The problem is the RGB is also affected. I want the Alpha only to be affected.

You can see an illustration of the problem here:
https://www.dropbox.com/s/ilnxt7pfuhpus ... b.jpg?dl=0

If you want to check the sample fusion file. You can check it here:
https://www.dropbox.com/sh/5a1v3qxpm8no ... -Co0a?dl=0

Thank you

Re: Alpha Expression Overrides the RGB?

PostPosted: Fri Jul 30, 2021 9:23 pm
by Bryan Ray
The output of the Bitmap node is a single channel. When applied to a tool that expects RGBA, that single A channel is copied to the other three. Use a ChannelBooleans instead:

Code: Select all
{
   Tools = ordered() {
      ChannelBooleans1 = ChannelBoolean {
         CtrlWZoom = false,
         Inputs = {
            ToRed = Input { Value = 4, },
            ToGreen = Input { Value = 4, },
            ToBlue = Input { Value = 4, },
            ToAlpha = Input { Value = 13, },
         },
         ViewInfo = OperatorInfo { Pos = { 515.333, 142.515 } },
      }
   }
}

Re: Alpha Expression Overrides the RGB?

PostPosted: Sat Jul 31, 2021 6:10 am
by bentraje
@Bryan

Ah gotcha. Thanks for the clarification.
The Channel Bolean (i.e your code) works as expected! :)