0
$\begingroup$

I have a scene that renders to black, white, and grey pixels, with some transparency in between. Here's what that looks like:

original_render

When I use the following color ramp configuration:

color ramp 1

I get rid of the black and am only left with the white, and the transparent background: color ramp 1 render

This is fine, and what I intended to do. But, when I try to do the same with the white instead, and change the color ramp configuration to this:

enter image description here

(ie, I set the lighter side's color alpha to 0) It doesn't work, and I get this:

enter image description here

It seems that the color ramp is equating any pixel with alpha values of 0 to black pixels. Though I'm really not sure what's going on. Excluding the pictures because this post feels long enough as is, but I did test an additional modification: when I change the white tab to black on the last color ramp I posted (keeping alpha at 0), the resulting picture is the same as the last one I posted, except the white areas are transparent. So it is possible to get the lighter pixels to turn transparent with the color ramp, but that still doesn't solve the problem of having the black pixels and transparent pixels in the original render treated the same (ie as black pixels).

Sorry if this is worded a little awkwardly, I'm not totally sure of how to explain the issue I'm having. I'd be happy to clarify anything. I've been trying to figure this out for hours, any help would be appreciated.

$\endgroup$
1
  • $\begingroup$ if your getting that result then what would happen if you invert it (using an invert node) or you could try switching the black and white positions on the color ramp. $\endgroup$
    – object
    Apr 14, 2021 at 2:51

1 Answer 1

2
$\begingroup$

...and yes, shame on me, big Blender community, i did not answer the question "why is the colorramp....", but hopefully it is useful for stillsleep and that's what he wanted to achieve.

If i understand you right, you want to

  1. convert black to transparent

  2. convert white to transparent

if yes, here is the node setup:

Original:

enter image description here

  1. convert black to transparent

enter image description here

  1. convert white to transparent

enter image description here

and just in case you wanna make both transparent, black and white, you can use this setup:

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .