Can you give a brief intro to what an object container is?
TL;DRAn object container holds a hierarchy of objects on top of a unified zone partitioning system and can be streamed in and out dynamically, like a level inside a level, which capital ships and universe streaming need.
There's kind of a lot to talk about with object container streaming, but just the basic idea of an object container, and it sounds so simple, it's like, oh, didn't that exist already? It's literally a container with objects in it, right? Sure, but you could say that a prefab or an archetype was kind of the same sort of thing before, or just a group of entities. Why don't you just group them together and call that an object container? Well, it's kind of not that simple, because the CryEngine had a bunch of different spatial partitioning systems within there. The physics system had one. Render has one. There's a bunch of different ones. So the zone system, this is getting to be a very unsexy explanation, but the zone system was the unification.
But at the same time, it is some of the sexiest stuff, right? It's the stuff you don't see.
It's the stuff that you don't see, but it takes so much work. A zone partitioning system is not hard. It's hard to make them fast. And it's hard to get them to talk to each other if they're different. So what we had done was first get the zone system online, and you've probably heard a lot about that. But what that is is a more advanced partitioning system that actually unifies them all across all the modules. So physics uses the same as the render uses, the same as this. So then you've got to embed those partition systems into a container of sorts that composes a bunch of assets. Now, you might have multiple zones within that one object container, but you've got to load them all at the same time, basically. So an object container is exactly like what Forrest is saying. It's a container for objects. But what we have to be able to do is stream them in and out without keeping them in memory. Basically, on level load, we can't have them all there. That's the thing. So we need to be able to stream them in and out dynamically. We can do it with prefabs. We can do it with entity archetypes, but nothing to the scale of the object containers. We can do it with small-scale ones right now, but it's a little bit slow when it gets pretty hefty. So that's what Steve Humphreys has been working his rear off on, so that streaming is actually very quick and it gets all those assets.
And the type of objects that go into the container, a great example is the space station. Those things could be massive and we need to efficiently stream those in, right?
Sure, and it's not just the station asset, it's the shop in it, the character in it, the gun that he's holding, the attachments on the weapon that he's holding. So there's a huge hierarchical load that has to happen. A lot of this, in CryEngine conceptually, you would do all on level load.
It's almost like in the past you worked with level streaming, and we need to go so far past that because we're endless. We needed to stream objects in, and it's almost like they are levels. So it's almost this incredibly impressive level streaming system with a level inside of a level.
Right, that's exactly how I explain it now too. If anybody had worked on a CryEngine project or worked in the CryEngine before, or even in any other level editor, the object container is the equivalent of just that level, but it exists in the paradigm of a larger level. It's pretty close, but again, the object container thing, it's essential for capital ships, it's essential for universe streaming, so being able to go from planet one to planet two with whole cities on them and all this kind of stuff. And that's how it's all going to work.