Skip to content

Runtime Edits & Sculpting

DANGER

This feature is in its first iteration, and is experimental!

General API

To be able to sculpt the world at (at runtime or in editor), a Height/Volume Sculpt Actor needs to be placed in the world. This can be configured with a layer and priority just like a Voxel Stamp would.

Image

To apply sculpts at runtime, get a reference to this actor (using a Get Actor of Class node, for example). From there, sculpt operations can be applied using functions on that actor. To see all available functions, drag out from the actor's pin and look in the Voxel section of the node search menu.

INFO

Each Sculpt function exists in an Async version as well as a regular one. The regular one will execute instantly, but will block the game thread; it may cause hitching, especially when making large modifications.

The Async version will run in the background. This means the results won't be visible immediately, but it won't cause any hitching.

Gameplay Effects

There is not currently a framework for any type of gameplay effects based on sculpting. It is not easily possible to know, for example, how much terrain a Remove Sphere call actually removed. This is something we hope to add in a future release.

Physics simulation (detecting and dropping floating or poorly supported pieces) is not supported.

Saving & Loading

Runtime edits can easily be saved and loaded using the Get Save and Load from Save functions. This data easily be wired into the standard Unreal save/load framework.

Image

Multiplayer & Replication

Runtime edits are not replicated out of the box. They need to be manually replicated using RPCs, the same way any other gameplay code is replicated.

There is not currently any easy way to send the entire edited world state to a player who joins mid-session. It is possible to use the Get Save function to obtain the edit data, and manually replicate that, but this quickly overflows the RPC limit. We intend to make this easier in the future.

Sculpt Graphs

WARNING

Sculpt Graphs are currently a work-in-progress. They do not currently support surface type or metadata modifications.

Custom sculpt behaviors can be implemented using Voxel Graphs. Graph parameters can be set as needed.

INFO

Make sure the bounds in Volume Sculpt Graphs are slightly bigger than the radius of actual change.

Image