Create dynamic cuts arround edges of texture


I want to cut out those parts of of my texture in the material graph. I could do this outside with just creating an alpha texture, but I have a lot of poster and want to dynamically change the cutouts.

Hey there @Okayja! I think a cheap way to pull this off would be to have a texture with 3 different cut alphas put in each channel (R, G) and assign them for each parallel. (Left and right on one layer, top and bottom on another layer) and then have a randomized parameter that changes the UV position so it’s kind of “scrolling” the bottom cuts per each new instance.

1 Like

Mh I’m pretty new to the material graph, could you maybe show me how it’s done?

I can work up a little mockup! You’ll still need to make proper cuts but I can help out with the material graph itself. I’ll return when I get it working!

1 Like

Alright! Sorry about the delay! It’s a wild week! So starting from the top, you need to make a material that you can change the UV offset of manually. This means either creating a dynamic material instance at runtime or just setting up a material instance. I went with the latter since the cuts and mesh shape are predetermined.

This setup leaves scalar parameters open to be adjusted at runtime. My cuts texture size ratio is 2 times as wide as it’s flyer, this is so that I could easily just put 0.5 in the U and move on, but you can play with the sizing. Then make this material an instance and apply it to your flier BP. After that, go to your BP’s construction script, and then change the parameters whenever this object is created:

Then voila! Every time you move it in the viewport it will reconstruct and change the tears.

UnrealEditor_2023-03-17_23-15-45

It’s recommended to make a better looking cut texture than my example, maybe bigger, and you’d also have to do it with all sides, but it’s the same way. Just need to add the alpha’s together. Let me know if you have any questions!

2 Likes