I’ve basically implemented https://transvoxel.org/ using FDynamicMesh3 so when I’m playing and digging, the mesh gets rebuilt, all editable / changes in runtime. Vertices have their material (e.g. ‘grass/stone/etc’) stored as a vertex attribute. Similar approach to Smooth terrains - Voxel Tools documentation
Choosing textures based on vertex attributes seems trivial.
Question: what is the easiest way to use Unreal Engine’s tools related for grass not to reinvent the wheel? Any links are welcome, just need general directions, I’ll dig further myself.
Absolutely every tutorial I found starts drawing with a paintbrush in the editor. But for my use-case, the mesh gets mutated dynamically and I just need grass wherever the vertex attribute for grass is non-zero.
Or even simpler: see “green” texture - populate grass on top. A triangle disappears from FDynamicMesh3 after getting digged - grass should disappear
Best way is for you to make a custom blueprint that paints foliage with the foliage system based on whatever setting you provide it with.
Landscape grass is locked on landscape, generates grass maps, and essentially only really worsk within that scope even when you try to access the c++ files and make it do other things.
Its just not worth your time since making a BP to place procedural instances takes eay less effort overall and performs just as well if not even better…
I suggest you push a texture into the BP same as the texture used in the material, and add the grass based on that texture along with any other parameter you want to keep track of.
You have to not use loops, or limit the total loop count. That is perhaps the hardest part of it all…
The ProceduralFoliage tools can likely help you a bit as well.