I can't get Dynamic Material Color changes to work...

Im trying to make an actor, for display purposes, to practice Dynamic changes to Material Color.
Its default color value is red, and I want to change it to blue via a Blueprint script.

This is the function that is called from within the Actor, after it is spawned:

Just a Material Billboard, this is the component view of the actor that is spawned:

This is the Material Instance Constant it uses:

This is the Material the Instance Constant is based off of:

None of the values of the Nodes in the blueprint function are showing ‘none’/‘missing values’, and the blue color is successfuly passed to my MID variable(Material Instance Dynamic).
Ive spent all day on this and Im at a loss for what Im missing/doing wrong.
Even if it ends up being a small obvious error on my part I would greatly appreciate any assistance with this.

At a guess, your method of setting up the material instance seems overcomplicated. I just tested this out and it works:

I guess I should have specified more.
As I stated in my post “None of the values of the Nodes in the blueprint function are showing ‘none’/‘missing values’”, meaning all of the values are passing properly to the ‘Set Material’ node.

Still, Ill give it a try. Tomarrow tho, I need to sleep and get a fresh mind on this.

Thank you, and feel free to post any other observations. :slight_smile:

Ok. Ive tried to simplify it so that it goes straight to a Create Dynamic Mat Inst Node then straight to a Vector Para Value Node and manualy set the color via Make Linear Color.

It did not work and I after a debug break, noticed the Return Value of the Create Dynamic Mat Inst Node is now ‘None’.

If anyone has any ideas, or would like more information about how I have set up the mats and values please let me know.
Thanks.

I would make the MID in the Construction Script the way Enos shows above, and you can right click on the Return Value, and Promote it to a Variable. Then, you can just change this Variable in the Event Graph with a Set Vector Parameter. You can see lots of examples of this in the Tappy Chicken example game.

Also, in your material you can just run the red directly into the Emissive channel only, if your material type is Unlit. Also, you don’t need to multiply it by the Mask. That will just darken it around the edges.

Ill try that.

As for the how the material is setup, I did it that way after trial and error, to get it to look a specific way.
(Its much crisper around the edges and is more visible at a distance)

The return value of the Create Dynamic Mat Inst Node still returns none.

The only way I can get it to return anything is breaking the billboards sprite table.

By breaking the billboards sprite table, Ive even gotten as far as successfuly changing the default material to the new Material Dynamic Instance, but it is still red in game. :frowning:

Hi Erdrik ,there seems to be a bug with doing this to a Material Billboard atm. I’ll show this to the programmers, for now if you are just wanting to play around with changing the materials, I would just do it on a Static Mesh vs a Material Billboard. I had never actually tried doing that on a Material Billboard before, good find!

Ok, thanks! I suspected it might be a bug after others showed no problems.
Unfortunetly I was hoping to get this working for a camera facing selection recticle, which the billboard is perfect for.
Its ok tho, I have other things to work on, and can come back to it. :wink:

Again, thanks for the help everyone. :slight_smile:

You could also use a plane and have it face your camera with a Blueprint logic for now.

Hey thanks! i was completely stuck because there are different nodes with the same name, and now i found the correct ones!

, thanks for your insights. Any ideas when this issue is gonna be fixed? :slight_smile:

This would be great if you guys could fix this. While you’re at it you should fix the 90 degree rotated texture bug for Billboard sprites as well :).

So this and the 90 degree rotated texture bug for Billboard sprites are not in 4.5 :(.

I was having issues with MaterialBillboards not properly working with my material parameters. It was as if they were not Dynamic Material Instances. What I found was SetMeterial does not work on MaterialBillboardComponent. This is what I had to do to replace the Material with a MID in my construction script. The ActivateIcon is my MaterialBillboardComponent.

Was this ever actually fixed? I’m still having this problem now.

Material Billboards seem mega-broken to say the least. I’m going to have to create a custom actor component to replace it.

I got this to work by doing much of the same: