can I create an array of material Sphere Mask locations?

I would like to create an array of sphere masks inside of a material with an array of locations any ideas on how I can accomplish this?

I don’t think that is possible.

I think instead you will want to create a material parameter collection and do all the work with the arrays in BP, which will set the param collections and update the materials as needed.

Thanks for your quick response Zeustiak! The Problem with using Material Parameter Collection is I have to call each parameter individually in the material and I wanted to use this for procedural foliage.

There is no array or for-loop support in the material editor unfortunately (there has been some requests for this but Epic doesn’t think this is important apparently(?) if you don’t mind, you could also make a request in the feedback section… the more requests the better)
So yeah, the only way would be to make a bunch of material parameters and set them one by one.

I’ve been trying to so the same thing with my procedural grass shader. I have all the locations as an Array and called in to the shader via a collection… but I think we need to do some extra logic to make the sphere mask add up itself like an array

It’s quite doable, have a look here:…on-offset-data

In the end I manged to pull it off using **xnihil0zer0’s **method. It needed lots awkward tweaks, though. I also tried the solution RyanB suggested and it worked OKish, too.

Having said that, I’d like to see a proper support for loop support in the materials.

edit: pfff, just noticed this is a 3 year old thread! I blame you @**Abeysaurus ;p **What a necro bump.

hahah! I didn’t realise the date of the thread… I only just got into location based shaders. I did look at that thread earlier, but storing locations in a texture won’t work for characters that move around would it?

hi, the link you provided does not exist anymore. Can you please provide instructions on how to execute a sphere mask on an array of locations? Thanks in advance.

The OG thread: