Material editor arrays and for loop

I have ran into a recent hurdle while trying to create a dynamic tessellated snow material that can be modified on the fly. In this specific case I want to create a sphere mask under each procedural tree I place to lower the snow tessellation under trees. However because I can’t use arrays or for loops in the material editor it makes this impossible. Currently I have to create a unique call for every sphere mask.

If there is a solution I don’t know about to accomplish this I apologize but otherwise I think the material editor needs array/for loop functions if it’s possible.

example of material below

1 Like

Up.

I have the same problem… I have an array in my BP, which has vectors, that must be converted to masks in my material. But no way to make, because mat editor has no ability to make loops and read arrays.

But I believe it’s can be done via custom HLSL node.

Well, I use “texture arrays” in some of my materials.
They are not called “arrays” in the material context, but “FlipBook”. :rolleyes:

I just use a scalar value as index (as materials dont know integer parameters), do the math and plug that into the animation phase.

c386193de8562be76d56ade4a4c41571675731b5.jpeg

I use that for all my UMG menus to keep all button captions in a single texture…

Well, that’s not exactly what we want. You have static texture, but I need to apply dynamic information inside material. Moreover, there is need to call some functions many times (array length times).