GuestCapone
(GuestCapone)
October 10, 2016, 8:55pm
#3643
With some help from @GregTame for explaining some things, I now have noise terrain! (using parts)
Code if anyone is interested
local RunService = game:GetService("RunService")
game.Workspace.Backpack:ClearAllChildren()
local NoiseSize = 20
local Seed = 0.6456
local Seed2 = 0.454567
local TileSize = 6
local X_Size = 200 -- In studs
local Y_Size = 200 -- In studs
local WaterLevel = 0
local ShoreLevel = 1
local MountainLevel = 4
local Snowcap = 12
local Step = 0
for X = 1, X_Size do -- for X = 1, X_Size/TileSize do
for Y = 1, Y_Size do -- for Y = 1, Y_Size/TileSize do
local Noise = math.noise( X/NoiseSize, Y/NoiseSize, Seed)
local Noise2 = math.noise(-X/NoiseSize * 1.05, -Y/NoiseSize * 1.05, Seed)
local Noise3 = math.noise( X/NoiseSize, Y/NoiseSize, Seed2)
local Noise4 = math.noise(-X/NoiseSize * NoiseSize, -Y/NoiseSize * NoiseSize, Seed2)
local Height = Noise -- (Noise * Noise2) + (Noise3 * 1.3) - (Noise4/4)
Height = Height + (Height * NoiseSize)
local Part = Instance.new('Part',workspace.Backpack)
Part.Anchored = true
if Height <= WaterLevel then
Height = WaterLevel
Part.Material = Enum.Material.SmoothPlastic
Part.BrickColor = BrickColor.new("Medium blue")
elseif Height > WaterLevel and Height <= ShoreLevel then
Part.Material = Enum.Material.Sand
Part.BrickColor = BrickColor.new("Brick yellow")
elseif Height >= MountainLevel and Height < Snowcap then
local BaseHeight = (Height - MountainLevel) * 3
--BaseHeight = BaseHeight^2
Height = MountainLevel + BaseHeight
Part.Material = Enum.Material.Slate
Part.BrickColor = BrickColor.new("Dark stone grey")
elseif Height >= Snowcap then
local BaseHeight = (Height - MountainLevel) * 3
--BaseHeight = BaseHeight^2
Height = MountainLevel + BaseHeight
Part.Material = Enum.Material.Sand
Part.BrickColor = BrickColor.new("White")
else
Part.Material = Enum.Material.Grass
Part.BrickColor = BrickColor.new("Grime")
end
Part.Size = Vector3.new(
TileSize,
TileSize * Height,
TileSize
)
Part.CFrame = CFrame.new(
-X_Size/2 + X * TileSize,
Part.Size.Y/2,
-Y_Size/2 + Y * TileSize
)
Step=Step+1
if Step>=30 then
Step = 0
RunService.Heartbeat:wait()
end
print("Generated: X["..X.."] | Y["..Y.."]")
end
wait()
end
print("Done!")
EDIT:
Oh and here’s a player to give you an idea of the size of the map:
kinda basic but its a good start so far!
8 Likes
ScriptOn
(Genya)
October 10, 2016, 9:14pm
#3644
I think it was needed. I got a lot of DMs and questions asking me about how I improved over the previous version and how I set it up.
EchoReaper
(EchoReaper)
October 10, 2016, 9:25pm
#3645
You can post all of those images while still remaining courteous. Put them in a spoiler if they span the full height of a normal-sized monitor please.
ProfBeetle
(ProfBeetle)
October 10, 2016, 9:28pm
#3646
Neat!
If you’re going to be moving over to smooth terrain my VoxelBuffer module should make things easier for you. I built it for my own large terrain generating experiments.
1 Like
GregTame
(GregTame)
October 10, 2016, 9:46pm
#3647
Why not just use terrrain:fillblock with the existing parts?
It’s what I used In the first place, before cutting parts out entirely
ProfBeetle
(ProfBeetle)
October 10, 2016, 9:57pm
#3649
In my experience WriteVoxels was much faster for setting large and varied areas of terrain, but there’s nothing wrong with fillblock if it fits in with what you’re already doing. As I said I wrote the VoxelBuffer to suit my particular need, your millage may vary
1 Like
low key bastion tank traveling in high speed ey
1 Like
GregTame
(GregTame)
October 10, 2016, 10:23pm
#3651
ah, well…
i have no clue how to use writevoxels, so… there’s that…
1 Like
ProfBeetle
(ProfBeetle)
October 10, 2016, 10:24pm
#3652
It’s a pain, that’s why I wrote the VoxelBufferf
Tomarty
(Tomarty)
October 10, 2016, 11:58pm
#3653
Sorta like this?
Edit: just reread your post. My default animation format needs a feature to make it easy to shift joints out of sync.
3 Likes
Tomarty
(Tomarty)
October 11, 2016, 12:02am
#3654
It would be useful if we could check if a large region contained something other than air. It’s pretty expensive checking every voxel for something in an area without any terrain.
No need to fear, PLUS members shall be awarded eventually with the amazing offers within the PLUS building itself! Here’s a sneak peek of the entrance.
4 Likes
GregTame
(GregTame)
October 11, 2016, 1:16am
#3656
maybe something more like this?
where you don’t have two feet touching the ground at the same time
2 Likes
kni0002
(kni0002)
October 11, 2016, 6:00am
#3661
This is a little bit irrelevant but this topic has been around for 1 year and its still has people actively posting on it lol.
2 Likes
SolidBlocks
(SolidBlocks)
October 11, 2016, 6:23am
#3662
I’m working on the biggest map ever made by me.
It’s for Empire of Omaegar
(You can check it out here: [EoO] Human Province 'Amberhold' - Roblox )
3 Likes
GregTame
(GregTame)
October 11, 2016, 7:18am
#3663
the background goes so well with the terrain you almost had me fooled.
seriously thought, nice job. is it handmade, or generated?
2 Likes
SolidBlocks
(SolidBlocks)
October 11, 2016, 7:20am
#3664
That moment when I have to smooth the biggest map I’ve ever made by hand because I lack the scripting skills.
1 Like
SolidBlocks
(SolidBlocks)
October 11, 2016, 7:21am
#3665
Thanks!!
I used heightmaps to generate the terrain. It works perfectly. There’s a possibility to make terrain in blender, export it as heightmap and use it in ROBLOX by use of a specific program I found on these dev forums I can get you the link if you’d like.
GregTame
(GregTame)
October 11, 2016, 7:22am
#3666
that’d be lovely, thanks!
1 Like