I’ve been working on a blocky terrain system off and on for quite a while now. I’ve been using parts for the blocks originally. For the given area, it would take about 42-46 seconds to generate every visible block (a block that would be touching an “air” block). Today I had the idea of switching to Roblox’s voxel terrain. With some optimization, the same amount of terrain is generated within around 8 seconds, which is roughly 5-6x faster. It’s also actually generating more blocks as it also generates blocks that aren’t visible, seeing as Roblox’s terrain is automatically optimized to not render blocks that aren’t visible.
This is really good, however I have come across two core issues. My blocks were originally 3 studs in size, but Roblox’s terrain appears to only work with 4 studs with the cube shaped materials. But my real issue is the LOD rendering.
Here I’ve got two images. The first is from further back:
Ignoring the mountain in front and that everything is just brick (I was using colored parts before, but now I need to use material variants and I haven’t done that yet), the terrain further back is very chunky. But if you move closer to that area, the terrain actually looks like this:
This is clearly the automatic terrain LOD system that’s rendering the voxels at a lower resolution from a distance. What I’m wondering is if there’s a way to deal with this. I’m thinking that maybe I don’t have the voxels aligned on the voxel grid correctly? Or is there some way to modify how the LOD works, or perhaps how close or far the LOD activates? While Roblox’s terrain is certainly way faster, this visual sacrifice is actually quite extreme. Imagine looking from on top of a mountain to see what you’ve made, but everything is all chunky and messed up. I’m perfectly fine with terrain LOD doing this, but I wish it did this at a much further distance.
To explain how short of a distance this even requires, here’s basic flat terrain:
Reminder that this image is showing what’s supposed to be completely flat. This is 4000x4x4000 in studs, or 1000x1x1000 in Roblox’s terrain voxels. There are even multiple levels of LOD. This LOD is alright, but my issue is how quickly the LOD switches from the first level to the second. The third level of LOD is also way worse. What I’d personally like is for the second level of LOD to start where the third starts, and then have the third start further away. I wish there were a way to control this for my own project.
But the reason I’m posting here is that I realized that if you move the terrain up 4 studs (or what I assume is 1 voxel), the LOD now occurs under instead of over, which can be seen in this image:
The far distance LOD is still there of course, but at least the middle ranged LOD is “gone”. Now this is nice and all, but this is only a solution for flat terrain. So what I’m wondering is how I should go about this to work with the LOD. It feels like there’s some grid I should try to match in order to resolve this LOD issue. I should probably mention that I’m using Terrain:FillBlock().
TL;DR:
I’m wondering if there’s either a way to modify the LOD rendering system, or if there’s a way to align my voxels to this LOD voxel grid in a way that “hides” the chunkiness of the mid range LOD (as shown in the last 2 images)?