top of page

Dynamic Material Instance Actors

  • jacoblince8
  • Jun 28, 2024
  • 2 min read

Hey ya'll. I just got back from a great two week vacation recently with my family and I have been hard at work with this blog since I now have some more time to work on it at Gamegen. Basically now they are splitting up the portfolio review between two sub-group that will present every other week instead of weekly to give everyone enough time to present their blogs. This blog will be something interesting. Before I left I was trying to do some research about how to randomize parameters in a material to because one of my teachers asked me to do something unique for the 3D Art Jam I'm helping with: randomizing the flashing for that custom material I'm working on. I came across a mention of 'Dynamic material instances' in a reddit post and made my way to a few different videos on the subject:


The first video is older and was focused on UE4 so I have some trouble with implementing it into UE5. The other two videos had some great examples and I was able to put something together as a demonstration.


First, I made a demo actor with a basic cube it the viewport and got a reference to it in the construction script. Then, I drew out a 'create dynamic material instance' node and promoted the result to a variable:

Then I made a function in graph that sets the parameters within a random range in the new dynamic instance based my custom material that I have mentioned in past blogs:


Go to 5:35 to see the material


Then I get another set scalar value node to activate the flash effect and then a 'set timer by function name' node to sett a looping call for the function I made every .07 seconds:

This is what it looks like at runtime:


That's how it works, I'm working on trying to implement this into the 3D Art Jam that I'm helping out with. I found a way to turn the floor piece meshes that this is going to apply to into static meshes and I'm planning on using a copy of it's original material with my new code to give the emissive part a glitchy effect:

That's it for this week. I will leave you with a picture of a cool Toyoda that I found:


Bye folks!

 
 
 

Recent Posts

See All

Comments


bottom of page