Hytale Modding
Hytale Modding
World GenerationTechnical Hytale Generator

Positions Provider

Determines an infinite 3D positions field.

Positions Provider

TriangularGrid2d

Generates a 2D infinite triangular mesh of positions with a distance of 1 block between them.

Parameters: None


SquareGrid2d

Generates a 2D infinite square mesh of positions with a distance of 1 block between them.

Parameters: None


SquareGrid3d

Generates a 3D infinite square mesh of positions with a distance of 1 block between them.

Parameters: None


Scaler

Scales the child Positions.

Parameters:

NameTypeDescription
PositionsPositionProvider slotPositions to scale.
Scale3D decimal vectorDetermines the scale.

Jitter2d

Adds jitter along the x/z plane.

Parameters:

NameTypeDescription
PositionsPositionProvider slotPositions to jitter.
Magnitudedecimal numberThe maximum distance each position is allowed to travel from its original place when jittered. The actual movement distance is random for each position between 0 and the Magnitude.
SeedstringDetermines the direction and distance applied to each position.

Jitter3d

Adds jitter in all directions.

Parameters:

NameTypeDescription
PositionsPositionProvider slotPositions to jitter.
Magnitudedecimal numberThe maximum distance each position is allowed to travel from its original place when jittered. The actual movement distance is random for each position between 0 and the Magnitude.
SeedstringDetermines the direction and distance applied to each position.

Clusters

Generates clusters of positions anchored by a Distributor PositionProvider. The cluster size is determined by the ClusterBounds, and the cluster contents are determined by the Cluster PositionProvider.

The Cluster PositionProvider receives the cluster's position as an anchor.

Parameters:

NameTypeDescription
ClusterPositionProvider slotPositions making up the cluster.
DistributorPositionProvider slotEach cluster is anchored to one of these positions.
ClusterBoundsBoundsThe maximum size of a cluster around its anchor.

List

Allows you to manually define a static list of positions in world coordinates.

Parameters:

NameTypeDescription
Positionslist of 3D positionsEach entry contains X, Y, and Z.
Positions[].Xinteger
Positions[].Yinteger
Positions[].Zinteger

Anchor

Anchors the origin of the child Positions field to the contextual Anchor, if one exists. For a contextual Anchor to exist, a parent of this node must produce an Anchor.

You can also reverse the effect later in the chain to move the origin back to the world’s origin, as in the screenshot below.

Parameters:

NameTypeDescription
PositionsPositions slot
ReversebooleanIf true, reverses the origin of the child back to the world’s origin (or to the origin before the previous Anchor node).

Bound

Limits the positions to a bounded region.

Info

This can limit an infinite mesh for use as spawn points.

Parameters:

NameTypeDescription
Boundsdecimal bounds 3D

FieldFunction

Enables masking out positions using a Density field. The delimiters determine the regions of the Density field where positions are kept.

Parameters:

NameTypeDescription
FieldFunctionDensity slotSlot for a Density input.
Delimiterslist of delimitersList of Density value delimiters.
Delimiters[].Mindecimal numberLower bound of the delimiter.
Delimiters[].Maxdecimal numberHigher bound of the delimiter.
PositionsPositionProvider slotThe positions on which the mask is applied.

Occurrence

Discards a percentage of input positions based on a Density field. The value of the Density field at each position determines the chance that the position is kept.

  • Positions where the Density value is less than or equal to 0.0 have a 0% chance of being kept.
  • Positions where the Density value is greater than or equal to 1.0 have a 100% chance of being kept.
  • Positions where the Density value is between 0.0 and 1.0 have a proportional percentage chance of being kept. Example: 0.4 → 40%.

Below is an image showing a simple noise field used to create regions with rare oak trees and regions with dense oak trees.

Example of Occurrence PositionsProvider

Example of Occurrence PositionsProvider2

Parameters:

NameTypeDescription
FieldFunctionDensity slotDetermines the chance of keeping the positions.
SeedstringDetermines the outcome.
PositionsPositionProvider slot

Offset

Offsets the positions by the vector.

Parameters:

NameTypeDescription
Offset3D decimal vectorOffset vector.
PositionsPositionProvider slotPositions to offset.

VectorOffset

Offsets each position by their respective vector.

The MovementBounds limit the possible movement of each position. The position doesn't move if the vector points outside its MovementBounds.

Parameters:

NameTypeDescription
PositionsPositionProvider slotPositions to offset.
VectorProviderVectorProvider slotOffset vector.
MovementBounds3D decimal boundsThe bounds each position is allowed to move relative to its origin.

BaseHeight

Vertically offsets the Positions inside the configured vertical region by the number of blocks determined by the referenced DecimalConstant.

A typical application of this would be to grab Positions at Y: 0 and offset them up by the DecimalConstant to get closer to a terrain feature. Further adjustments can then be made using an Offset PositionsProvider node.

Parameters:

NameTypeDescription
BaseHeightNamestringName of the DecimalConstant to reference.

Union

Combines all positions into a single Positions field.

Parameters:

NameTypeDescription
Positionslist of PositionProvider slots

SimpleHorizontal

Keeps only positions within the provided Y range.

Parameters:

NameTypeDescription
RangeYdecimal numberThe Y range to keep the positions in.
PositionsPositionProvider slot

Cache

Caches the output provided by the Positions slot to improve performance in certain situations. This asset can be useful to improve performance when a Positions asset is expensive and queried numerous times.

How effective this Cache is depends heavily on the use case, the provided child Positions asset, and the order in which it is queried. You can get the best performance out of this Cache asset by trial and error. An example of a good use case for this asset is at the root of an expensive Positions tree used by a Positions2D/Positions3D Density node.

I recommend that you don’t use this cache everywhere in your Positions trees, but instead place it at (or close to) the root of your Positions asset tree. That said, feel free to experiment.

This cache functions by saving 3D sections of space containing the Positions (points) generated by the child slot. The sections are cubes, and their size is determined by the asset’s SectionSize parameter. The number of sections allowed to be saved in the cache is determined by the CacheSize asset parameter. A safe starting value for the SectionSize parameter would be 32, and a safe starting value for the CacheSize would be 50.

Parameters:

NameTypeDescription
SectionSizeinteger (> 0)Determines the side length of each section cube, in blocks. A safe starting value is 32.
CacheSizeinteger (>= 0)Determines how many sections can be saved in memory. A safe starting value is 50. If set to 0, the cache is ignored and positions are sourced directly from the child slot.
PositionsPositionProvider slotThe output of this Positions asset is cached.

Imported

Imports an exported PositionsProvider.

Parameters:

NameTypeDescription
NamestringThe exported PositionsProvider.