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.
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.
answered Dec 20 '17 at 03:10 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here