Help with slidebar - change material alpha channel with slidebar


i am asking for help with this issue. I am trying to do material switcher using slide bar. I have model (cube) with one material - material has two texture inside - used lerp and alpha channel. Now i want to set one texture as base and second will apear by slide bar - how much i turn with slidebar to right the opacity (alpha channel) will showing - if i set slide bar to middle position, i want see both of texture. Can someone help me please?

Thank you so much for every help


Create the material and assign it to the mesh. Not sure if I understood fully what’s needed (from the opacity) so here’s just the overall setup for this:

And then in the actor with the static mesh:

Moving the slider would blend the texture samples.

Thank you so much, u saved me, sorry for my description of problem :smiley: days of searching, u helped me very much, this will be what i need, only problem has that i cant find name for -SET DMI, what is the name for that parametr? Can u help me please with last question please, If i want to use it in VR (same like in normal map) Put the slider on the wall and control materials from slider. Thank you so much again

It’s a variable you must create yourself - it will hold a refence to the Dynamic Material Instance (I called it DMI here). The easiest way to do it - right click the pin and promote:


But you’ll also find it referred to as MID - Material Instance Dynamic (same thing); …because naming convention are somewhat inconsistent here and there. @EPIC :wink:

Oh i found it thank you so much, really appreciatereally your help, so the second thing, that i want to use stanalone slider on wall in game a control thaty due slider, can you help me please with that also? i am just a begginer and this help me a lot.

Thank you for your time.

You may need to briefly describe how it should work and how we’re controlling it? With a mouse? What’s the relation of the slider & actor. Each actor has its own slider? What’s the overall scenario? Perhaps you could tell, roughly, what the end goal is.

i am using htc vive so i already create widget slider and want use it in game so with sliding, other box changing two layer material. I cant connect it together.

So will you have more than 1 box? Or you want to approach *any *valid object and then use the slider to alter its material?

So who creates that slider? The pawn?

Slider is not inside of pawn, its separetly in content folder, standalone, then i created blueprint for this widget that i can use it in game. Slider is moving i can control it with hands its ok, i just need to connect this slider with your BP. Target is always only one static mesh, not asset. material is applyed only on left box. right box is just a background for slider.


Is there a reason why you have the slider as a component in *another *blueprint. Would it make sense to put it in the actor with the mesh:

And if you need it as 2 separate actors, in the block:

And in the Level Blueprint:

Thank you for your help, i will try to put it together. you are the best, thank you, i will let you know if it is working :slight_smile: thank you for your time, your really help me.

Yeeees, its working, thank you so so much man, really. I cant make it without your help.

Its working separetly, but if i tried today put it together to one BP as you recommend, its not working. I recognize, that i need it actully in one BP :confused: my BP in attach can you check it?
Thank you

But there’s nothing to check, you’ve shown no script :expressionless:

Oh sorry m bad, yesterday i was finding solution, why that is not work and i am helpless. Thank you for help

The parameter name says None. It has to match what’s in the material.

Oh, i miss that, so simple mistake :confused: thank you man, u saved me lot of hours. Thanks again.