Fandom

武装突袭 Wiki

Terrain Processor: Line: Random

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Task details

Task name : Line: Random

Dll plugin name : BITasksPlugin.dll

Geometry type : Polyline, PolylineM, PolylineZ

Heightmap : No

Description

Random placement of multiple objects on linear shapes specified in the given shapefile. Very easy, random positions only one condition - minimal distance from another objects.

Task parameters

  • RANDOM SEED - number used to initialize pseudorandom number generator.
  • MAXDISTANCE - maximal object distance from centreline.
  • DENSHA - The density of the filling in number of objects for hectare. For example 100 objects for hectare means an average distance of about 10 meters between objects.
  • Spline interpolation - Use bezier spline instead of original polyline.

Object prototype parameters

  • OBJECT - Object's prototype name
  • PROB - Object's probability
  • MINHEIGHT - Minimal size in %
  • MAXHEIGHT - Maximal size in %
  • MINDIST - Minimal distance in meters

Usage

Very simple algorithm, it places objects randomly on linear shape. Can be used for sparse positioning of trees along a line, or for creating random strings of bushes (e.g. in the forests).

Algorithm

For each shape (linear) do :

  1. instances_count = shape_length * LDENSITY
  2. For instances_count try to find position :
    1. Random parameter in range 0 ... shape_length
    2. Compute real coordinate for parameter
    3. Random distance from line in range 0 ... MAXDISTANCE
    4. Random angle
    5. newCoordinate = coordinate_on_line + angle * random_distance
    6. If newCoordinate is in collision with other instances, go to a.
    7. Insert newCoordinate with object prototype in output.



更多维基

随机维基