The Terrain Graph
Voxel Weaver's Terrain Graph allows you to customize how your worlds are generated using a node-graph based interface. For a basic example of how the Terrain Graph can be used, check out our step-by-step tutorial. For a full list of nodes and their functions, see the node reference.
The Terrain Graph is a very powerful system that can be used to create almost any terrain you can imagine, and experimenting with different combinations of nodes is a lot of fun. In order to make full use of Terrain Graphs, however, it is important to know a little bit about the mathematics of signed distance functions(SDFs) and the marching cubes algorithm at the heart of Voxel Weaver.
A brief introduction to SDFs
A signed distance function, or SDF, is a function that takes a point in space and returns the so-called signed distance to a surface. The signed distance is defined to be positive outside the surface, negative inside the surface, and zero at the surface, as seen in the following diagram:
SDFs are the heart of Voxel Weaver's terrain generation. By constructing a mesh where the SDF is zero - that is, at the surface of the terrain defined by the SDF - Voxel Weaver is able to generate arbitrary terrain.
NOTE: It is important to point out that Voxel Weaver's SDFs don't give the true Euclidean distance to the surface, since that would make it impossible to efficiently generate many types of terrain(eg heightmap-based terrain). Voxel Weaver's pseudo-SDFs only need to satisfy two properties: 1) They are positive outside the surface, negative inside the surface, and zero at the surface, and 2) They are continuous. You won't need to worry about this for most things, but it is important to keep in mind if you are doing any advanced SDF math.
All Terrain Graph nodes implement various mathematical operations that can be combined into the SDF that creates your terrain.