World Size and Level Of Details

The plugin support worlds up to 2147483648 x 2147483648 x 2147483648 voxels, with dynamic Level Of Details (LOD).

Such world sizes are made possible by the plugin on-the-fly generation system: world generators are only queried when needed, and if a chunk LOD is more than 0 then not all the data in the chunk needs to be queried.

As such, computing a low resolution chunk of a large area is relatively cheap.

Having a huge world with the plugin is also relatively cheap thanks to LODs.

Configuring the World Size

The voxel world size can be configured in its details:

LOD System Basics

The voxel world knows which LODs to render using Voxel Invoker Components.

An invoker component is basically a component that tells the voxel world there is a player/npc here, it needs to have a nicely looking mesh/needs to have collisions.

If no invoker components are present in the scene, the voxel world will spawn one that follows the active camera.

In addition to placing invokers, you can also use the Max LOD property on your voxel world to force LODs to not be too low res. See Making your world look good from afar below for more details on that.

The invoker components will tell the voxel world which sections of the world needs to be high resolution. Then, the voxel chunks resolution will decrease by powers of two:

Chunks are initially 32x32x32, then at LOD 1 64x64x64, LOD 2 128x128x128...

You can clearly see the subdivision pattern on the flat world below:

To prevent seams between chunks of different LODs, transition meshes are used:

Making your world look good from afar

You need to decrease your voxel world Max LOD property as much as possible. Be careful! If you decrease it too much, you will get an error and the voxel world won't render.

Make sure that your World Size is as small as possible. You can check it using the voxel.ShowWorldBounds 1 command.

For example, the Planet voxel world is way too big by default (World Size = 1048576):

If you set World Size to 2048:

The world bounds are now tightly fitted to the planet, allowing to use a low Max LOD, such as 2 here:

Voxel Invoker Components

You should add a Voxel Invoker Component to your pawn. The easiest is to add a Voxel Simple Invoker Component:

The invoker component has several properties that you can configure, check their respective tooltips:

Invoker Component With Prediction

Use this component if you have a fast moving character: it will be placed slightly in front of your character to generate LODs where your character will be in the future.

Custom Invoker Component

You can create your own invoker component in C++ or blueprint by inheriting from ```UVoxelInvokerComponentBase```.

You will need to implement GetInvokerVoxelPosition, GetInvokerSettings and optionally IsLocalInvoker.

Voxel LOD Volume

A Voxel LOD Volume is a voxel invoker that uses a volume to determine where it should be applied.

It can be used to force a part of your world to always stay under a fixed LOD (eg if you have a landmark), or to enable collisions/navmesh in a specific zone.

Debugging

You can see the active invokers using voxel.ShowInvokers 1.

LOD Updates

The LOD Octree is rebuilt when an invoker moves more than Invoker Distance Threshold:

However, if you have a world with the highest resolution LOD everywhere, your LODs are never going to change.

You can save some CPU time by ticking the Constant LOD option:

Changing LOD settings at runtime

If you change your voxel world LOD settings at runtime, you need to call Apply LOD Settings:

Last updated