voxel / voxel-land

a terrain generator with grass, dirt, stone, and trees (addon for voxel-engine)
6 stars 2 forks source link

Caves #3

Open deathcap opened 10 years ago

deathcap commented 10 years ago

Cave generation

references: http://gamedev.stackexchange.com/questions/53400/cave-generation-with-perlin-worms http://gamedev.stackexchange.com/questions/12603/how-is-a-3d-perlin-noise-function-used-to-generate-terrain noise3D instead of 2D height map http://accidentalnoise.sourceforge.net/minecraftworlds.html

deathcap commented 10 years ago

https://github.com/deathcap/noisecomp

deathcap commented 10 years ago

http://www.redblobgames.com/articles/noise/introduction.html

deathcap commented 10 years ago

https://github.com/hughsk/cave-automata-2d

greenlion commented 10 years ago

It might be interesting to take cave-automata-2d and define a grid, say with 16 points, and assign heights at the points. You can then interpolate a spline between the points to create the vertical axis for the cave using 2d automata for the x,z axis. Essentially just combine a heightmap with the automata.

This might be helpful: https://npmjs.org/package/cubic-hermite

deathcap commented 10 years ago

Some good discussion of terrain generation at https://news.ycombinator.com/item?id=7734925 http://www.playfuljs.com/realistic-terrain-in-130-lines/ (but this example is using midpoint displacement, 2d, not 3d simplex which would give rise to caves). https://www.npmjs.org/package/cave-automata-2d could also be worth looking into.