Best way to add a bunch of models to a random terrain

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Thummper

Hi, I was wondering if somebody could provide some insight into adding a bunch of models to terrain that is randomly generated in chunks, I’m not sure what the best way to proceed is.

Firstly I need to pick some points randomly on my mesh right?

From what I can tell I can either RayCast random points over my whole generated terrain and get the collision points, or I could pick some random points and store them when I am making the vertices for my terrain meshes.

Once I have some random points to place things like trees I think I can do one of 2 things:

  • Instance a bunch of tree models and assign them to a random point.

  • Make a multimesh and position the instances in the mesh to the random points.

Presumably the multimesh is the better solution performance wise?
But with a multimesh I can only assign one model it, so would I have to make a new multimesh for each tree type I want to use?

Also would it be better to make one large multimesh that covers the entire terrain, or make multimeshes when I am generating the actual terrain chunks and then add them as children to the chunks or something.

Any help would be appreciated.