Best Practices for Level Streaming a Multi-Environment Open World RPG?

So I have a surreal fantasy RPG where the entire game is set in one persistent level split into multiple sub-levels. This world is fairly unusual in that the sky and background objects (i.e. moons, mountains) can change dramatically depending on where you are in the world. For example, walking through a small corridor can abruptly change the sky color or go from day to night. Planets, moons and other large background objects can also appear at the edge of the sky sphere.

I achieved this effect entirely with blueprints via level streaming with sublevels containing the sky spheres and background objects separately. That is, if all sub-levels were to be loaded all at once in the editor, you’d have multiple sky spheres overlapping one another as well as multiple directional lightings. The idea is that these sky spheres and lightings are toggled on and off depending on where you are in the world. However, what I have right now is not perfect. Because these different environments also have different lighting schemes, I have to build the lighting of each area separately. What makes things a bit more complicated is that I have to have all the levels loaded in the editor if I want to build all of the navigation, and the navigation resets every time I hide levels. In essence, it can be very tedious to hide and unhide levels if I want to build the whole game and with my world currently representing about 15% of what I have planned, I’m not certain if I should continue doing things this way.

I’d just like some advice to see if I should do anything differently when making more areas of the map:
-Would it be better to have just one sky sphere on the persistent level that can change appearance?
-Is it better to have one directional lighting that can change depending on the area?
-The game sometimes stutters when you are going in between the more dramatic transition areas. Is there any way to prevent this?
-Is there a way to prevent the navigation from having to be rebuilt every time a level is hidden?

Lastly, I’ve thought about world composition but I’m not sure if I should use it. I’m aware that it’s useful in larger team projects, but as of right now, I’m the sole programmer (contributors just send me assets via e-mail or other means). My world is going to be pretty large when it’s done, but I’m wondering if I can still achieve the same effect I want using my current method of level streaming.

I am making a game similar, instead of fantasy rpg it’s retro racing rpg.

  1. Multiple skyboxes is good, should be no problem

  2. I have one skylight and one directional light in the master level, trying to add those lights to each sub-level is a nightmare, I spent a few months trying to add lights to each level but gave up and found just having 2 master lights is much easier. You can still modify the master lights during runtime to fit your lighting needs, trying to build the lighting with the sub-levels essentially was a non-starter and not worth the time trying to figure it out. You’re going to get some disagreement here but in terms of efficiency and ease of use just having the lights in the master level is substantially more easy than trying to build the lighting in each sub-level. You’re going to end up with lighting needs to be rebuilt errors in the editor pretty much no matter what because the levels don’t recognize the other levels lightmaps, this is fine and doesn’t effect performance it’s just part of level streaming.

  3. When loading levels with large landscapes and a lot of assets it will stutter. I broke up the bigger levels into smaller levels and then load each one independently so that there isn’t as much to load. This is important because the users will have variable hardware so you have to think in terms of the lowest specs that are going to be playing your game, if they are stuck waiting for levels to load that’s no good.

  4. Don’t know.

How are you handling the level streaming? I just use blueprints with a collision box to detect overlap events and level stream from the blueprint. World composition only works when the level is proportionally sound (i.e. there are no overlapping areas and it’s one big map). I’m not a fan of world composition, a lot less control over the memory usage. I think it’s better suited for procedurally generated landscapes and environments that are kilometers long like in the kite demo Epic Games provides. If you’re creating a more customized environment level streaming is going to give you more control.

Thanks, all good to know. I’ve currently been doing the level streaming the way you described. I have collision boxes that tell which areas to load with blueprints. I still have quite a lot of work to do in terms of optimizing things, so maybe once that’s taken care of, the stuttering should be reduced.

Have you considered toggling the viability of the objects instead of loading and off loading the level? The draw back is the objects will still be loaded in memory but the upside is the stutter should disappear. Either way the stutter is a problem that I’m assuming is cause by the lantancy of accessing the object from the hard drive that you might want to load test

You might want to check out world composition as the alternative.

It has some interesting features that is not available to level streaming but I don’t see a reason, as in I have not tried it, that you can not use both.

Given the way my game world is organized, toggling visibility could be an option. Thanks for the pointers.

Let me know what lighting you settle on, I’ve seen people suggest doing the separate lighting for each level and building each levels lighting but it simply was not viable for me. I’m interested if you figure it out.

Sure thing. I’ll keep this thread updated.

Some progress:

I switched over to building the the lighting of the entire world with a single directional light in the persistent world and one sky light. It actually works okay - so far, I haven’t noticed any major fps drops. However, I definitely need to adjust some things because after building, it caused the colors to become very washed out. I’ll have to investigate, but as far as I can tell, it’s probably unique to my project.

Also, I got some errors in the message log that were mostly “object has overlapping UV’s” with some models I created with Blender.

Hi Everyone. I have a project with nearly 30 sub-Levels under a persistent level. I have added all my lighting under the Persistent. Now the sublevels are not evenly split because of their size and design . I will not be able to able to build all levels under persistent at once since theproject is huge and it needs more then 30 GB RAM so my option is to build each level or each group of level seperately under persistent. ( The actual area is 47 acres) WHen the lighting is built, everything looks fine.

When I go through the levels on Editor one by one the lighting looks perfect without any errors. Now from here I have 2 issues. If I enable ( make visible) 2 or more levels that are built seperately, will the lighting invalidate because of the overlap? and another problem is If i enable the maps one by one the lighting changes visually, example: as I keep on enabling levels one by one the shadows start getting smoother ( lose sharpness) and the lighting quality degrades with more maps being unhidden. Am I doing something wrong? I will attach few images for reference. I have also tried streaming them using Streaming volumes. How can I fix this? I have also made sure that the lightmass settings for each level is same.

Since I started this thread, I’ve put Dreamwalkers: Sleep Descent on hold to work on Droplet: States of Matter. I’ll return to Sleep Descent someday, but Droplet’s been my priority as of late. Droplet has a similar level layout as my previous project in that it also consists of multiple sub levels within a single persistent level except you now teleport between areas instead of walking to them. The solution I came up with was having 100% dynamic lighting (which can be done by unchecking Allow Static Lighting in the Project Settings). Because of this, building the lighting for each level was no longer necessary. I could also shrink the game’s file size by a few GBs since the built data files could now deleted. It works just fine even when loading different sub-levels via streaming.

It’s not exactly the best solution, and I’m not really sure if it will look all that great for realistic, high fidelity games. Even so, it’s proven to be way less of a headache than before.

I have a openworld survival game with 16 tiles very large map been looking for months on how to optimize it some people said to level streaming others did not know. My question how would i use level streaming on my maps that only have trees and rock and very large mountains that can be seen from any part of the map so when player is running and looking the frame rate is in the high teens maybe 25 FPS unless there is another way? or should I not make this game being a single dev