2
$\begingroup$

I would like to ask for help figuring this one out.

I have a grayscale image with a black background, and I have the same image but colorized and with transparent background.

I need a mixed shader so that the black is gradually transformed into transparent, while the grayscale is transformed to a color scale.

I tried with a ColorRamp but the alpha becomes black in the render even if I have a blend mode to "alpha blend".

It would be nice if I could symply use the grayscale image texture for it, but I could also use on where I load the two images and mix them.

Thanks for any help

Edit: I add the real RGBa if you want to try it with this images

Dog RGBA DogGray enter image description here

$\endgroup$
  • 1
    $\begingroup$ Hello :). By 'gradually transform' you mean animation? Why not just use a mix shader? $\endgroup$ – Jachym Michal May 8 '20 at 18:15
  • $\begingroup$ Hello :) I do have it, and I can mix them but as I say, the alpha from the RGBa becomes black and I have not been able to change that ¯_(ツ)_/¯ $\endgroup$ – lesolorzanov May 8 '20 at 18:17
2
$\begingroup$

Works just fine with the provided images.
Perhaps you forgot to connect the alpha channel?

enter image description here

$\endgroup$
  • 1
    $\begingroup$ That was exactly it! Silly me, I was using Diffuse BSDF instead of principled. Can't believe I spent like 30 min trying to figure it out. Thank you! $\endgroup$ – lesolorzanov May 8 '20 at 18:30
  • $\begingroup$ Happy to help :). I'd reccomend Images as Planes addon shipped with blender - it connects alpha channel automatically $\endgroup$ – Jachym Michal May 8 '20 at 18:49
  • 1
    $\begingroup$ Oh yes I use it. Indeed I just load the image as a plane and it comes with a nice shader to begin with. I am super new at this. You've helped me a lot. I am doing a video to explain my scientific paper, and it is coming along nicely now! $\endgroup$ – lesolorzanov May 8 '20 at 18:51
  • $\begingroup$ Good luck with your paper! You don't need to use Principled necessarily, you can use the Diffuse BSDF and a Transparent BSDF, and use the alpha to mix between the two with Mix Shader. It doesn't hurt to use Principled, though! Especially if you prefer the more realistic results. $\endgroup$ – Kroltan May 9 '20 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.