How to scroll through materials with a slider

I’m trying to make the material instance change with a slider
What i made here is hover over thetext to change it but i would like to use a slider instead

Hey there @latraug11! Welcome back to the community! I’m no material expert, but I’ve recently used a multi-lerp to do something similar. If you want a smoother transition, you could use linear interpolation between them, and just pass the slider’s value to a texture multi-lerp’s alpha.

image

Though since the slider increments aren’t uniform you may need to make singular lerps through them instead of the multilerp.

i will give it a try, thanks

I tried the multi lerp but it’s not what i’m looking for

I need to ad about 90 textures and scroll through them with the slider

I was thinking about something inside the blueprint:
Get the value from the slider that has a range (1-90) and use it’s value to set a different material or even better select a different instance of the blueprint that has the texture replaced

If you don’t need the fancy blending, it’s possible blueprint side, but you may not want to plug in that many different materials for performance reasons, it’d be best to have one material instance, with a parameter you change to change the texture on the fly. You could house the logic in the BP or in the material.

If you house the logic to which texture you’re looking for in the BP, you can then just have a texture parameter and make a dynamic material instance:

image

or if you handle it in the material you could pass the value to a scalar param into a switch node like so:

this could work, can i control that scalar parameter at runtime ?

Yep! You can use a dynamic material instance to adjust that at runtime: