Populating with a multimesh instance at runtime?

Godot Version

4.6

Question

Im currently working on a simple terrain generator, and i was doing not too bad until it came to grass, basically what i want to do, is spread grass over terrain using multimeshinstances, and for that i need to "apply" the populate button after the terrain itself is generated, and i for the life of me couldnt find any guides on the matter at all, this is my last resort

Are you writing your own terrain system from scratch, or are you using an existing addon from the library and trying to add grass on top of it? I’m not sure what you mean by applying the populate button. I’ve made terrain with multimesh grass for my game, but I’m not sure how to help without more context.

Im making my own terrain system, its really basic, i just generate a bunch of box mesh instances 3d with colliders and randomize their size and position, spawning them in clusters so that they make “islands“, and since the mesh transforms are applied at runtime, i cant just populate the surface with multimesh instance 3d beforehand, at least as far as i know, and i was wondering if theres a way to do that at runtime so that it doesnt kill performance on large scale