Procedural (un)loading of content based on nearby avatars


#1

Everyone probably knows about Minecraft or similar voxel engines (such as Minetest). One of the most impressive features in MC is the ability to have enormous worlds, which can theoretically be times larger than the surface of Earth in real life. This amazing feature is possible because the engine only loads those parts of the world which are within a player’s field of vision. If it were to load all voxels and all entities in the world at once, MineCraft would require an extremely powerful processor and perhaps hundreds of gigabytes of RAM… therefore you could only build very small worlds in it. Which is precisely the case in Second Life: The server activates all primitives in a region as well as the scripts on them, regardless whether an avatar is around or not… perhaps the primary reason why SL regions were limited to 256 x 256 meters.

I’d like to know if Hifi supports or will ever support an approach similar to MineCraft. What I’m thinking about more precisely is this: Entities as well as voxel groups could have a special property, which determines if they are active all the time or only when within the field of vision of an avatar. If disabled, the object and its model / scripts are always loaded and kept active by the region server… useful for stuff which contains scripts you always want active in your world. If enabled, the server only loads them when an avatar gets close enough to see them, then unloads them once no more avatars are nearby. While unloaded, the object and all its properties are only stored in the world database on the drive, meaning it’s not processed by the server and uses no CPU or RAM whatsoever.

If this ability is or can be implemented, it would allow people to create huge worlds on a single machine, without processor or memory being a limitation! Such as Minecraft sized landscapes that are procedurally generated and can be endlessly explored, or cities of real life proportions using mesh objects. What are your thoughts about realtime loading / unloading of objects based on zones?


#2

Default Minecraft uses chunks of 16x16x(Depth of world) scaled to meter. Currently, the voxel groups that can be made with high fidelity, as of the moment can support upto 32x32x32 per entity, scaled individually.

You could write a generator script that that would creates the voxel chunks independently to create a terrain. After all we use scripts to modify the terrain as of the moment. The chunks can be scaled at any resolution and then use running cube to make everything smooth. Its just a matter of writing the script to do it. This means per domain we could have 16km x 16km up and down procedurally generated terrain. With the second voxel entity value still in the air however, we are not yet quite sure how to do specific materials per voxel. The voxel data ive seen is based on base64, but i have yet decoded it, but its probably quite straight forward

See https://alphas.highfidelity.io/t/voxels-are-back-ish-report-list-of-suggestions-for-devs/6599/.

Unloading is already naturally done by distance, and LOD levels can be maintained by the client rendering the voxel information only to a specific level depending on distance.

We have to remember thought, as of the moment the voxel infromation is storedin the domain server instead of externally, so this may increase traffic domains. Would love to be able to export this and host them else where as well / refer to same voxel information to create reusable structures or shapes.


#3

Sorry for the late reply, apparently email notifications are failing for me. That new voxel system looks amazing and brilliantly implemented! It should indeed solve my question as well on how this would be possible… thank you.


#4

Hello,
I’m suffering a problem on loading content, described here:

Do you know what’s could be the reason?

Thanks.