Terrain Painting VIA Script?

I’ve been theorizing a way to paint terrain with a tool like i used to be able to with unity. But with how Flax handles terrain data it doesn’t seem as straight forward? Maybe? Or i’m missing something, i don’t know. Either way i need some help. There’s a doc for generating terrain, but i can’t seem to find one for texturing.

I’m assuming the way to go is by using TerrainTools with get/set splatmap data. But… I’m not understanding the Color32 Format for the splatmap.

In unity, the layer data was a multidimensional array of floats, each dimension represented its respective layer, or something like that, it’s been a while. So… How does flax work with the Color32? Is the Color32 a the overhead for the image format while it reads as something else?

Never mind maybe, as it seems, after doing more research, and the help of Brave’s AI. It seems if found my answer, the splat map is split into two “Mapping” images, the first containing layer 0-3, the second containing 4-7. Each color in the splat map representing the layer (R=0,4 G=1,5 B=2,6 A=3,7).

Modifying the layers is as simple as modifying the colors intensity just like the layer weight in unity.