Advice to Generate Mask Textures dynamically

Hi , i am working on a generative project where i want to make generative ponds .

I have been able to make a mesh-grid , and multiply that by a Perlin noise value to make the classic generative terrain , and also multiply the Perlin value by a texture mask to control the shape of the pond .

Now i want to create my masks dynamically inside unity at run time

I started with the idea to make a generative system of meshes shaped like lignes and circles , that i would screen grab with renderTextures and use as masks

-make a line-circles meshes system
-grab the vertices and make one mesh
-add vertexes (for definition)
-add 1d perlin/noise perimeter of the shape (create a coast effect)
-make a gradient toward the center of the shape
-screen grab
-use the texture as mask

I need advice to make the system more simple , like directly drawing into texture , i know there is not tools like draw a circle , or a line , so it will not be as easy as let s say using processing , i have found this :

is there easier ways ?

how would you do it ?
the mask need to have a small gradient from black to white on its border (fading)

ps : i am not a great programmer , more a 3d guy so ExplainItLikeI’m5 please

thanks guys

Well, you might consider using PixelSurface. It provides methods to draw lines, circles, etc. into a texture. (The PixelSurface is actually a little more sophisticated than that — but if you configure it so that it is only 1 tile, then that tile is backed by a simple Texture2D which you could then grab and use for your own purposes.)

Thank you JoeStrout for your suggestion, the asset store was not really what i had in mind when asking for advice , i wanted to know what was the common way people would think about solving this problem by themselves .
But thanks.

Well anything an asset in the Asset Store can do, you can do yourself if you’re a good enough coder. In this case it’s just a matter of getting the texture pixels (see GetPixels), and then implement various drawing algorithms like this and this.

However, the common way people (at least, most professional developers) would think about solving problems like this would certainly be to check the Asset Store first. When faced with a choice of spending 20 bucks for a solid, well-tested off-the-shelf solution, versus spending weeks developing code that is less well tested (and quite possibly less robust), it’s really a no brainer. I have dozens of assets I rely on in many of my projects. Could I have written the same functionality myself? Sure. But why should I, if somebody else has already done a good job?

On the other hand, I know there are people who prefer to do it themselves so they understand it deeply, or who have plenty of time but no money, etc. In that case, absolutely, write it yourself — the above links should get you started.

yes indeed i think you understood my case too , i am an aspiring gamedev with not money , if i could spend infinite amount of money in assets , i would not even do it , because i am more in a learning mood than publishing phase , and most of my projets ends up in my pile of project folder .

so yes i was more asking how people would do it .

also i changed at least 5 times how i was going about this project , and i use only perlin now.

but thank you for your answer .
Cheers