So I just completed a few tutorials on level streaming and the videos showed how to create sub levels and stream between them. I understand the hiearchy and the streaming. I even understand breaking a larger world into layers/levels and streaming them in. All that makes sense. The problem I have is I want to create a seamless loading transition between levels. I’m trying to better understand project structure and how projects should be organized to play an intro movie on start up, display a splash screen, load the main menu, load a level to play, etc… The videos I watched had all these items as different sublevels but that doesn’t seem like the correct way of doing it. The streaming/layers/sublevels is perfect for optimizing a large open world like in Battlefield, Fortnite, or in door & outdoor spaces in a level, but for level transitions it doesn’t make sense. Is it really as simple as just using a transition map and using the movies section in the settings?
@xpgained So you’re talking about old style levels, right?
Believe it or not, streaming is still the way to go. Check out this tuut, even though he’s talking about menus and widgets, each of those things IS a sublevel of the main persistent:
Basically, just write your levels as separate maps, and when you want to sew it all together, make an extra level, which will be the persistent level to load everything in.
As you import your maps into the persistent level, they will all be sitting on top of each other. Doesn’t matter, we’re not talking about ‘wide open world’ here.
Importing them all into a persistent level like this gives the streaming system the info it needs to load things efficiently, unlike the ‘open map’ call…
I actually watched and setup my project with that video and ran into a problem. My main menu uses a different game mode than my actual gameplay game mode. The game mode of the persistant level is passed on to the sub levels. This is making my actual gameplay level not work. Vice versa, if I set the gamemode to my custom game mode then the player is spawning behind my menu with all the game HUD. I also have a bug when setting the menu to use the right game mode. I spawn into the game like i’m supposed to but I don’t use the player starts in the streamed in map to spawn the player. The engine is automatically using a generic player start point on the persistant map causing my player to fall infinitley through space. I believe I do not even have a start point on my persistant level but it is def passing this phantom start point to my streamed in level.
I thinking a solution might be to put the main menu in its own persistant level and then put the game world in its own persistant level. This way each one can use its own game mode. How do you transition between persistant levels? is it even possible?
How about the world composition system? Anyone know how to use it? I think maybe it would be possible to create a main menu map and add it to the world comp. Then create a game level comp for the gameplay area, and a loading screen comp for the loading screen area, etc… in the larger world I could totally hide the areas like the menu from the player using geometry, meshes, landscapes, blocking volumes to hide those areas from the player and make them inaccessible. Any ideas?
I’m going to setup the project like in that video again today and see if i can get things working. I’ll post questions if i’m still having problems. Thanks Clockwork!
Ok so I’ve got everything set back up like that video but now all I see is a black screen. I assume this is because i’m using a completely empty level for the persistant level. Can someone explain the expected hiearchy for me? Is the persistant level truly just a container or do I need stuff in that level? If I do have to inherit things from it like the sky light, the terrain, the player starts, etc. wouldn’t it just be my gameplay level? So in essence when I load my first map am I really just loading into the persistant level? The hiearchy and what is being passed to the sublevels is confusing me and causing problems. If anyone has a grasp on this and has the time to explain that would be so helpful. Thanks guys and gals.
I got everything running as intended. Streaming was def the way to go. The bugs that were present were tied to some of my BP setups. Just needed to refactor some blueprints and change a few things. Thanks for keep me focused Clockwork!!! The only things i’m passing from the persistant level are my skylight, and my global lighting setup, etc.
Ok ok jumped the gun a little. I followed that video and for some reason I am spawning 2 player blueprints into the game. My spawn function i believe is very similar to that video. My respawn function only fires when the player health <=0. I’ve disconnected that bit of code and still i’m seeing a 2nd player spawn. Any ideas? is there something hidden that is spawning the player.
Nevermind!! I found the solution. In my gamemode all I had to do was check the box to start players in spectator mode. This disabled the engine trying to place a player pawn. After that my blueprint spawning and possession was all good. I found this anwser in a different forum post. here is the copy paste from that thread.
try taking a look at this plugin https://unrealengine.com/marketplace…ueprint-plugin!
This is very interesting. So with this solution everything is designed in BP. Def gets me thinking differently about things. Thanks dude.
@xpgained Sorry, only just saw all this! ( you need to ‘@’ me or use answerhub ). Did you get it all working ok?
No I haven’t got it working. At least not the way I think it should work. I have a bug where an invisible player pawn is being spawned at the center of the world. It can’t be seen but does have collision and is acting like it is the player. ie. it takes damage. Along with that problem I still am not understanding how to setup a project correctly. It would seem to me you would want to use level streaming to transition between areas of the same persistant map, but you want to use open level to transition between all these containers. The problem is I just haven’t seen how a AAA project is being setup. If anyone would be willing to post some screen shots or a video of their project so we could see how they are using stream and open level with a menu and loading transitions that would be so helpful. My research on the topic is coming up short. I would also love some links or videos to checkout if you got any suggestions.
When I use open level the screen turns black for a long time while the level actually loads. During this time I assume is when we should actually be seeing the loading transitions. Currently that is not the case because the system I’ve created is only displaying transitions using the level streaming. I also have an issue when transitioning into gameplay where my UI is loaded and displayed over my splash screen before the level is finished streaming. Any tips ladies and gents?
@xpgained Hey! - Ok, so I have moved on a lot with streaming. You can use it to load old school levels, no problem. Open level will never work as it locks the system until the level had loaded.
Basically, you have one persistent level with nothing in, and you add ALL your maps to that level. You menu system is also a level, so everything can go in.
The to move smoothly from one level to another, you need a really small sort of ‘warp’ level ( you can also have a loading screen, but that seems a bit lame ). I used this:
The sequence goes like this
Playing level A
Press button / pull level which will transport me
Load warp ( or loading screen ) level
Immediately unload level A ( I also use some heavy post process when unloading the level so it’s sort of like acceleration blur ).
( The player now sees the warp / loading screen )
Stream level B ( no blocking, visible after load = no )
Use a loop to wait until node IsLevelLoaded can see the level
Unload warp / loading level
Set level B as visible
Make a loop waiting for the correct player start to appear ( it might take a few hundred milliseconds, you have to stop the player falling through the ground )
When player start appears, spawn your player at it’s coordinates and possess it.
Then destroy any other pawns
It’s just a camera looking into the cone, it’s only there for a few seconds while the next level loads in the background, and then you can switch across.
I also had the ghost player problem. Are you using first person? The problem is when you spawn players, you ALSO have the default player from the engine in the map. My solution was to remove any players after spawning my player, I found that just possessing the default player didn’t work properly. But you said the player was at 0,0, that sounds a bit like you aren’t setting up your spawn right.
Let’s sort it out one bit at a time. Player or streaming?..
Here’s a gif of the transition ( I can’t load it here, it’s too big - another reason why answerhub is better… )
https://drive.google.com/open?id=19O0fcDGuzq0VPcLJGhLteNP--YOmIdH5
@xpgained Hey, I’ve made a cut down version of my streamer. I’ve taken out all the timelines ( because they all referred to packages you probably don’t have ). Attached ( you just copy everything from the text doc and paste it into a new actor BP ( you need to right click on all the variables to define them ).
I’ll try and describe the assumptions behind it. In no particular order:
-
It assumes first person
-
UnloadLevel is the level to unload ( same for LoadLevel ). The streamer will look for a player start in the newly streamed level with the player start tag defined in PSTag
-
Bluewarp is the warp level. You can use any simple quickly loadable level.
-
You need to make a WhileDelay if you don’t have one already. It’s a macro:
Tell me how it goes ( it will probably be pretty ■■■■ without all the bells and whistles, but you’ll get the right idea ).
@xpgained Sorry Bit more detail.
Make a new totally empty level, that’s your persistent.
Open the Levels windows and use the Levels → Add existing… to add all the levels you’ll be working with ( Load level / unload level and the warp level ).
Place the stream BP in the persistent level.
Edit the level BP in the persistent level so that it uses the streamer BP to load your first level ( the unload level is nothing ).
Then you need something in your first level ( a button to press etc ) which will call the streamer and cause the whole unload/warp/load thing.
Good luck…