Best method to stream procedural levels?

I’m working on a game that takes place in a procedurally generated city (mostly). I have fairly detailed map chunks consisting of blocks that consist of buildings, all of which are procedural. I had some success with using blueprints to stream the levels, but there were issues with loading multiple maps at once (like, it wouldn’t, only one of the two maps would actually load or become visible). So I tried using World Composition, which seems a bit easier to set up, but the load times are awful. I’m averaging between 5-10 seconds per level when transitioning, double that if multiple levels have to be loaded at once. For reference, my levels are *EDIT: 42,000 units across and consist of 4 procedurally generated city blocks with streets in between.

The geometry is not extremely detailed, but each building has an interior with some furniture. I’m using material instances for the big things (building sections, streets), but many of the props are from packs I purchased so those haven’t been converted fully. Every static mesh has a maximum draw distance set (between 10k and 50k, my maps are foggy), and my entire game is made of static meshes, no actual terrain.

Is there anything I should be looking at to try figure out why I can’t get a large seamless world? Failing that, is there a way to preload the game world before the game starts? I imagine that would help with level transitions. Would it be better to generate the whole map on the fly as it’s uncovered, only building things the player can see?

I’m really at a loss here, especially since I want to make sure I can get the level streaming working properly before adding things like AI, items, and actual gameplay.

Yeah, what happened was I had a grid of levels set up around my persistent level. Each level had a spawning volume that was larger than it, and would load and unload the level when the player was far enough away that they couldn’t see it. Because these were all squares of the same exact size, there were areas where multiple volumes overlapped. I had the trigger volumes print a message that their child level was spawned as well, so when the player walked into areas where they overlapped, it would say both levels were loaded, but only one would become visible.

When only one of the two become visible, did you properly add the 2 maps into a clean “Persistent Level” and make them both visible ?

Possible issue on your setup : verify that “Make Visible After Load” is correctly checked when loading level. Else you have the node “Should Be Visible” (Level Streaming). Also verify that you have a strong reference to each “Box Spawner” (I don’t know if GetAllActorsOfClass is a good idea). Another thing is, I think when you unload level, you should load it again when you want it to be visible.

I just remade the entire Blueprint from scratch, and it does work now. It will load multiple levels at one time, it’s just very slow.

I’m starting to think the whole problem is that I’m generating the levels on the fly. Is there a way I could generate them ahead of time? I think that would make the transitions much smoother.

I think the better way is to load everything during loading time and just play with “Should Be Visible” on runtime. Unloading maps during gameplay may not be recommended if you want it back again.

I’ll give that a shot. I also tried merging my maps into one big one, which gave me steadier performance, but I’m not thrilled with the framerate (35-45 FPS mostly).

That didn’t work at all, dropped me to 0.1 FPS. I loaded all the levels at EventBeginPlay, and then just set the visibility to be triggered by the spawning volume.

Your previous solution might be the best, 35+ FPS is fine. I even run some project without scenery (only code and cubes) at 30 FPS.

That’s what I’m working with for now, but I would still like to get the map larger and with no load time between them, guess it’s just not really possible?