How would I go about doing that? I’m not talking about like in Minecraft. That’s easy enough. I want to generate one of Unity’s terrains with random hills an such. I have no idea where to even start. Can someone at least point me in the right direction?
perlin noise or better simplex noise are also suited well. there is an example project with procedural stuff on unity site. should give you a start.
some other things to look up:
fractal noise
ridged noise
heihgtmaps
coherent noise
procedural sphere creation from icosaeder (for whole planets only)
so in general you use your noise function to calculate a heightmap, apply this to the unity terrain, then you need to texture it to your liking (for example steep regions get rocky texture flat ones sandy) and you should be done. things get more complicated when you need several terrains to match together or when you want to create whole planets.
there is also an example with code by quickfingers called infinity terrain in the forum.
and for whole planets you should use 3d noise and the radius of the sphere you query the values from determines the inverse wavelength.so you have no seams and dont need to make it match manually.
however for whole planets you cant utilize unity terrain as it is flat and does not allow more than one value per coordinate. so you probably need to make a custom mesh for that.
but this is a very wide and “complicated” field. so when you have not much experience with unity or programming i suggest to do some tutorials first. and in any way you should read alot about the techniques and decide what you need/want before start.
Use the forum’s search feature and search for “Terrain Generation”, “Procedural Terrain”, “Fractal Terrain”.
It’s been discussed quite a lot and there are numerous tools that can help you generate such terrain within Unity. Each has their merits and drawbacks so it’s probably best to check them all out!
In addition to that, if you want generated terrains but aren’t bothered if these are generated within Unity itself, you can use World Machine, GeoControl, TerraGen, L3DT and other external tools and then import the heightmaps, splatmaps, etc. in using Unity extensions/tools/etc - Toms Terrain Tools seems to be quite popular as a flexible solution to the importing process.
Other issues worth considering besides random heightmap generation is whether you want realism - if so, you’ll want some ability to apply erosion and other physics-based simulations on the initially generated heightmaps and capture the process in a map to handle texturing for things like sediment flow and the effects of nature on terrain. (For erosion within Unity, I think 6x0’s Terrain Toolkit is the most comprehensive I’ve seen).