Hey everyone, firstly if this is in the wrong board I apologise, I wasn’t sure which to put it in as I’m currently not sure how to go about solving my issue. Anyway, onward!

Basically I am looking for some pointers or suggestions on what way to go about procedurally generating splatters of paint for a game prototype I’m working on. Any help mucho appreciated!

Criteria:

-The splatter shapes should be relative round (not too uniform obviously, but not crazy shapes).

- I need to be able to work out the approximate area of the splatter. Does not need to be exact, but close. So if I used a grid system initially then applied a shader or used bezier curves or something to smooth it out, just knowing the initial grid area of the splat before curving would be fine.
- I need to be able to work out what portion of the screen the splatter covers.
- If a new splatter of a different color (say blue) is generated and overlaps the red splatter I need to be able to work out what portion of the screen area is now blue and what is still left as red.

I know this is a very specific problem, but I have no idea how to go about it and I thought it might be a fun one for a few veterans.

My current thought process is to break the screen space up into some kind of grid at the lowest reasonable resolution for the splatter to be generated at (before smoothing/curving). Then generate a “low res” splatter shape using grid squares. I use the number of grid squares that the splatter takes up as the area. Then somehow send that grid shape as a height map to a color splat map after somehow smoothing/rounding the edges and corners of it. The only thing is I have no idea how to do that.

As far as generating the initial splatter. I managed to get an algorithm working that produced a decent splatter out of squares. At the moment I am just spawning a heap of sprite renderers as it was just to see if it looked alright. The issue with it is that while I know the size and therefore area of each inidividual square that makes it up, many of them overlap so I don’t know how to work out the final area.

This is one such splatter. Its just a whole heap of different size sprite renderers on top of each other at the moment as you can see.

As a really quick idea of how I would want the final curving to look. the following image is the same square splatter array with a quick curved outline. I don’t know how to achieve this, but I guess my options would depend on what method I end up using to generate the initial grid splatter shape.

Given the complexity of this problem, I’m sure there are many things I have left unclear, and I’m super happy to clarify how I would need it to operate if anyone has any questions. Thanks!