Connected Voxels

Modified on Fri, 14 Jul 2023 at 06:18 PM

Connected Voxels is a powerful feature that allows you to define custom rules to change the voxel type when placing new voxels in the scene or during rendering. It's similar to Connected Textures but changes the entire voxel definition, not only the texture.


This feature is useful to build fences for example, where corners or intersections require the use of another voxel definition or prefab.


This can also be used to create customized or stylized terrain slopes.


To start with, you need to create a Connected Voxel asset:




Then, customize the Connected Voxel settings:



- Voxel Definition: specify the voxel definition affected by this rule set.


- Rule Event: specify if the rules should be applied when placing a voxel manually or when rendering:

- When Placing: the placed voxel will actually change according to the rules.

- When Rendering: the placed voxel is not changed, but it will be rendered using another voxel definition. Since the chunk contents are not changed, you can use this mode to skin or generate visual variations for the same voxel definition (ie. curved slopes on terrain, etc.)


- Configuration: one or more rules that are evaluated in order. There are 8 a match dropboxes, surrounding the placement position where you can specify if that position should contain a voxel of the same type (Equals), a different one (NotEqual), if it should be empty (Empty), non empty (NonEmpty) or Anything (default value).


- Action: there're 4 actions: Nothing (placement is cancelled), Replace (places another voxel definition instead), Cycle (places one voxel from the list in sequence) and Random (picks a random voxel from the list).








Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article