+2 votes

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.

in Engine by (50 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.