If I have about 177 levels, how would I find out the levels surrounding the player location

If I have about 177 levels, how would I find out the levels surrounding the player location.
So I can stream load them… because it’s not doing it automatically.

It really highly depends on your specific use-case.

Could you add a few words about what type of game you’re working on?

Well, the level streaming doesn’t appear to work because my terrain is too large, I’ve found documentation that suggests that streaming isn’t actually meant to work because it didn’t work properly so was removed and blueprint streaming is the only way to get it done… if this is the case… how? I have 177 pieces of terrain. Under a persistent level, which I can toggle on and off manually… but they won’t automatically load or unload or become visible or invisible. It seems I am required to use Blueprints to work out the touching surrounding levels and load them as required? Or… no?

Well it depends on your use-case (which is why I asked for the type of game you’re developing)

There are two main ways of doing level streaming which are unfortunately mutually exclusive.

If you can work with just setting up volumes in order to trigger level parts to be streamed in I’d suggest using that.

If you need tighter control over it, need to trigger it at certain events or cutscenes you’ll have to do it manually. That doesn’t mean you can’t use volumes anymore. But you’d have to set them up yourself (which is reasonably easy and can be done by creating one utility actor doing that).

Open world. So, a fair amount needs to be visible at once. I need to hard load one level where the player spawns plus about 8 other levels surrounding the one you’re standing in. At the moment, they won’t load no matter what I do. I read for days that Level Streaming solved large terrains… but then it doesn’t.

Oh it did solve it. It’s possible now! At all!

It’s not easy.

Minecraft works via chunks. A chunk is 16x16 blocks. By default 10 chunks are loaded in every direction (so 21x21 → 441 chunks in total).

When a player leaves a chunk in some direction the furthest row is unloaded and a new one is loaded (-21 chunks behind the player and +21 chunks in front of the player. Player in this case being the location of the player. No other predictions are made)

Most high quality (asset based) games use multiple radii to do different stuff.

The base terrain in a large area, larger structures in a very low level of detail version far away in increasingly higher quality the closer you get. Props (railings, trash bags, etc) get loaded even later when you get closer and people / AI start spawning in a certain radius around the player only and despawn the second they leave that radius again.

So you have multiple levels for the same location loading them as soon as the player gets close enough.

How exactly you determine that is up to your implementation. Volumes often do the trick.

Unreal Engine makes it relatively speaking incredibly easy. It does Level of Detail on it’s own so you only have to tweak a few settings. It does the streaming on it’s own allowing you to just start loading and displaying levels as you need them.

If it doesn’t work for you I am fairly confident in saying you did not read the documentation carefully enough or checked out a proper tutorial, did not segment your terrain properly, didn’t turn the level visible or made another mistake.

If you go into more detail as to what’s not working I’ll gladly take a look at that.

The documentation appears to negate itself… It states that it automatically handles things like Terrain Streaming, yet after careful searching I’ve found that using the Persistent Level, ticking "World Machine’ and importing all of the tiles, and modifying the 50,000 Streaming Distance, doesn’t actually affect anything. So it inevitably doesn’t work. I found a document somewhere, a forum question I think… with a direct response from Epic saying "Sorry we removed this feature because it didn’t work… 50,000 Streaming Distance is relating to Textures Only, because the terrain streaming didn’t work very well, so we removed it and you have to work out some other way of doing it yourself… ey? The documentation says it works, but Epic say it doesn’t work. The LOD appears to be irrelevant as well, I’ve been testing LOD application by walking around a 24km x 24km … one of my levels. And it doesn’t degrade as I get further away from areas… I can see full detail in wireframe from start to finish.

Inevitably I’m trying to do it the way Minecraft does, but working out what area is surround me and loading all of those manually, because the solutions documented by Epic do not appear to function.

Somehow inexplicably without me changing any settings at all… just closed my computer down, opened it back up today to do some more work… level streaming now works perfectly. No idea what changed… all I did was open the Persistent level, clicked on a world and said ‘Make this the current level’ … and pressed Play… now it all works? So odd.

Wow… now it doesn’t work at all again. No settings changed between when it was working and when it was not working… just closed the program to go sleep… woke up and opened the program, now the terrain does not function no matter what I do. haha.

Sorry, I’ve been posting to the wrong thing so you probably didn’t even know I replied…

I managed to get this working perfectly once, without changing or saving any levels or doing anything at all… all I did was open the project, and right clicked on a level, and pushed ‘Make Active’ then hit ‘Play’ … I was spawned into the area where I have placed my player start, and it streamed every other level perfectly. I closed the project, reopened the project, pushed ‘Make Active’ then hit ‘Play’ … with absolutely no other changes at all… and now it spawns me into the water. LOL

Sorry, I’ve been posting to the wrong thing so you probably didn’t even know I replied…

I managed to get this working perfectly once, without changing or saving any levels or doing anything at all… all I did was open the project, and right clicked on a level, and pushed ‘Make Active’ then hit ‘Play’ … I was spawned into the area where I have placed my player start, and it streamed every other level perfectly. I closed the project, reopened the project, pushed ‘Make Active’ then hit ‘Play’ … with absolutely no other changes at all… and now it spawns me into the water. LOL