Jump to content
Sign in to follow this  
964racer

How to set alpha channel with function

Recommended Posts

I have an image file (jpg) with RGB.  I would like to create an alpha channel in that image (or I can create one inphotoshop first before I bring the file into houdini) and then set the values in the alpha channel at each pixel to be a function of the RGB values.   (say X^2, for example).  It looks like the "function" node will allow me to operate on the RGB channels, but then how to I get the output of that into just the alpha channel (as a greyscale) and then set the RGB values to black ?   Does the "channel copy" do that for me ?  How would I set that up ?  Thanks...

Share this post


Link to post
Share on other sites
13 hours ago, mestela said:

A vop cop filter would be the easiest way to do this, a snippet within the vop network easier still.

Attached an example...

cop_example.hip

Thank you !! I will take a look at your example...

Share this post


Link to post
Share on other sites

Channel Copy with the following settings will copy the luminance to A and set C to black:

Target: New Plane: A

Source: Input 1: C

Target: C

Source: Set to 0 (black)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×