Large-Scale Roblox Terrain: The ultimate guide

This is my result, thanks for the tutorial!

1 Like

Making a biggest Terrain makes you lag a lot. Because robloxā€™s terrain is a bit of heavy.

Great tutorial, although whenever I use mesher and a color node in the same graph, I always get a error with mesher(My plan was to just import into roblox, then not run the terrain conversion script). How can I fix the mesher error?

Why donā€™t use Triangulate modifier (in blender) instead running that somewhy laggy code?

You might need to render some more faces, but you donā€™t need to run a laggy command, you can directly convert all the wedges into terrain.

It would be nice if you could also make a tutorial that applies to Mac users. As far as I can tell, Gaea isnā€™t available on Mac devices. My tip for large scale landscapes? start by using the square tool with a very large size, to get the rough shape of your map down. Then, go through with smaller size tools and refine the map to a point that you like.

1 Like

Iā€™m pretty sure most of the lag in Studio comes from memory leaks caused by the massive amounts of parts and wedges one tends to generate when importing the terrain mesh.

If you still get lag after converting the terrain, Iā€™d recommend restarting your Studio. Usually works for me anyway.

Not even a tryphobia warning? But the terrain looks great thanks for the tutorial! :grinning_face_with_smiling_eyes:

1 Like

Why is it that when I run the code, I get a ā€œFailed to save DataModelā€ issue/warning?

23:31:51.611  bad allocation  -  Edit
  23:31:51.612  Stack Begin  -  Studio
  23:31:51.612  Script 'local rate = .0001
local RunService = game:GetService("RunService")
local whitelist = workspace.Mesh:GetChildren()
local thickness = 25
local sea_level = .125 --From 0 to 1, where 0 is the lowest elevation of the map and 1 is the highest (gets denormalize', Line 94 - function ConvertTerrain  -  Studio
  23:31:51.612  Script 'local rate = .0001
local RunService = game:GetService("RunService")
local whitelist = workspace.Mesh:GetChildren()
local thickness = 25
local sea_level = .125 --From 0 to 1, where 0 is the lowest elevation of the map and 1 is the highest (gets denormalize', Line 103  -  Studio
  23:31:51.612  Stack End  -  Studio

Yh, You canā€™t really do huge terrain for you to have to travel for really long to get to the end for example like in grampy. You have to import huge terrain and then remove like 4/5 of the mesh parts. run the script. import the 4/5 and take out a 3/5 of that and run the script. and keep on doing it untill the whole map generates and save between steps. It takes pretty long but I think it worth the effort to get near endless map, this is what I done to get really big mountain

Hey there, everyone. I know itā€™s a late MSG here in the ultimate guide that is terraining, but are there any end-products from any of you devs that actually have used the programs? Iā€™m a hard-to-convince guy, and I would really like to see the fruits of the new terrain method.

Iā€™d be curious about this too!

I donā€™t think Iā€™ve ever made an actual terrain and this became the first thing I saw on how to make terrain, you are a godsend! : D

Anyways I tried to do a test run by importing what I thought was a small map with scale 512 but I didnā€™t expect it to be so detailedā€¦ >.>

Mesher polygon count: 512
Mesher quad/triangle : quad (forgot the property name)
.obj Loader scale: 512

How do I know how large the map will be in Roblox Studio when Iā€™m making the terrain in Quadspinner Gaea?

(oh and thatā€™s how the final terrain looked like, why does it have holes? I didnā€™t do any optimization in blender)

Reason why I want a small map:

I think I imported it wrong :smiling_face_with_tear:
image

1 Like

image

9 Likes

HELP!

Iā€™m trying to make a map in Gaea and Iā€™m wondering how I make it larger?

Late response, but you need to export as tris and not quads on the mesher

This is absolutely wonderful! Are there any ongoing updates or changes?

A friend of mine is working on a plugin that will eliminate the need to import the mesh as wedges and convert to terrain by importing the mesh directly as terrain instead!

No ETA on when this will be released but when it is I will update this tutorial.

4 Likes

You guys can listen for ā€œChildAddedā€ event on the ā€œMeshā€ model and convert the inserted wedges immediately after it renders like this code:

local RunService = game:GetService("RunService")
local Terrain = workspace.Terrain
local waitrate = .00001
local TriangleBuffer = 15		--| Recommended to not be less than 15. Large scaled terrain would need a higher value,
local thickness = 25			--| Thickness of the terrain layer.
local RockAngle = 35			--| At which triangle angle would the rock material apply.
_G.AutoFillRunning = true		--| for the auto fill connection...

--| Framerate-dependent function that waits at the theoretically lowest possible step, Heartbeat:Wait(), until some time dt has passed.
local function TimerWait(duration)
	local start = tick()
	repeat RunService.Heartbeat:Wait() until tick() - start >= duration
	return true
end

local function ConvertTarget(part)
	task.wait(0.005)
	local Material
	local cf, pos, size = part.CFrame, part.CFrame.p, Vector3.new(thickness, part.Size.Y + TriangleBuffer, part.Size.Z + TriangleBuffer)

	if math.abs(90 - math.abs(part.Orientation.Z)) > RockAngle or math.abs(0 - math.abs(part.Orientation.X)) > RockAngle then
		Material = Enum.Material.Rock
	else
		Material = Enum.Material.Grass
	end

	Terrain:FillWedge(cf, size, Material)
	part:Destroy()

	if tick() % 5 > 4.5 then
		TimerWait(waitrate)
	end
end

local AutoFillConnection = workspace:WaitForChild("Mesh", 10*60).ChildAdded:Connect(ConvertTarget)

while task.wait(1) do
	if _G.AutoFillRunning == false then
		AutoFillConnection:Disconnect()
		AutoFillConnection = nil
		_G.AutoFillRunning = nil
		warn("Auto fill has been stopped.")
		break
	end
end

Just saying, there could be some remaining first row wedges which you could easily convert them with the normal method in the topic.
Also, you can stop listening to the event any time by just setting the global variable ā€œAutoFillRunningā€ to false. All of these code in the studio command bar for sure.
This method should reduce most of the lag caused by the huge amounts of wedgesā€¦

1 Like