Adding new, overlapping dots to Material at runtime

I got a bit stuck on a material I am trying to create as a practice thing.

I want to make a material that, every second or so, spawns a new dot. This dot will be placed at a random location on the canvas, and has a random colour. Each new dot is additive, so the longer the session goes on, the more dots will be on the canvas. It would be great if the dots would also mix their colours when they overlap, but that was more of a stretch-goal. (I essentially want to make a painters canvas, that automatically throws more and more paint at itself, and make some beautiful modern art)

The random placement and colour of the dots was easy.

286320-qrandomdots.gif

But I have no clue how to handle the additive nature of what I’m trying to make. I essentially want the material to spawn a new layer every time, but I’m not sure if that is even possible, or how I would handle that efficiently. If someone could point me into the right direction, that would be great!

Here is the material thusfar:

Note: The position and colour are parameters which are updated from a blueprint. The material is made to be a dynamic material instance at begin play.

After some more research, I don’t think I can properly create something like this. Materials do not support looping structures, which is essentially what I need to continuously add new dots.

The closest I got to my goal, is by copy pasting the logic, and adding them up. In the blueprint I adjust a single dot each second. It works, but it makes the material fairly performance heavy, which is what I was trying to avoid.

286337-randomdots.gif

The colour mixing was extremely easy, in case someone wants to know. Just put the blend mode of the material to “additive”.

286338-screenshot-3532.png

I might attempt to deform the dots into more random blob shapes at a later date.