Arma 3 Scripting

Terrain Processor: Area: Random

Topic · Markdown · JSON · original wiki page

Task details

Task name : Area: Random

Dll plugin name : BITasksPlugin.dll

Geometry type : Polygon, PolygonM, PolygonZ

Heightmap : No

Description

Random placement of multiple objects inside the polygons specified in the given shapefile. Very easy, random positions only two conditions - probability and minimal distance from another objects.

Task parameters

Object prototype parameters

Usage

This algorithm is very simple, it generates random positions in area with given density. You can use it for forests with clustering or stones in open terrain.

Algorithm

For each shape (areal) do :

  1. instances_count = HECTARES * DENSHA
  2. For instances_count try to find position :
    1. Random position in bounding box.
    2. If position is inside shape, continue to c. else a.
    3. Test with objects if minimal distance is ok then add new random prototype instance in output and a else a.

If this loop a <-> c has no new output for last 100 attempts, area is full and iteration of this shape will end.