Use Arnold to generate an alpha image from a color image?

Use Arnold to generate an alpha image from a color image?

jr_w
Not applicable
1,433 Views
2 Replies
Message 1 of 3

Use Arnold to generate an alpha image from a color image?

jr_w
Not applicable

Hi, is it possible to use Arnold to create an alpha image/mask/black & white image from a color image?

This is the original color image:

915-snapshot-122.png

And this is the alpha image I want to create using Arnold shader network nodes:

916-snapshot-121.png

I want to make all the colors white, except the white background color, which I want to make black.

The reason I want to do this is because this way I don't need to maintain two image files. I just need a color image, then let Arnold generate the alpha image within the material.

I've tried using the Subtract node and plugging in the original image and white color, but I'm not able to get a clean alpha image using this method. Also, I've tried all different blending modes in the layer color node, but none give a pure black and white image. Does anyone know how to do this?

0 Likes
Accepted solutions (1)
1,434 Views
2 Replies
Replies (2)
Message 2 of 3

cdordelly09
Enthusiast
Enthusiast
Accepted solution

Hi @jr w! Yes, you can multiply the image by the predominant color:

918-screen-shot-2018-02-02-at-105720-pm.png

And you will get the "L" and "Logo" masks:

919-01.jpg

920-02.jpg

921-03.jpg

I don't know if you can clean the "ogo" borders from the "L" mask.

I attached the scene.
image-to-alpha.zip

0 Likes
Message 3 of 3

jr_w
Not applicable

Thank you Carlos, your scene helped me understand how to solve the problem. The missing part of my knowledge was how to use the ramp shader. Actually, only a single ramp shader node is necessary in order to generate the alpha image, it seems to work similarly to curves or levels in Photoshop.

The border issue can be solved by setting the filter in image attributes to Closest, and a negative value to the mip mapping bias. However, the image I provided is not of the highest quality, with a higher quality/resolution image it should be possible to completely get rid of the borders.

0 Likes