My perlin noise terrain looks too bad

for x = 1, 100 do
    for z = 1, 100 do
        local height = (math.noise(x / 20, z / 20) + 2) * 50
        local p = Instance.new("Part", workspace)
        p.Locked, p.Anchored = true, true
        p.Size = Vector3.new(4, height, 4)
        p.CFrame = CFrame.new(4 * x, height / 2, 4 * z)
        wait()
    end
end

This is not efficient at all and take so long to load in. Is there anyway to make it load in chunks similar to minecraft and only load in top blocks and load in other filler blocks if you go into a cave.

image
Very ugly i don’t want smooth peaks like that i want peaks like minecraft 4x4 blocks with epic mountains island and so on…

I know i need to make a color map but how would i do it?

Colour maps aren’t done anything near like this method. To start, colour maps and height maps are terrain features (and not part features). You pretty much doomed yourself if you want non-smooth as math.noise only goes between your two values and so generating a mountain would be like a major outlier.

You’ll have to come up with a seed generator yourself if you want parts, or you’d have to use a better mathematical equation.

So what is a colour map:
A colour map is usually accompanied by a height map. It specifies the height and the material of the terrain at specific points.

1 Like

What do you mean buy this make it smarter than it is currently and make it generate chunk by chunk?

Well, math.noise has its limitations of fluctuating between those two values - which through visual representation comes out as something like you’ve shown there.

You can now create additional behaviors with more math equations. I cannot provide you any off the top of my head but you’ll require ranges for these equations (set values where they operate). This will however, be quite a long process.

1 Like

Alright thank you.* 30 char limit*

make 2 different noise values both with different amplitudes then multiply them together. it will give you hilly but also flat regions.

1 Like
local amplitude = 15
local folder = Instance.new("Folder")
folder.Parent = game.Workspace
folder.Name = "TerrainFolder"

for x = 1, 200 do
    for z = 1, 200 do
		local height = (math.noise(x / 20, z / 20) + 2) * 50 * amplitude
		local height2= (math.noise(x / 15, z / 15) + 2.5) * 23 * amplitude
		local fullHeight = height2 / height * 60
		local p = Instance.new("Part")
        p.Locked, p.Anchored = true, true
        p.Size = Vector3.new(4, fullHeight, 4)
		p.CFrame = CFrame.new(4 * x, fullHeight / 2, 4 * z)
		p.Anchored = true
		p.Parent = folder
      	game:GetService("RunService").Stepped:wait()
    end
end

changed your code a bit it has flat and hilly areas now

Thanks!
30 characters limit …

No problem hopes it helps you, i also recommend adding a lowest part limit and any part under that will be removed (mainly to optimize) cause right now it could be very laggy for some people

Heres something it just made: https://gyazo.com/db4e0b38705ed1deb5782f5561c0cf2d

Edit: Change amplitude to get a more hilly result

Yeah it worked for me also thanks alot!

1 Like

No problem, hope it doesnt lag!