Infinite Terrain Plugin

I’ve been trying to clamp terrain so i can make plains where theres no mountains or high hills but i cant achieve it, how could i make this?

Try something like this

12345.678, 200, 0.004, -10, 10
23456.789, 150, 0.006, -10, 10
34567.891, 100, 0.008, -10, 10
45678.912, 4, 0.2, -10, 10

Reduce the 200, 150 and 100 if the hills are to steep

2 Likes

Hey I followed your Grass with mountains tutorial and for some reason what ever the highest material is creates a flat piece of terrain. Is this a setting I messed up?

most likely you have set a value incorrectly

1 Like

Heya! It’s me back with another question again ¯_(ツ)_/¯
Would you mind giving me the seeds and noise for the Models Update trailer, as well as the models you used for me to use as a reference for my upcoming project?
Thanks,
Henry

1 Like

You can get the settings if you edit this place Infinite Terrain - Roblox

And you can get the trees from here

1 Like

I’ve been playing around with all of the source code, and you can make some interesting creations and generated terrains. Might use this to make a randomly generated alien-like world.

1 Like

This is incredibly impressive, as someone that has dabbled a lot in terrain generation this is a serious achievment. I’m really impressed by how easy it is to create the terrain in studio without any scripting required. Thank you so much

I really love this feature but I really don’t know what to do with it. I would like to make some survival games off this but it’s be impossible as you can’t view the terrain on studio so I can’t build around it. I believe.

It probably can, depending on how much you already have.

You can build around it generate terrain in studio then place your anchored parts then clear the terrain and run the game the terrain will align the same it did in studio

make sure to watch this video

3 Likes

I’ve made a server-side version of this. You can test it and view the code here.

But this is still faster than generating it on each client, or am I wrong? :thinking:

1 Like

When the terrain is on the server side the server must send each terrain voxel

1 voxel is 4x4x4 studs (if you use the wood material you can see each voxel)

and each voxel stores 2 numbers material and occupancy

So if your terrain has 1000 voxels that’s 2000 numbers that need to be sent to each client when they enter the game

If the server has loaded 10000 voxels then it will need to send 20000 numbers to each client every time they enter the game

But if the terrain has a infinite amount of voxels it will need to send a infinite amount of numbers

But if the terrain is client side the server only needs to send the noise data that only has a few numbers it does not send any voxel data so if your server has been running for a long time it still will not need to send any voxel data

So what you will notice is the longer your server stays running the longer it will take you to enter the game

And when the world gets to big it will fail to load especially for devices like the iPhone

The speed it takes to generate the terrain depends on who has a faster computer
If Roblox server is a faster computer it will generate the terrain quicker
If the client has a faster computer it will generate quicker

I don’t know what Roblox server specs are but I would guess the clients computer is faster 90% of the time

But the speed of loading the terrain is not the problem the problem is trying to send a infinite amount of data over the network

So if you have made a server sided script it would be very important that you unload the terrain as the players walk away from that area or exit the game so the server does not need to send a very large amount of data to a client when they enter the game

I personally think client side is the superior method of generating terrain but everyone is free to do it the way they think is best there is nothing you cant do with client terrain that you can do with server terrain

Server (this loop is done for every player)

1) player sends there character position to server
2) server loads terrain around player
3) server sends all voxels data that has been added to all clients who are on the game
4) all clients get that data and update there terrain
5) when player moves loop back to step 1

Client (this loop is done for just one player)

1) server sends terrainData to client
2) client loads terrain around player
3) when player moves loop back to step 2

so from these 2 loops you can see that the server version needs to constently send a very large amount of data over the network but the client version sends 0 data over the network

1 Like

I agree that a large amount of data is being sent over the network, but that doesn’t matter since loading existing terrain from the server is faster than generating it on the client.

Sure, but I meant that loading the pre-generated terrain by an other player is faster than generating it on the client.
If there is no terrain existing, it would be faster to generate it on the client. However other players will benefit from you generating it on the server, as they will be able to load it fast when going into that already generated area.

For example, this is entering a huge map on a relatively old phone with highest graphics settings in Roblox and without any terrain unloading / game content streaming. It would be faster of course if it didn’t have to load the whole map.

This can be notably useful when you move rapidly in the world (for example with a plane), since the terrain generation can’t keep up with your speed (terrain loading can mostly).

You need 2 Roblox accounts

First log into your game with 1 account and generate a huge amount of terrain after you have generated a huge amount of terrain then log in on your second account without logging out of your first account so that the server does not reset

If you use your slow phone as the second account it would be better

That’s exactly what I did…

there must of been a problem with my scripts that prevented iphone from loading the terrain but i still think client sided terrain is better

On the client script there is a wait() after every chunk has loaded if you remove the wait then it will load faster

And when Roblox adds multi thread support it will get even faster but server sided terrain is always limited to how long it takes you to send all that data over the network

I personally care more about network performance and have never felt any performance degradation from generating the terrain on the client side

the noise function is not that hard for the CPU to compute

And the building of the terrain mesh has to be done on both server and client sided versions

So your sacrificing network performance in exchange for the math.noise function

but its upto you if you feel that server side is better then use it that way i personally think client side is better and ill keep using it that way

I am very, very interesting in using this plugin for a game I want to make. The plugin is extremely well thought out :+1:

However, I wanted to have different “areas” or biomes(snow, grass, sea, artic) that each area could be different to each other. I found it impossible to do something like this. The only way I found away around it was to generate the biomes separately with different and then smooth the changes in the biomes. I did manage to do this on a small scale but since I wanted to have a big map I couldn’t find a way to do that efficiently.

The only other solution I had was to have biomes at different hieghts but that didn’t look that good as biomes started to forms “rings” around other biomes and I couldn’t directly control the biomes size.

Other than that this is an amazing plugin.

Take a look at this video

Every time I try loading terrain it deletes everything in the models folder. Why is it doing this?