Your tutorials are the best. Before i stumbled upon your channel i usually just quit making games as i thought it was not for me, but this itch just kept on telling me to come back, i haven't been this productive since thanks a lot
Level Streaming also needs a working and fully savesystem else you reset the unloaded level every time. A save system is the hard part. You also dont need to write logic for streaming levels, you can just use level streaming volumes.
Sorry for multiple commands, you know when you load/unload based o position, especially I am using VR in archviz, Problem is rotating camera make problem and u have to load many things on yet because still user could rotate back side and you have to make them already loaded, but if you able make something like camera view load or some part based on distance, the performance will be much better.
Important note on purpose of level streaming: Level streaming is primarily used to address memory management, not optimize GPU-related render performance. UE5 automatically culls objects by occlusion and camera frustum culling by default, meaning unseen objects aren't called in the draw call. You'd want to use level streaming to load/unload objects from memory, to prevent burdensome memory loads.
And to add to the annoyances of memory management. As far as I am aware, if you have a desk in one streamed level and the same desk in an other streamed level it will count two times in memory if both levels are loaded. As it is unable to reference objects already in memory. So it adds an extra level of things to be aware of if you want to optimize your game even further. So it is better to have objects appearing in multiple close streamed levels in its own level. But going so far in your optimizations is not really necessary nowadays unless you really want to run your game on a potato PC.
Does this mean level streaming is more useful for unloading things like blueprints that have logic running on them or AI opposed to things like a static mesh?
I would say it is an balancing act. And it heavily depends on what your blueprint is doing. If the BP is running on tick it would probably be better to unload it when it is no longer in visual/usable range.
It is a matter of scale. Larger open world maps should be way easier to manage with World Partition. Smaller maps would probably be a bit more easier to use level streaming. But then again World Partition can be used for everything. Is slightly more complicated to learn. Level streaming would become a management nightmare on larger openworld maps.
Ok this is really great tutorial, I assume if I do this on my current existing project it should improved performance by huge? Since my levels are huge also. Thanks
The gain would be in loading the level since you won't be rendering occluded meshes anyway. With less objets loaded into memory, your level will load much faster. Also, if you notice any hiccups when loading big chunks of levels, beware that this only happens when playing in editor, when you play on a proper build, this won't happen (this is an async load, that is not supported in editor). You also have to keep in mind to leave meshes if you are gonna haver AI roaming around, and I find that having lights inside levels that are not persistent sometimes give me errors when building lightmaps.
Brilliant Video, one question if for example you have a complex level in my case its a shopping mall asset, where everything is in one level, whats the best way to break this down into sublevels. If I use collision boxes to load in sub levels the shop interiors would only appear when i overlap, and if the player was to say rotate in place anything behind him will have been unloaded so the contents of the other shops etc would have dissapeared due to unloading.
If you have large collaborative teams or use procedurally generated content at scale you may want to consider World Partition. As of 2024 both Level Streaming and World Partition are part of Unreal Engine LTS. Personally I don't like this Level Streaming workflow at all. It's counterintuitive that Level Streaming is not performed at the pixel level automatically in-engine!, and I can imagine scenarios which attempt to access a Transition Box actor that doesn't exist yet within the current Level Streaming level (ie., engine crash!) or forgetting the handle on- or the placement of a Transition Box (ie., memory leaks), or holding an actor after a transition was made (ie., the pointer to actor returns NULL). Too many edge cases to check here to ensure its proper operation on a workflow which should be performed automatically. Definitely will have to revisit the Unreal source code for this and open up a pull request.
Distance culling just omits objects from the rendering pass, however, they're still loaded into memory. The purpose of level streaming is for memory management, not improving GPU-related rendering performance. UE5 already has default occlusion culling which automatically addresses culling, and you'd want to use LODs or nanite to optimize by distance.
Why makes it so complicated. can't we just use one trigger box to cover the whole room and use a state machine to load and unload other rooms? Just a question
There's no sense in duplicating 'loading' & 'unloading' levels. Don't do that, this unnecessarily overloads your code. Your logic has to be simple in order to be able to debug your code in future.
I initially thought of it but if you have a level that is small, with windows seeing other rooms and multifloors, how would you control specific areas, or lets say upper floor or lower floors?
@@fidel_soto It does with the 3D grid. You can use Data Layers to load/unload your assets if you need granular control, or even dynamically tweak WP's streaming distance based on some triggers placed in the world. Hlods fill in the space outside of your streaming distance by merging meshes together in an offline process.
@@lz4090 For your use case specifically, Epic recommends having a persistent world level and using data layers and level instances inside of it. World Partition can load assets from inside both of those sources into the persistent level.
Recently made a project with an infinite loop using level streaming, this tutorial would've been a life saver!
Best Tutorial Channel on youtube ngl
I enjoy your horror game tutorials, and I eagerly anticipate your videos every time.
Your tutorials are the best. Before i stumbled upon your channel i usually just quit making games as i thought it was not for me, but this itch just kept on telling me to come back, i haven't been this productive since thanks a lot
You can press the F8 key instead of the Start key + click on the icon, to detach from the player controller
We want more of your game!
@@Sabukaaaa more evie devlogs coming very soon :)
btw, you can also use Level Streaming Volumes which are better in some cases
Level Streaming also needs a working and fully savesystem else you reset the unloaded level every time. A save system is the hard part. You also dont need to write logic for streaming levels, you can just use level streaming volumes.
Thanks for the tutorial! Some of my Level had realy bad performance and I never knew how to fix it. Thanks for this great tutorial!
OHH YEAH, NEW GUIDE!🥳
thank you for the video! learning alot rom you as an unreal engine newbie
Sorry for multiple commands, you know when you load/unload based o position, especially I am using VR in archviz, Problem is rotating camera make problem and u have to load many things on yet because still user could rotate back side and you have to make them already loaded, but if you able make something like camera view load or some part based on distance, the performance will be much better.
Great quality ! usefull info ! Thanks for that
Amazing videos! Thank you
One more thing to add. Please do smooth camera zoom in and out as I have not seen others do it without using clamp which produces jittery.
Important note on purpose of level streaming:
Level streaming is primarily used to address memory management, not optimize GPU-related render performance. UE5 automatically culls objects by occlusion and camera frustum culling by default, meaning unseen objects aren't called in the draw call. You'd want to use level streaming to load/unload objects from memory, to prevent burdensome memory loads.
And to add to the annoyances of memory management. As far as I am aware, if you have a desk in one streamed level and the same desk in an other streamed level it will count two times in memory if both levels are loaded. As it is unable to reference objects already in memory. So it adds an extra level of things to be aware of if you want to optimize your game even further. So it is better to have objects appearing in multiple close streamed levels in its own level. But going so far in your optimizations is not really necessary nowadays unless you really want to run your game on a potato PC.
Does this mean level streaming is more useful for unloading things like blueprints that have logic running on them or AI opposed to things like a static mesh?
I would say it is an balancing act. And it heavily depends on what your blueprint is doing. If the BP is running on tick it would probably be better to unload it when it is no longer in visual/usable range.
I have question, as im beginner i cant really decide, what should i use for better optimization, Level Streaming or World Partition with Data Layers?
It is a matter of scale. Larger open world maps should be way easier to manage with World Partition. Smaller maps would probably be a bit more easier to use level streaming. But then again World Partition can be used for everything. Is slightly more complicated to learn. Level streaming would become a management nightmare on larger openworld maps.
Commenting for the algorithm
THIS IS GREA SO THANKFUL! but please do not move your camera too much it makes me dizzy haha great tutorial
thank you for offering your knowledge
Isn't that the same thing as Occlussion culling but manual?
Actually it is.
Ok this is really great tutorial, I assume if I do this on my current existing project it should improved performance by huge? Since my levels are huge also. Thanks
The gain would be in loading the level since you won't be rendering occluded meshes anyway. With less objets loaded into memory, your level will load much faster. Also, if you notice any hiccups when loading big chunks of levels, beware that this only happens when playing in editor, when you play on a proper build, this won't happen (this is an async load, that is not supported in editor).
You also have to keep in mind to leave meshes if you are gonna haver AI roaming around, and I find that having lights inside levels that are not persistent sometimes give me errors when building lightmaps.
This is a good idea
but why u not use Distance Culling and make a tutorial about it?
Brilliant Video, one question if for example you have a complex level in my case its a shopping mall asset, where everything is in one level, whats the best way to break this down into sublevels. If I use collision boxes to load in sub levels the shop interiors would only appear when i overlap, and if the player was to say rotate in place anything behind him will have been unloaded so the contents of the other shops etc would have dissapeared due to unloading.
If you have large collaborative teams or use procedurally generated content at scale you may want to consider World Partition. As of 2024 both Level Streaming and World Partition are part of Unreal Engine LTS.
Personally I don't like this Level Streaming workflow at all. It's counterintuitive that Level Streaming is not performed at the pixel level automatically in-engine!, and I can imagine scenarios which attempt to access a Transition Box actor that doesn't exist yet within the current Level Streaming level (ie., engine crash!) or forgetting the handle on- or the placement of a Transition Box (ie., memory leaks), or holding an actor after a transition was made (ie., the pointer to actor returns NULL). Too many edge cases to check here to ensure its proper operation on a workflow which should be performed automatically. Definitely will have to revisit the Unreal source code for this and open up a pull request.
Isn’t it easier/same doing the distance culling volume?or what its called?
Distance culling just omits objects from the rendering pass, however, they're still loaded into memory. The purpose of level streaming is for memory management, not improving GPU-related rendering performance. UE5 already has default occlusion culling which automatically addresses culling, and you'd want to use LODs or nanite to optimize by distance.
A tutorial on the inventory system..... plss
Also is that use Sublevels loading based on eg Character position not camera position?
Any thought on making a tutorial on fps mechanics?
bro i have a crush on you at this point
😑
Thanks, is there any way to Load/Unload based on camera view like raycast using etc?
My trigger box doesn't allow for a reference in the level blueprint, it's not there. I have it selected but no reference shows when in the level BP
We all are waiting for an inventory system
pls
best tutorials on UA-cam
yes pleaseeeeee
Does it Work with baked lighting?
Does Gpu Lightmass bake everything and then simply you call it By level Streaming?
So no problem?
Why makes it so complicated. can't we just use one trigger box to cover the whole room and use a state machine to load and unload other rooms? Just a question
Do the different trace channels still work through the "different" levels. Can the player use trace by object if the object is in the other level?
will this system have an impact on multiplayer?
Does Level Streaming Lower details? Can we have Max Quality?
Because it says Level "Streaming"
more video pls ....
So So Thanyou
shift + f1 not windows key
There's no sense in duplicating 'loading' & 'unloading' levels. Don't do that, this unnecessarily overloads your code. Your logic has to be simple in order to be able to debug your code in future.
Please stop using Level Streaming. Epic has dropped support for it. World Partition is the way forward, so get on the bandwagon.
Do you have a source? I’d like to read more on this
I initially thought of it but if you have a level that is small, with windows seeing other rooms and multifloors, how would you control specific areas, or lets say upper floor or lower floors?
@@lz4090 that's a pretty good question. Does world partition support verticality?
@@fidel_soto It does with the 3D grid. You can use Data Layers to load/unload your assets if you need granular control, or even dynamically tweak WP's streaming distance based on some triggers placed in the world. Hlods fill in the space outside of your streaming distance by merging meshes together in an offline process.
@@lz4090 For your use case specifically, Epic recommends having a persistent world level and using data layers and level instances inside of it. World Partition can load assets from inside both of those sources into the persistent level.
Interesting but you need to fix your word salad. Soooo many annoying filler phrases