Terrain - Water, Water Everywhere + Big Brushes

Wish there was a way to make water dynamic, I mean in the real world we have tides and things like that. Sea level isn’t flat. This would help me design my exploration games and make it more realistic. Creating bricks and using perl noise to generate waves then pushing parts up/down isn’t the best for performance.

8 Likes

That update will be great but
the color map can be exported from Roblox Studios?

This is still happening. Any fix?

Can’t wait to test this out! Great addition!

I am super excited about the sea level. It makes things so much easier for my arctic area. It would be awesome to have an “Above Ground Level” generating tool as well.

A small glitch in the water level. When I am messing with the size and placement and then undo and try another size, the preview selection mesh disappears making it much harder to estimate where I want the sea level to be

:bulb: It would be really helpful if these terrains additions remained visible in “layers” under the terrain property so we could edit specific areas without interfering with other terrains we want to remain solid (similar to how you can have “Sky” under lighting). Or having 3 terrain layers that remained visible and editable such as “Land” “Sea” and “Air”

:bulb: Another feature request is to have a specific area for Weather (similar to how lighting/sky is done)

2 Likes

Sorry for the quite unrelated reply,but are you planning to add a feature that would allow us to replace one terrain material with another on larger maps,without painting everything manually? for now it is pretty much impossible to do that,and the plugin that was supposedly able to do that is broken. It’s a problem lots of developers addressed,yet nobody found a functional solution to. (cannot post this in the platform feedback category,feel free to flag this or message me if you deem this reply to be unrelated to the topic)

4 Likes

For the heightmap importer, could we see an increase in the height resolution beyond 255 (8 bit) in the future? While the importer currently does perform some smoothing to mitigate terracing, the effect is still very noticeable.

On the left is a hill imported from a heightmap, and on the right is a hill created using the terrain tools. While you can see the smoothing algorithm has reduced the amount of terracing visible, it’s still very apparent.

The terracing effect is even more apparent on maps with higher heights, forcing developers to compromise between a high-altitude, low resolution terrain and low-altitude, high resolution terrain. Having 16 bit height resolution, or at the very least the option to increase the height resoluton by a higher amount, would be very beneficial to developers and bring the heightmap tool up to the same standard as other game engines.

Edit: Just discovered after some testing that Roblox compresses PNG files to have only 8-bit depth, which is disappointing. Would this be a barrier to adding more height resolution?

8 Likes

I am very happy, This issue got fixed now I can do my terrain! Loving it! <3

I’ve been saying very much the same thing since the importer was first revealed, extra granularity in height would be incredibly beneficial. I once tried to import a tall map that utilized smooth areas marked with the the asphalt material as a road, but the subtle terracing lead vehicles to be very wonky to drive if they didn’t have absurd suspension, even on areas intended to be smooth.

1 Like

This still happens. Can you help me out?

For anyone encountering similar issues, we’ve identified the root cause:

  • the Sea Level tools can create terrain voxels with very small but non-zero occupancies
  • the terrain meshing algorithm attempts to respect these occupancies at far-away LODs

We’re looking into general fixes. In the short-term, the below script can be run from the command line to fix any low-occupancy voxel issues in a Place. Modify as needed for your use case. N.B. this is iterating over all selected terrain voxels so it may take some time to run.

-- Iterate over all Water voxels in the terrain and adjust low occupancy 
-- voxels up to a reasonable lower limit
local reasonable_occupancy = 0.25

-- There isn't an efficient way to scan the world and determine which 
-- areas have terrain. We can avoid solving this problem by providing 
-- a space to operate in
local x_min = -2048
local y_min = -256
local z_min = -2048
local x_max = 2048
local y_max = 256
local z_max = -2048

-- The maximum number of voxels in a terrain region is something
-- like 4 million. Assuming a dumb cube, this limits us to ~158 voxels
-- per side * 4 studs/voxel
local max_block_edge = 158*4

-- We need to cut up the space into blocks that fit in a terrain region.
-- Find number of blocks to iterate through. We're going to overlap the
-- total region by half a block on each end to ensure total coverage so 
-- add an extra block in each direction.
local num_x_blocks = math.ceil(math.abs(x_max-x_min)/max_block_edge) + 1
local num_y_blocks = math.ceil(math.abs(y_max-y_min)/max_block_edge) + 1
local num_z_blocks = math.ceil(math.abs(z_max-z_min)/max_block_edge) + 1

for i = 1,num_x_blocks do
	for j = 1,num_y_blocks do
		for k = 1,num_z_blocks do
			-- Maths to define this iteration's block 
			local reg_x_min = x_min-0.5*max_block_edge + (i-1)*max_block_edge
			local reg_y_min = y_min-0.5*max_block_edge + (j-1)*max_block_edge
			local reg_z_min = z_min-0.5*max_block_edge + (k-1)*max_block_edge
			local reg_x_max = reg_x_min + max_block_edge
			local reg_y_max = reg_y_min + max_block_edge
			local reg_z_max = reg_z_min + max_block_edge

			-- Create a terrain region and read from it
			local region = Region3.new(Vector3.new(reg_x_min,reg_y_min,reg_z_min), Vector3.new(reg_x_max,reg_y_max,reg_z_max))
			region = region:ExpandToGrid(4)
			local material, occupancy = game.Workspace.Terrain:ReadVoxels(region, 4)
			local size = material.Size

			-- If we make changes to occupancy we will need to write these
			-- changes back to the terrain.
			local need_to_write = false

			-- Iterate through all voxels in a block to check and 
			-- correct occupancy as needed.
			for x = 1, size.X do
				for y = 1, size.Y do
					for z = 1, size.Z do
						local cond_1 = occupancy[x][y][z] < reasonable_occupancy
						local cond_2 = material[x][y][z] == Enum.Material.Water
						if cond_1 and cond_2 then
							occupancy[x][y][z] = reasonable_occupancy
							need_to_write = true
						end
					end
				end
			end
			if need_to_write then
				game.Workspace.Terrain:WriteVoxels(region, 4, material, occupancy)
			end
		end
	end
end
print("Done!")

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.