If you’re applying a dynamic material instance to a mesh, you have to use a Set Material node targeting it, after you set parameter values. If you alter the parameter values further, you don’t have to use set material again.
As your variable names would suggest, if you’re trying to apply the material to a particle system, you need a couple extra things.
In the main tab of your particle system, you need a named material slot.
In the required tab of your emitter, you need a named material override with the same name.
In a blueprint where your particle system is found/spawned, in your particle system details, under particles, you need to add an instance parameter with the same name.
Then, instead of using Create Dynamic Material Instance, use Create Named Dynamic Material Instance, with the particle system as your target, and In Name set to the instance parameter name.
Finally, instead of using a Set Material node use Set Material Parameter node. Use the particle system as your target, with the instance parameter name, the named dynamic material instance.
Key point here is that after creating a Dynamic Material Instance, you should apply it as the active material of your static mesh(or particle system). So use the ‘Set Material’ node to change the material of your mesh to the created dynamic material instance. If you don’t do that, the mesh(or particle system) will be using the original material it had and changing the parameters of the instance will have no effect.
after a i had a good night sleep i understood what you were trying to tell me but a few things
“In the** main tab of your particle system**, you need a named material slot” i don’t understand what"main tab of your particle system" is referenced to
and when i add an instance parameter name in the particle system details there is only a vector or a random vector options, what if i want the vector value to be a mesh’s worldpostion?
and what i got is something like that and it still doesn’t work any idea what i did wrong?
I have a Warping affect made by a material’s absolute world position and i need to change a 4 values vector in order to operate it correctly
I applied the affect to 2 materials that I use in my particle emitter,this emitter i spawn trough: spawn emitter attached
I need that emitters material instances to change that 4 value vector according to the values I give it during the game session so i came to the conclusion that i need an MID(Material instance dynamic)
and I am having a hard time making it work so i need your guys help
In the last image you posted Set Material Parameter should use the same parameter name as Create Named Dynamic Material Instance, the param should be set to the return value of Create Named Dynamic Material instance.
I should have been more specific, both should be M_IB_Swipetrailbow_Inst. Make sure Plasma Bow PE Small Warp, in your blueprint, has an Instance Parameter called M_IB_Swipetrailbow_Inst. And that the particle system itself has a Named Material Slot with named M_IB_Swipetrailbow_Inst, and a Named Material Override named M_IB_Swipetrailbow_Inst.
Don’t forget to set your source material on Create Named Dynamic Material Instance.
what is a name named material slot and how do i make it?
**-Edit-
i found it and did what you told me to but it only affects the emitter i placed in the blueprint in order to link it to the “Create name dynamic material instance” and i doesn’t affect the emitter i spawn using “spawn emitter attached”
how can i make it apply to a spawned emitter?
and also it changed the emitter itself there is a reason or i did something wrong?**
-Edit-
i found it and did what you told me to but it only affects the emitter i placed in the blueprint in order to link it to the “Create name dynamic material instance” and i doesn’t affect the emitter i spawn using “spawn emitter attached”
how can i make it apply to a spawned emitter?
and also it changed the emitter itself there is a reason or i did something wrong?
it also doesn’t change what i specified in the “set vector parameter”
it as if it changed the material but it doesn’t apply any input the emitter even looks different