Mix Shaders by Alpha Texture

   1352   5   1
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
Hello guys, I guess this is quite basic, but I haven't figured it out yet.

I created some kind of metal dish which has PBR textures, and I want to add a logo shader to it. Both shaders I created from principipledshader.

I think the easiest way to combine them is the layermix node. I connected both shader layer outputs to A and B. Now for Alpha I have to import the alpha texture manually, cause I can't add a file in layermix itself. But afaik I also have to tell the texture node that's connected to alpha how to map on the mesh right?
Can you tell me how this works?
Edited by freewind - Dec. 12, 2023 17:20:11
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
freewind
I think the easiest way to combine them is the layermix node. I connected both shader layer outputs to A and B. Now for Alpha I have to import the alpha texture manually, cause I can't add a file in layermix itself. But afaik I also have to tell the texture node that's connected to alpha how to map on the mesh right?

That sounds right to me

uvcoords(uv out) --> (uv input)texture with rgba signature(clr out) --> (hvec in)vector4 to float(fval4 out) --> (alpha in)layermix

or use a surfacecolor node:
surfacecolor(alpha out) --> layermix(alpha input)
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
jsmack
uvcoords(uv out) --> (uv input)texture with rgba signature(clr out) --> (hvec in)vector4 to float(fval4 out) --> (alpha in)layermix
Thank you, that finally works.

There's still some weird issue in the viewport:

If I want to shade any materials that vary from the outofthebox-principledshader (like layermix or some procedural textures) then they don't show up in the viewport. Instead I just see the default grey or the color I set in the basecolor parameter though that is overwritten by other nodes. So I have to wait for the rendering for every single change.

I've seen in tutorials about procedural shaders this already worked in H16, so I hope it will work now.
Do you have idea if there's some setting wrong that causes this?
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
freewind
I've seen in tutorials about procedural shaders this already worked in H16, so I hope it will work now.
Do you have idea if there's some setting wrong that causes this?

no, procedural shaders don't work in the viewport.
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
jsmack
freewind
I've seen in tutorials about procedural shaders this already worked in H16, so I hope it will work now.
Do you have idea if there's some setting wrong that causes this?

no, procedural shaders don't work in the viewport.
damn it worked so fluently in the tutorial I didn't even notice it was rendering... silly me

thanks for clarifying!
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
freewind
jsmack
freewind
I've seen in tutorials about procedural shaders this already worked in H16, so I hope it will work now.
Do you have idea if there's some setting wrong that causes this?

no, procedural shaders don't work in the viewport.
damn it worked so fluently in the tutorial I didn't even notice it was rendering... silly me

thanks for clarifying!

If you use purely materialX shaders in the Solaris viewport, many of the nodes work with the HoudiniGL renderer--this allows some procedural shaders to work in both GL and Karma. This precludes the use of karma-specific nodes or other non-materialX shaders, also some nodes don't work with GL for whatever reason.
  • Quick Links