I have been experimenting with 2d noise converting it to terrain for the past month or so, and i am wanting to take a step forward. But said step is a hard step to take. And i am requesting help in getting to that step/a push along.
There’s quite a few threads on this, you might find something useful if you search.
The basic idea is something like this:
function getPointDensity(x, y, z)
return DENSITY_AMPLITUDE * math.noise(
x / DENSITY_PERIOD,
y / DENSITY_PERIOD,
z / DENSITY_PERIOD
) + DENSITY_BASELINE
end
for x = 1, MAP_SIZE do
for y = 1, MAP_SIZE do
for z = 1, MAP_SIZE do
local density = getPointDensity(x, y, z)
if density >= DENSITY_THRESHOLD then
placeBlockAt(x, y, z)
end
end
end
end