Material Function vs Material Layer Function

Working on a Landscape Material. I started making a Material Layer Function for my Landscape Material Layers, but was getting errors saying only 1 material attributes input/output allowed. I switched to a regular function and no problems. Wondering what the difference is between the two and pros cons between when and how and when not to use either or? Don’t want to write a complex landscape material just to have to redo it in a different manor.

I don’t know exactly what a Material Layer Function does, but it most likely has to do with Material Layers, which are confusingly named to sound similar to “Landscape Layers.” Landscape Layers and Material Layers are different things, and I don’t think Material Layer type “layers” are intended to be interchangeable with Landscape type “layers.”

Regular Material Functions should just work with anything though. They are intended to be generic for anything you are trying to do in the material editor. :slight_smile:

Appreciate the effort, but this was not very helpful. A Material Layer Function is a Material Layer Asset, which is basically a Material Function. The only real difference I see in docs is parameters in a Material Layer will automatically show when used in a base material, where as they must be recreated in the base material when a function is used.

I have complex materials which utilize many functions in them, and in the final material, many inputs to function are repeated parameters, and some are inputs which are not parameter inputs. If Material Layers work basically the same as functions, and would not be slower to use in place of a function, I could make certain functions of mine more modular and would also greatly simplify my Master (base) Materials by self containing parameters in the Function which would normally be duplicated. This would especially be useful in my Master Landscape material as it would have around 8 layers, which can get pretty clustered pretty quickly. Thanks for trying though.

From what I can tell so far, a Material Layer can only have a Material Attributes Output and Input, and cannot have a Function Output or Function Inputs. I have not fully tested, but seems a Material Layer can be used in a Landscape Material (Material Attribute Layers Node). I have copied and pasted my Material Nodes into a Material Layer, however, when I used the Material Layer, very few of my parameters were available in the Material Instance (Only Texture parameters and Tessellation Parameters)?

I think in the material layer you get to choose the specific texture parameters to pass through, if you want only diffuse means you could easily make it. In the material function you can’t control it. And you have an option to input customized uv channels for landscapes and etc.