Ability for smooth terrain LOD to load higher-detailed models near the camera focus

As a developer on roblox it’s pretty difficult to do any sort of long-range combat using roblox’s terrain. Here’s the biggest issue:

There’s a character standing behind this hill. From my perspective (a few hundred studs away) it looks like his head is just barely popping out (

Here it is with a much lower field of view (aka how a sniper scope would see it)

But when I move the camera much closer and let the high-detail terrain load in, I see that he’s not actually visible

This is a terrible experience for the player. I constantly get “bug reports” of players shooting an enemy and the bullets not doing anything (because the hitbox is actually hiding him, and inaccurate due to terrain LOD).

I’m not sure what the best solution here is, perhaps making the LoD listen to the camera/field of view and loading more detailed terrain visuals near the focal point?

16 Likes

I’ve heard that Camera.Focus is supposed to control things like this, but I’ve never seen it work in practice.

I have no idea if it works but I have considered it. The problem is that it’s difficult to determine where I should put the camera focus (AKA if the player is looking above a mountain, do I load terrain where they’re looking, under where they’re looking, etc…?)

1 Like

Maybe just a ray cast out from the crosshair. To handle cases where it’s hovering on the edge of multiple backdrops, you could do some kind of interpolation along the ray that’s weighted based on the current length of the ray. Or maintain the same length if nothing is hit beyond some effective distance.

Or, since the target is almost always a player, focus on the player nearest to the ray cast hit, or an average of nearby players. If there aren’t any nearby players, it could focus on likely points of interest, like windows or tower tops.

Or, if we were being realistic, the player would have to adjust the focus of their scope manually.

Worst case scenario, you could add terrain grass to cover up some of the slight terrain LoD inaccuracies considering that it’s a small height issue within a 1 (+/- 0.5) stud range for this example above.

I’m not sure how far out the player is, but if the grass renders from that distance away, it might decrease the amount of complaints.

PUBG had similar issues according to their patch notes which were fixed in 2019. Basically when you zoom in nowadays, the LoD increases based on the camera view. I haven’t played the game recently, but testing the scope (in PUBG) might be a good example of what terrain LoD should look like when the camera is “focused” on terrain out in the distance.

Terrain grass doesn’t extend that far. I’ve been planning to write my own grass system so that I can try to sort of overcome this issue if Roblox doesn’t fix it.

3 Likes

3 years later, this is still very much a needed feature.

Big maps with open world terrain and combat are difficult to play properly at large ranges due to LoD not being controllable. There is no feasible way to currently load in terrain without disrupting player experience. Right now, a workaround is to force the camera and character to be near the terrain intended to load, but this is not ideal as it can cause players to fall (because of streaming) and doesn’t provide an accurate scope camera view.
This is also problematic with vehicles, such as land and air vehicles, where you need terrain to be accurate at large distances to determine where you are going or what you are seeing.

5 Likes

It’s bizarre how the terrain LOD still works this way despite the fact LODs on meshes correctly adapt to the camera’s FOV.

4 Likes