0
$\begingroup$

How could I mix these two shaders so I could screen one over another?

Attached here the blender file

I have these two shaders (in environment texture)

Shader1 enter image description here

Shader2 enter image description here

And I want to screen one over another like this (done in photoshop) enter image description here

However, After trying with several mix nodes (color, math, mix shaders, add shaders) I can just get some mixture out of them like this: enter image description here

$\endgroup$
  • $\begingroup$ @moonboots I just uploaded the blender file. And indeed, the issue is that the red cloud is not over the white, but rather they mix together $\endgroup$ – Daniel Ortega Nov 21 at 12:30
2
$\begingroup$

It certainly is an unconventional texture.. you're displaying a distorted texture-space,as color, rather than a color, in a distorted texture-space.. but if it gets you where you want to go, why not?

Perhaps, to get you some control over the mix, without depending on the visible color in the texture, you could introduce an alpha channel to whatever colors ypou choose to put in the color-ramp of the foreground texture:

enter image description here

..and use the alpha to control the masking, with something in the way to control the range..

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for your answer! I am not sure what you mean with "you're displaying a distorted texture-space,as color, rather than a color, in a distorted texture-space" Could you explain it a bit more? I am not an expert in blender so I am open to find out better ways to achieve the same :) My idea is to create clouds over clouds with different shapes to create some sort of nebula :) $\endgroup$ – Daniel Ortega Nov 22 at 18:14
  • $\begingroup$ If you plug the various outputs of the Texture Coordinate node straight into a material output, you will see colors. They are the encoding of the X,Y, and Z of the texture-space as colors: the 'XYZ addresses' of the shading-points shown as R, G, and B. Typically, those numbers would be used as XYZ, not RGB, and plugged into the Vector input of various textures, to tell the textures (which provide the colors) where to go, not displayed as colors in their own right. You might find you have more flexibility if you use them that way... but I've nothing against their creative use! :) $\endgroup$ – Robin Betts Nov 22 at 21:49
2
$\begingroup$

So I'm not sure what you're doing but you could create this setup for your red cloud node group:

enter image description here

Then plug the 2 groups this way:

enter image description here

And you'll get that:

enter image description here

I hope someone has a cleaner way though ;)

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for your input, indeed it is a very good solution, although I mark the other answer as the accepted one as it adds the map range, which i think its interesting as it helps to remove those "sharp edges" a bit. $\endgroup$ – Daniel Ortega Nov 22 at 18:12

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.