Custom shader with base opacity individually from layer's opacity
Soto
Posts: 1,440
Hi.
I have a custom layered shader. Is it possible for those extra layers to have their own opacity settings independent from the base opacity?
Example: Apply this shader to a geometry shell and have one layer for dust and other layer for a sticker, but ovbiously I'd need to have the base opacity to 0 so the underneath model is visible under the layers.
I'd just like to know if it's possible at all before I go insane with Shader Mixer trying to do it.
Thanks.
Comments
Have you played with the Studio built-in "4-Layer Uber PBR MDL" shader? The sample that loads when you apply it has weight maps for each of the three additional layers in addition to the original base Cutout Opacity. The extra layers don't have all the channels as the base, though, but might be enough. Might not need the geoshell.
Thanks, yeah, I played a bit with it, but it doesn't do what I want.
I did a shader similar to that one, but if I use it in a character, I still have to paste the character settings to the layered shader and not all settings will be there, especially if the character uses the Skin PBR Shader.
I'm definitely trying to come up with something for geometry shells, but the cutout opacity applying to all layers gets in the way.
It depends what you want to achieve - I'd think you'd use the effect opacities to control the mixing of the diffuse channels, then combine the opacity values (e.g. taking the max value), and pass the results on to the next property to build up a final set of colours and opacities to be passed to the renderer - lots of maths bricks, but which ones will depend on the logic of the mixing you want.
Thanks. Basically, I'd like to apply it to a Geometry Shell, so I can use the layers to overlay different effects over a figure, but the base of the shader is getting on the way because the Cutout Opacity controls the whole shader, including the layers.
I've tried giving the layers their own cutout opacity, but the base one still controls them all, so I don't know if this is even possible at all.
This is in Shader Mixer? I must admit I've not done much at all with Iray in Shader Mixer, but I'd think you'd start with a base 0% opacity and then add in the opacities for each layer (this is where things get tricky depending on how you want the layers to stack) to build up a final opacity value.
Thanks. Yes, I'm using Shader Mixer. so far I've been able to include pretty much everything available in the PBR Metallicity block of each layer (bump, Difusse Overlay...) but there is no opacity input :/
What do you mean by start with a base 0%?
hmmm - with LIE, you can add opacity masks on top of each other additively. So you could just have a global opacity control in your shader and put a black image in there as the default. And then add opacity masks as LIE presets on top of each other depending on what you are doing in the other layers of your shader.
Not sure if that is a suitable solution.
Thanks for the suggestions, but it's a shader I'm working on. :)