Is there a way to copy and paste terrain material from a specific area from a different game?

I was wondering if there was a way to copy and paste a specific area from a different place, I need to copy this terrain over to the current version.

This easter a new island was added to the place, so i need to repaint everything for the summer event, but this is time consuming.


Is there any way to do this without getting rid of the island?

2 Likes

This might help you but you would need a way to find the the region3 of the area you want to copy.

You could get the region3 from making a part, resizing it to your liking(where the copy terrain you want is), and using this script in the command bar to find the region.

local part = --location of part
local partPos = part.Position
local partSize = part.Size
local r3 = Region3int16.new(Vector3int16.new(partPos.X - partSize.X/2,partPos.Y - partSize.Y/2,partPos.Z - partSize.Z/2),Vector3int16.new(partPos.X + partSize.X/2,partPos.Y + partSize.Y/2,partPos.Z + partSize.Z/2))
r3 = r3:ExpandToGrid(4) --I don't know if this is needed, but if it doesn't work remove this
local terrainCopyInstance = workspace.Terrain:CopyRegion(r3)
terrainCopyInstance.Parent = workspace

now you need to place the terrain copy into the new game and run this in the command bar:

local terrainRegion = --location to terrainregion that the command bar created in the new game
local corner = Vector3int16.new(-32000, -32000, -32000)
local pasteEmptyRegion = false -- if u want it to paste in air set this to true
workspace.Terrain:PasteRegion(terrainRegion, corner, pasteEmptyRegion)

If it doesn’t work just ask for help.

Doesn’t copyregion have a size limit?

yes but it should be fine as long as you don’t copy something huge, such as a 16000 x 16000 terrain map

that terrain is larger than the limit… is there a way to bypass it?

are you copying all of it or just the part with lava

The terrain only, the parts should be easy to copy

i mean the are with lava sorry, the rest of the terrain looks to be the same so you can copy only the areas with modifications, such as the lava area, but if it is too big, you can tessellate parts to fit into the terrain area you need and copy them over

You could use ReadVoxels and WriteVoxels, not sure if there is a larger limit there. Otherwise you could just copy regions of the terrain and paste it out one at a time rather than the whole thing at once.

The problem with read voxels and write voxels is that it can not be transferred from place to place, unless you have an external database that can receive POST requests and you can GET request it, then it might readvoxels and writevoxels might work.

ReadVoxels returns a table, with that it can be easily moved to another game. Then using WriteVoxels all you have to do is plug in the table.

Yes it does return a table but you have no way to access the table without having it be sent to something you can access, like a database. Or you could use something like repr by ozzypig to print the table out as it would look like in a script

You could JSONEncode the table and print it to the output, then JSONDecode it in your other game.

Oh yes right, I forgot about that, sorry.

Use this plugin: https://www.roblox.com/library/155126448/Terrain-save-load

1 Like

Hi, if your new terrain was in exactly the same area as your old terrain, I would first recommend subtracting the area where the terrain is different. (A.K.A. all terrain except for the island). This can be achieved in two ways:

  1. Manually subtract it using the terrain editor, or,
  2. Use this plugin, called part to terrain, which allows you to select a large area very easily and subtract away all the terrain the part encompasses. Much more efficient.

Once that’s done, I’d recommend using this very popular plugin, which when used correctly, will save all your terrain and load it into the world you want it to be in.

Then you’re done! I hope this helped and good luck. d(•͈ _•͈ෆ)ᵍ♡♡ᵈ !!

Doesn’t this plugin get rid of the terrain around the part that needs to get replaced?

I managed to copy and paste terrain by using these plugins:

^i removed every bit of terrain that i did not need by changing it to air

^i had saved the terrain via this plugin and made the part its position 0,0,0 and loaded the terrain

This worked perfectly and is going to save so much time for me in the future. :smiley:

1 Like