Hello, I am working with procedural terrain generation and I am using a script from the RDC 2019 which works; however, in the RDC presentation, there is a picture that goes along with the code that basically creates the heightmap and it's shown in the real world. The code I have doesn't do this and I am wondering how to recreate the heightmap with parts or if it's just an image.
function GenerateHeightmap(size, seed)
local freq = 10
local heightmap = {}
for x = 1,size do
local hx = {}
heightmap[x] = hx
for z = 1,size do
local y = math.noise((x + seed) / freq, (z + seed) / freq)
hx[z] = math.clamp(y + 0.5, 0, 1)
end
end
return heightmap
end
local heightmap = GenerateHeightmap(100, 45)

1 comment
Am I able to import the heightmap generated from the code into the terrain editor?