Scalar Paramaters in Blueprints?

Hey guys i’m trying to be able to edit this parameter (scalar multiplier for emissive ) through my construction blueprint, ive gotten many other functionalitys working but i cant seem to find the proper link to makes these work. I assumed i would of needed a material instance for this. But i may be wrong. Any help with this?
Thanks

Hi Twibbz,

Try setting up a Material Instance Dynamic instead of a Instance Material Constant and see if that gives you what you are looking for.

Thanks for the help, ive hooked this up. Create dynamic material instance with the parent being my material (not instance ) then exec set scalar parameter value to my material parameter name, then the value is set to an editable float variable.
But when i increase the spinner value in view port nothing actually changes.

Hey Twibbz, I set up a material the same way you did and set up my blueprints this way.


Create a new variable of the type “MaterialInstanceDynamic” and leave it’s default value empty, then use a “Create Dynamic MaterialInstance” to set your material to the newly created variable, that way your variable can then be used to set it’s scalar parameter.

Here you can see the emmisive multipler at 1

And here it is being set higher while being updated in the editor

Hey , cheers for the help. However i am still having issues. I have set it up the same as you have above but the texture still doesn’t update ts emmisive change for some reason. is there any reason you can think as to why this is happening? are there any prerequisites for these types of actions to happen that i may of missed. tick boxes? something in the material? atm i have a material instance constant set up in my materials, but i’ve tried it on both this material and the original parent :L
Ghaa should work

Thanks

I tried it a different way as well, but still no luck :frowning:

I believe what’s not working is that your Static Mesh is not referenced in the “Create Dynamic Material Instance” so the blueprint doesn’t really know which specific material it’s changing (forgot to mention that before). I have attached another image that shows you how to do that


hopefully this works !

Ignore the thumbnail dunno why that was added.

Yes! this worked. Thank you greatly! :slight_smile:

Sweet, glad to help!

I’m happy to hear that you got what you needed, I look forward to seeing more of what you create!

To sum up the reason why it wasn’t working is because you didn’t apply the DMI to you mesh. You created one and made a reference to it in a variable but the mesh was still using the initial non DMI material. The thing about the DMI reference is you can add it to multiple meshes and if you change a parameter it changes for all of them that have the DMI on it. Of course you can make separate DMI’s for each mesh if you don’t want this to happen.

If your dealing with a lot of meshes that you want DMI’s for, using a loop to create the amount you need may be better and store them in an array. With this you can easily apply the DMI to any mesh using another loop.

DMI_LoopCreation2.png

Great thread ! Thanks for the help - I was finding it hard to get used to using MI’s in Blueprint coming over from UDK. Great explanation! :slight_smile:

Cheers

This helped me alot, had some problems with Dynamic Materials in blueprints. I managed to watch some tutorials on how to get a color to change using a vector parameter, but when replacing it with a scaler parameter it just did not work? Anyway, I set it up as shown here and and after a few silly mistakes got it working.

Just so you know I used it to assign a two digit ID to a door. Basically I had a texture going A down to J and some numbers next to it. I split the staticmesh into two different materials for those two digits and created a dynamic material with variables. I then created a blueprint and using this method managed to make it so I could change each of the door ID’s separately with variables assigned to each. Hence a good way to create a long corridor with each door having a unique door number. YAY

Cheers again.

Hi!!,

I’m jumping up this thread because I have the very same problem, and following the Epic tutorials and a lot of threads over the Internet I cannot get this material running propertly.
So here are the pics of the mesh, the construction, the event graph and the setup of the material and the instance. I’m working in this for three days and I have no more ideas to try. What am I doing wrong because I can’t see…?

Ok, I solve this.

I was working with the element 0 of the material. I don’t know why this mesh have 2 slot materials, because it has only one, even in the 3ds max.
I think it could be the material of the bones. I must to convert the bones to edit polys in 3ds max to change the world scale units. The Element 0 could be the materials of this mesh.

Hello, I have also that problem, I can only change a material parameter by the node “Set scalar parameter value” with the collection but not with the dynamic material instance or the mesh node. Where could my mistake be?

Thanks