In UE5, I am simply unable to change material parameters at runtime for dynamic materials made with Material layers/blends. Changing parameters pre-runtime works and shows at runtime. I have confirmed the values are coming out of the timeline into the set scalar parameter node properly, but not sure how to troubleshoot from here.
Normal Materials/Instances can be changed at runtime.
Maybe you did but, you need to set the Material Instance Dynamic on your static mesh component. Otherwise the static mesh still uses the non-dynamic material
Appreciate the response! Yes, I’ve tried setting the material in construction using both types of dynamic material nodes. I even set the mesh material to the instance, and the skeletal mesh itself to use the instance (pre-dymanic of course). So I think yes if I understand your question right.
Right click on the node to add a breakpoint and pie to check if those nodes are actually being triggered.
If so, while still in pie, release controll of the character if you’re currently posessing it, and in the outliner select the character => select the relevant mesh component, check if the mid has been correctly assigned in the material slots of that mesh.
If so, you can double click on that mid to see a read only version with all the parameters, so check if the parameters are being set correctly.
I have no idea what that is! Seems like it was automatically generated somehow and its really weird the tooltip related to the map content folder and the field says a generic instance name. Neither make sense, but maybe this is googleable now. Still open for ideas though…
…but nothing is ever set checked the material multiple times while stepping through. I did notice at the bottom here that the parent is the instance itself. Should it be the master?
ok, expose the variable Exoskeleton Eye Material Ref, and check if on play, the reference in there is the same as the reference in the material slot of you rmesh
That tells me that exposing it allowed it to be written? Ran a print screen on the node as well and it ran it to 1.0 as well. So the instance has the correct parameter and value, but no change in material.
Quick follow up on this. I returned for now to a Function in Mat setup with layers driving the functions. All work with run-time parameters updating.
Would be real interested in anyone willing to share a running parameter change setup for pure Material Layer/Material Blend in a master Material setup.
Hi bbastien!
I stumbled upon the same issue when creating a render pass system.
Even though there is not much i could find on the internet, there IS a way to do it
(see attached screenshot)