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:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-526f1ce3e1d26a62c33f1b6169300a39bf11d798%252FdduZvi2.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=4f89b1d2&sv=1)
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:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-9ae23a849bb3b51714178011f0b94ef2471e35b7%252Fo129W5v.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=373d393c&sv=1)
To prevent seams between chunks of different LODs, transition meshes are used:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-09858f6e8459342eb0803c268d9c1ae4798850c3%252F1AkOI0w.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=49fbb3f5&sv=1)
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.
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-02c8af5e73371fb387955a425970afb3413c4d30%252FL0z1Hm3.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d54c88f3&sv=1)
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):
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-cb0e31d139ad981b43ce574176e68456ef2c59f0%252FPRlr56v.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=78baa404&sv=1)
If you set World Size to 2048:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-74b6a25cdf9b56bb8dedbe786b08fd474fc9e8a4%252FvvGq6JX.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=b485da&sv=1)
The world bounds are now tightly fitted to the planet, allowing to use a low Max LOD, such as 2 here:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-bd69e4eed910341167f3f80d794cba95c01a153f%252FVTtstUw.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e4902512&sv=1)
Voxel Invoker Components
You should add a Voxel Invoker Component to your pawn. The easiest is to add a Voxel Simple Invoker Component:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-56179332e52d6ce5a29fbab20b1b90cfc3489c78%252Fnp9yX8I.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=a3c07b35&sv=1)
The invoker component has several properties that you can configure, check their respective tooltips:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-36225273daadc6829c54ec8a9724b09675cf104b%252FMqh86oS.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=de35fd1e&sv=1)
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.
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-ec5b179f2a0477bd4b5eb53f4c9615f2ba27e2d0%252F7FvtEoS.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=803271da&sv=1)
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-f23bc56b189487dd82354e3faf9583a76fe4b70b%252FImK1PQX.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=fcbcf587&sv=1)
Debugging
You can see the active invokers using voxel.ShowInvokers 1.
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-07ebd3b824ee49edec56d6d5ce80e56d46183127%252FlO6XcTc.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=9130f81e&sv=1)
LOD Updates
The LOD Octree is rebuilt when an invoker moves more than Invoker Distance Threshold:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-f1eb8159c58a8a3d0fb8af76d1752eaf9862bed9%252F3eYq8f5.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=1c5a9bcf&sv=1)
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:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-0662c0c7cc2cb85309c0ec27c08228af3670d89a%252FvSaOG8j.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=7a870c1d&sv=1)
Changing LOD settings at runtime
If you change your voxel world LOD settings at runtime, you need to call Apply LOD Settings:
![](https://docs.voxelplugin.com/~gitbook/image?url=https%3A%2F%2F4275809322-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FO4LAZ8J6QCpYVrmxy1j0%252Fuploads%252Fgit-blob-02921f01577ddb38b52690af446d8a298d41bda0%252F9jEGFPG.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=36469958&sv=1)
Last updated