Download

Can i randomize texture sample image in Material?

Hi, it is possible what i try to show in this picture?
I want to randomize the material of a mesh, but i dont want to create many materials, if can randomize texture sample inside a material.

Through blueprints, you could make an array of the various textures. Then make a master material with a texture input parameter. The blueprint would then need to make it a material instance dynamic. From there, you could randomly pick from the array and that texture would be piped into the material.

Yes, thanks, but its not possible to do it inside a material?

That material will be very inefficient. It would sample from all textures and then just use one. It can be done by using per object random(or object position as seed).

use the construction script in blueprint for this task

If I recall correctly, this only works with instances meshes, but you could definitely use object position as a seed with some randomizing math to sort it out.

Again, this would be HIGHLY inefficient to perform within the single material. Just use my suggestion from earlier with MID+array.

Yeah thanks. I just hoped in material way. Then do with BP.

It would be nice if we could use texture arrays for this. One could probably code them in, but it would be a big project.