Can you use Parameters in Material Functions?

I’m necro-ing this rather old thread for a reason. I’ve noticed since a couple months that you can now place parameters in material Functions. You can then access these from the instance material where they are exposed.
Now this is quite useful for plenty of reasons. Encapsulating all the parameters and settings into the function, allows the function to be placed in a master material without the need of creating and hooking up any explicit parameters in the material and all parameters are exposed and can be changed through the instance material. It also allows to author the parameters from within 1 function propagated in all the materials that function is used. (Instead of maintaining all the external hooked up parameters in a material, if that function is used in several materials and has several parameters that can be hooked up to the function this can quickly ramp up and be unruly to maintain)

Avoid hooking up and having both a parameter hooked up into a inputFunction in a function, as it will still work and be exposed in the instance material. However if you then hook up also another parameter in the material in the exposed inputfunction input, (which overrides the parameter you have placed in the function into the functionInput node) both the parameter in the function and the one placed in the material will now be exposed in the instance material. The parameter from in the function however will be redundant but still visible and appearing to work (with appearing to work i mean you can change the input value’s and enable/disable the setting but it actually doesn’t change anything) in the instance material. The one in the material will work as expected. This can be confusing as you can’t see from the instance material that the parameter from within the function is now overwritten by the one placed in the material. (As you would expect) and no longer working.

Anyway the question is now you can use parameters in material functions is this legit to do? It seems to work and work very well. But would like a reply from epic on this matter before we use it extensively.

Kind Regards,
Ing

Edit: In answer to my own question if its legit or not. It is. Since 4.6 Added links with information just in case someone (like me) stumbles upon this thread and wants to know.

Under: Expose Parameters from Material Function heading.

1 Like