How would I go about scripting cubic smooth terrain water?

I’m attempting to create smooth terrain water that will fit into nearly-perfect cubes. I need to be able to script these cubes. I’ve tried defining region3s that should cover the areas. For example, I put a 4x4x4 part at (0, 0, 0) and created a region3 with a min of (-2, -2, -2) and max of (2, 2, 2). The result was a blob that was not cubic in nature. Is there something I’m doing wrong? I just learned about region3s and :FillRegion(), so it’s very possible that there’s something I’m misunderstanding. Previously I used :FillBlock() which did not give desirable results. I suspect that this has something to do with the “voxel grid” that the wiki described.

1 Like

It’s not possible to make sharp edged water at the moment - all water will have rounded looking edges because of the way the current terrain meshing algorithm works.

There have been some suggestions to make it a part material, but for now, you’ll have to stick with the rounded stuff.

When I use :FillRegion() with a region3 with a min of (0, 0, 0) and max of (4, 4, 4), I get the desired shape. However, I can’t seem to replicate this with any larger sizes. In other words, I know it’s possible to create the shape I’m looking for, but I don’t know how to get the desired size in the correct position.

Sadly water cant be sharp edged, it will be roundy.

Are you talking about this?

If so, that’s impossible to replicate at any other size - it’s a side effect of the algorithm Roblox uses to generate the terrain mesh. I wouldn’t rely on it.

1 Like