Is there a way to make world partition a 3D grid instead of 2D?

As the topic says: I’m trying to make planet-like world, but the world partition is just a 2D grid, which at least by default do not take into account the Z axis of an object :frowning:

According to my experience, if the answer have not been found in 2-5 minutes, than it is not supported :slight_smile: so maybe some of you can point me into the right direction on how to optimize memory usage in the planet/solar system-like worlds? I mean, there should be a way to completely unload objects from memory, that are too far away… or is this even possible with unreal engine?

No.
And you need octree to have proper 3d based reduction.

Code a custom system in c++ - or find an engine that has something in place.
For instance:

1 Like

I’d better write an engine from scratch, than use cryengine :slight_smile:

But one thing came into mind: what about level streaming? I mean, i can write a manager, that could be responsible of loading appropriate levels in time, and with level streaming it is possible to add actors to sub levels at runtime, which is another project requirement. But i’m wondering how bad is the level streaming in terms of performance when compared to world partition? By the way, in my case dead space is what is going to take most of the space in the persistent level, so the level streaming could be a decent solution, but i have never used it before so…

I dont see why.
Cryengine is eons above anything unreal engine has ever been.
Works better, renders way better, values performance, addresses bugs timely, etc.

Unless you are working at a gamejam or someone is paying you to use this sorry excuse of an engine, there is really no reason to.

Most if not all methods of built in culling management included in the engine are 2d only.
Even streaming.
Or even worse, based on mesh size on screen.

Usually, the loading/unloading is custom scripted by proximity to a doorway.
As in, you manually load the inside level of a house as the player approaches either a door or a window to look in from.
If you do proper level design, you do the loadong at choke points - this usually results in hangs between levels seen even in AAA titles (god of war for instance. Most level changes happen when passing between a tight wall or raising a doorway).

You can create a manual load/unload system in c++, and you can merge those calls into an octree system which can properly manage loading/unloading of things.

It isn’t that difficult, but it is a bit confusing.
Particularly since almost all the pre-built async methods are show stoppers that cause game thread hangs anyway.

Overall, it may just be better for you to set each level up with a distance from player calculation. It really depends on what you are doing.

For instance, take as an example an apartment complex.

If you are at ground floor, there is no reason to keep the second floor loaded.
As the player/camera goes up the stairs, you may want to load the level above.
Further, you may want to avoid loading the interior of all the apartments in the level, and only load whatver the player is physically adjacent to.

The default level streaming will load all floors or levels of the apartment building, simply based on player x/y position witnin the level.

Note that in almost all cases with an apartment, fustrum culling will prevent the items from being visible - but you can potentially overload memory with a skyscraper and 90 floors…

1 Like

You can use level streaming volumes, that would work with the floors…

2 Likes

if they’re clearly separated with only a few entrances then Data Layers could be interesting.

2 Likes

Yeah, data layers looks interesting too, but i have not found a solution to add actors to a data layer at runtime :frowning:

why do you need to add them during runtime? would spawning be an option? (possibly storing newly spawned actors in a save game or something to respawn them later)

Players will be deciding what actor and where they are going to place. Something like a build system. So i need to have a way to effectively unload these, when the actors are no longer relevant

For anyone finding this thread in the future, it appears that as of 5.4, World Partition does support 3D grids:

https://portal.productboard.com/epicgames/1-unreal-engine-public-roadmap/c/1233-world-partition-runtime-hash-with-3d-grid

https://dev.epicgames.com/community/learning/knowledge-base/r6wl/unreal-engine-world-building-guide#wp-importantchangesin54

2 Likes