Me and a group are trying to make a terrain/continent generation tool intended for content creators to use as inspiration, like a more self-contained version of Rimworld's continent view at the start of worldgen. The problem is, that due to ThreeJS's relative obscurity and our inexperience with the language, we're having significant issues trying to find a direction as to how to make things work the way we want it to. The current plan is to divide up the work into several different sections - the land, the ocean surrounding the land, the props appearing on the land and finally, things in the sky and the camera. But I'll keep the scope small - my job is to work with the land in order to get it to generate reasonably shaped islands or continents.
Here's the repo in question, if you need to see it: https://github.com/chaoszeroomega/IslandGenerator
We've already sort of made a basis for the program, which currently creates a flat plain with jagged cliffs, due to issues stemming from being able to successfully link the Perlin noise algorithm javascript file to the function that was meant to implement it. While Perlin Noise can be used in order to make hills for the program, there's also the question of modifying it so that it's applied to a land-mass shape underneath, as it wouldn't make sense for the continent to just be square shaped. I'm not sure how to get ThreeJS to make 'random shapes' that curve like actual continents would, or in a reasonable sort of random distribution, nor do I have much awareness of different algorithms or even how to implement them. While I've been attempting to reverse engineer code from other repos for our own purposes, it's often rather obscure and difficult to understand how anything actually works. How should I go about approaching my section of the design problem? I suppose being able to 'generate random shapes' in the form of a continent, then somehow applying the Perlin Noise to the top of it in order to generate hills (and ideally, mountains and valleys too).
Aucun commentaire:
Enregistrer un commentaire