Populations
2 nodes
On this page 2
Populate Terrain
FunctionPlaces species over a terrain, each in turn: Poisson-disk spacing thinned by its density and mask, off slopes too steep for it and out of water, clear of the species placed before it. The same seed places the same things.
Signature
Populate -> Terrain Population
terrain: Scalar Field
species: Population Species Array
analysis: Terrain Analysis Maps
seed: Integer
maxInstances: IntegerTerrainPopulation Populate(
ScalarField2D terrain,
PopulationSpecies[] species,
TerrainAnalysisMaps analysis,
int seed = 1337,
int maxInstances = 400000)Parameters
| name | type | default | description |
|---|---|---|---|
| terrain | Scalar Field | — | Heights in metres, with their metres per cell. |
| species | Population Species Array | — | The species, the first placed first: trees before the rocks that keep out of their way. |
| analysis | Terrain Analysis Maps | — | An erosion's maps and the water, which the species' masks read by name; nothing but a water species stands in the water. |
| seed | Integer | 1337 | Where the random draws start. |
| maxInstances | Integer | 400000 | The most placed in all. |
Returns
| Population | Terrain Population |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Populations
- Package
- Procedural Generation
Population Species
FunctionOne kind of thing to place, and the rules it is placed by.
Signature
Species -> Population Species
model: Population Model
spacingMetres: Number
density: Number
mask: Terrain Mask
maxSlopeDegrees: Number
minScale: Number
maxScale: Number
clearanceMetres: Number
variants: Integer
inWater: Truth
name: TextPopulationSpecies Species(
PopulationModel model = PopulationModel.Pine,
double spacingMetres = 6,
double density = 1,
TerrainMask mask,
double maxSlopeDegrees = 35,
double minScale = 0.8,
double maxScale = 1.2,
double clearanceMetres = 1.5,
int variants = 4,
bool inWater = false,
string name = "")Parameters
| name | type | default | description |
|---|---|---|---|
| model | Population Model | Pine | What it is drawn as. |
| spacingMetres | Number | 6 | The least distance between two of it, metres. |
| density | Number | 1 | How full the room the spacing leaves is filled where the mask is full: 1 as close as the spacing allows. |
| mask | Terrain Mask | — | Where it grows, from the terrain masks; everywhere when left out. |
| maxSlopeDegrees | Number | 35 | The steepest ground it stands on, degrees. |
| minScale | Number | 0.8 | The smallest it is drawn, against the model's own size. |
| maxScale | Number | 1.2 | The largest it is drawn. |
| clearanceMetres | Number | 1.5 | How far from each of these the species placed after it keep, metres. |
| variants | Integer | 4 | How many different shapes of the model are made. |
| inWater | Truth | False | Whether it may stand in water. |
| name | Text | — | Its name. |
Returns
| Species | Population Species |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Populations
- Package
- Procedural Generation