Skip to main content

Errant Instance Interaction

ยท 3 min read

image

Since the release of Errant Biomes, many users have asked how to interact with instanced meshes spawned by the procedural generation - for example, how to implement chopping down a tree. While mesh instancing is crucial for performance, it presents a limitation: individual instances cannot be easily interacted with in gameplay.

To solve this, we developed Errant Instance Interaction (EII) - a new plugin designed to facilitate implementing interaction with instanced meshes in Unreal Engine.

EII solves this problem by dynamically converting mesh instances into interactable actors when needed. For example, when a player attempts to chop down a tree, EII replaces the static mesh instance with an actor that implements logic for chopping down a tree. EII can also convert an actor back to the instance, if the interaction didn't happen.

While the concept is straightforward, making it work seamlessly required addressing three main challenges:

Streaming and World Partitionโ€‹

In large, open worlds, Unreal Engine dynamically loads and unloads sections of the map using World Partition and in the process discards all the modifications made to those actors, including the past interactions. EII solves this by reapplying the past interactions onto meshes as soon as they are loaded.

Runtime Procedural Generationโ€‹

Some instanced meshes - such as dynamically generated foliage - are spawned at runtime and exist only temporarily. This is the case for grass, bushes, or rocks spawned by Errant Biomes Runtime Spawning. EII is able to track such meshes and reapply the past interactions to them when needed. This feature depends on upcoming improvements in Errant Biomes, which will be introduced in its next release.

Multiplayerโ€‹

EII fully supports multiplayer for instanced meshes saved as part of the level, as well as meshes dynamically spawned by the server.

However, Errant Biomes Runtime Spawning currently relies on GPU-based generation, which runs exclusively on clients. As a result, EII's multiplayer support for this scenario is limited. The next release of Errant Biomes will allow EII to synchronize interactions with runtime-spawned meshes in Listen Server games. Dedicated Servers will remain unsupported for now, until we implement a CPU-based generation fallback for cases where a GPU is unavailable.


Errant Instance Interaction is available to users who own Errant Biomes or Errant Paths plugins and have access to the latest updates. You can download it from your license page. To learn more about integrating EII into your Unreal Engine project, check out our documentation.