I was playing around with some minecraft like terrain reading up on stuff and make this script below
local Seed = 10
local ROWS = 64
local COLS = 64
local RANGE = 40
local mult = 4
local DivideBy = 16
function Part(PosX, PosY, alpha)
local Part = Instance.new("Part")
Part.BrickColor = BrickColor.new("Bright green")
Part.Parent = workspace
Part.Size = Vector3.new(mult, mult, mult)
Part.Anchored = true
local DirtPart = Instance.new("Part")
DirtPart.BrickColor = BrickColor.new("Reddish brown")
DirtPart.Parent = workspace
DirtPart.Size = Vector3.new(mult, mult, mult)
DirtPart.Anchored = true
local StonePart1 = Instance.new("Part")
StonePart1.BrickColor = BrickColor.new("Smoky grey")
StonePart1.Parent = workspace
StonePart1.Size = Vector3.new(mult, mult, mult)
StonePart1.Anchored = true
local StonePart2 = Instance.new("Part")
StonePart2.BrickColor = BrickColor.new("Smoky grey")
StonePart2.Parent = workspace
StonePart2.Size = Vector3.new(mult, mult, mult)
StonePart2.Anchored = true
RANGE = math.random(10, 11)
local noise1 = math.floor(((alpha*RANGE) + 40 / mult) + 0.5) * mult
Part.Position = Vector3.new(PosX*mult,noise1, PosY*mult)
DirtPart.Position = Part.Position + Vector3.new(0, -mult, 0)
StonePart1.Position = DirtPart.Position + Vector3.new(0, -mult, 0)
StonePart2.Position = StonePart1.Position + Vector3.new(0, -mult, 0)
--(alpha*RANGE) + 40
end
for y=1, ROWS, 1 do
for x=1, COLS, 1 do
local noise = math.noise(x/DivideBy, y/DivideBy, 0)
Part(x, y, noise)
end
end
I was wondering how do i add more variation. Currently the terrain looks super bland and repetitive and i want to have smooth plains and tall mountains. How would i add like a “bias” to it to make it so higher values are more exaggerated but also make the values rarer?
I know this isn’t an answer to your question, but setting the parent after you change the size and anchored properties will perform better then what you got
also you got some repeated code with all those property changes
(final math.noise value for seed1) + (final math.noise value for seed2)/2
Not making two separate layers of parts
The + 1 in the seed2 is to make it different from the previous one, not to make it have a change in min or max values, thats what the /2 is for
I believe Minecraft’s biomes are a different noise entirely (so there’s a seed for terrain generation and a different seed for biome generation). So you have the terrain generation.
You’d have to create a separate seed to have biome generation. For example, if the number is bigger than 0.1, make it a plains biome, if it’s smaller than -0.4, make it an extreme hills biome.
Each biome would have its own set of rules to follow. For example, the amplitude of the extreme hills biome is higher while the amplitude for the plains biome is lower.
NOTE: The Perlin noise for the biome generator would need a smaller noise increment. So instead of using 100% of the position of the block, use something like 0.5% of the position of the block (so if the position of the block is Vector3.new(1, 1, 1), instead of passing the x coordinate as 1, you’d pass the x coordinate as 0.05[1 * 0.05 = 0.05])
I think the most interesting part of this problem is blending two different noises together smoothly
It almost is like perlin noise in and of itself which smoothly blends gradients, but now you’re smoothly blending a smooth blend of gradients in 3D space
I personally cant think of a good solution to this problem but I could try thinking some more
Perhaps the resident math whiz will make a surprise visit
i combined 2 maps then had a third independent perlin that would dictate how strong to make features of terrain. I am gonna make it a bit more complicated but i got something basic working…