Announcement

Collapse
No announcement yet.

Parameters in nested functions not exposed in Material layer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Parameters in nested functions not exposed in Material layer

    Hi,

    I'm new to unreal, so I'm not even sure if this workflow is the best to create materials, and if it's the reason I'm having all this issues.

    I had this master material setup so that I have a single material function with every attribute parameter inside the function. So My base material is this:
    Click image for larger version

Name:	A.PNG
Views:	11
Size:	207.7 KB
ID:	1765103
    Inside that function I have my base setup for most of the attributes I need:

    Click image for larger version

Name:	B.PNG
Views:	6
Size:	204.0 KB
ID:	1765104

    And for example, in each attribute, I have diferent functions that do different basic setups, for example on the albedo, I have this one where I set a Color correction, and some other parameters, this is the same for most of the other functions I have per each attribute, including a triplanar I did:

    Click image for larger version

Name:	C.PNG
Views:	6
Size:	101.8 KB
ID:	1765105

    The main thing I did so far, mostly for organization and be able to reuse the different basic material changes without having to duplicate if I create different material styles, is that I am making the parameters within the functions themselves, so when I import the function I never have to create a parameter and plug it into the inputs of the function, but I just plug it in the middle and I get everything in my material.

    Working on normal materials is fine, and works great, this is the result in the material instance:

    Click image for larger version

Name:	D.PNG
Views:	6
Size:	696.8 KB
ID:	1765106

    Now my issue is with material layers. If I use my same base function that I use on a material, but on the material layer, what happens is that I see in the layer all the groups tabs, but inside there are no parameters exposed. As if only the parameters visible on the main material function are being seen, but if I look at my material layer not in the layer stack of the material, I can see them all.

    This is my material layer, based on my original material function that contains everything inside:

    Click image for larger version

Name:	E.PNG
Views:	6
Size:	100.8 KB
ID:	1765107

    This are the parameters if I make an instance of that material layer:

    Click image for larger version

Name:	F.PNG
Views:	6
Size:	79.2 KB
ID:	1765108

    And this is instead in my material what happens if I add the material Layer to the layer slot:

    Click image for larger version

Name:	G.PNG
Views:	6
Size:	277.8 KB
ID:	1765109

    As you can see I have all the groups, no parameters appear, only the textures, that are the only ones that are outside the entire function structure.

    Is this the normal behavior? And if so, is there a reason for it? using nested functions has been great for me so far before layers.

    I can totally understand if my idea of nesting functions is not the best approach, just did it because it was very easy to be organized, and to expand or update multiple different materials that share some aspects, by making it like this. And as I said, for normal materials works great without issues, but is just using layers that this doesn't work. And is really sad as it would be great if they could read the parameters like everywhere else.

    Should I change my approach to the master material? expose all parameters in function inputs ?(would mean every time I need a function I have to create a parameter) or is this a bug maybe and will be fixed?, in which case I can wait.

    Thank you for the time and help in advance,

    Gianluca
Working...
X