Opacity Texture parameter does not appear in Mat Instances

Hi guys, so I made a glass material - quite simple, I have Albedo/Rough/Metal/Normal textures applied to the various pins. I also switched the material to Translucent and the lighting mode to Surface Translucency Volume, so that I can have an opacity mask.
However, although the Opacity mask renders mostly fine in the master material, in my instances it doesn’t appear as a parameter (I have set it to the same group as the other textures). All of my glasses use different opacity maps, for fog or fade effects so I need to have different opacity maps.
Any clue as to what I’m doing wrong?

Is the texture an actual Parameter?

Suggestion(s) is: if you’re using parameters, make sure each one is named differently to each other. It might sound obvious, but I’ve accidentally made parameters the same name and only one has shown up. Happens a lot when you copy and paste params and are rushing through renaming things you might miss something so just double check that. Also, make sure it actually is a parameter, that’s another biggy.

This is my Mat setup. I’ve done everything I know and I still can’t get it to work (remade the material, recreated parameters etc)

why do you use all those Switch nodes with nothing plugged into the Value? do you actually know what the Switch node does?

I found this solution in a video about master materials. Apparently it allows me to keep some nodes empty (in case I don’t need for example an AORM texture) and the material will compile fine.

I had my main material without the switches and it kept throwing an error to me about an unset parameter.

If you want to have the option to use either texture maps or scalar params, then what you should use is a system like this for your maps. I did this really quickly to demonstrate the system so just tweak to work how you want (use your texture maps etc and use texture parameters to be able to change the texture if you choose not texture objects as I have).

To briefly explain, the switch which is called a StaticSwitchParameter is what it says. A switch that you can control within a material instance and it’s just an easy way of choosing between either a texture map or the scalar. The Lerp at the top gives a fall off on the colours of the material. The white will be the main colour and the black is the colour you see around the edge and this will update as you move around the mesh it’s applied on as it’s controlled by a Fresnel. See how this works.

I believe I do understand what your node setup does (flicks the switch between tex and color, and highlights the object fresnel) but it’s describing a different method of doing what I want (most probably).

What I would like to know is why my opacity map does not appear as a param in my current setup, while all other textures do.

Is your material Instance somehow set to Masked or even Opaque? If it isnt Translucent, the parameters leading to Opacity won’t be evaluated

A few more details for troubleshooting. My master material details, plus a detail preview of one Instance.

you should get rid of the Switch Nodes and replace them with StaticSwitchParameter nodes. Maybe the Default Value is random (True or False) and/or not evaluated properly because one input is empty.

Pls show the Details of the Instance and not the material itself (make sure you expand every section in the instance for better troubleshooting)

That’s about it. I mean it’s a very simple material, there’s not much else other than the (untouched) defaults to show.

Replace Switch Nodes with StaticSwitchParameters

Then try to get rid of everything and just plug a StaticSwitchParameter in and then on true have the Opacity map and false have a scalar parameter. If you want to use the Opactiy Factor parameter you’ve got then use a multiply and from A have the opacity map and then B have the opacity factor. That might do it.

do read the documentation about it, don’t just rely on something you saw on a video without fully understanding what it does.
the default value of the Switch parameter is false and you didn’t put anything into the Value entry. therefore what you are putting into the True entry is being compiled out (i.e. ignored), so no wonder you can’t even see the opacity param in the material instance

Resolved! Seems like somewhere along the way the Default Value of the Opacity map switch was unticked, resulting in it being indeed compiled out.

@Ralldex/@GSS_JXB - Although Switch did what I needed, I’ve so far replaced it with a Static Switch since it seems like advice I saw a lot in this thread.
@Chosker - I normally do, I’m very curious, but I just followed along this tutorial and instead of catching up on its documentation I guess I moved forward :slight_smile:

EDIT: Thank you all!