Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

instances.on_points (procNode)

Stand one source on every point: each point carries it as its Mesh ({ mesh = source }) and its material as its Material (the source's own, else the default material), placed by P, orient and scale (instances.place). io.output stands each point as an entity, and every point node works on them. instances.realize merges them into one geometry.

Inputs

  • source (Geometry or Mesh). What every point stands a copy of.
  • points (Points). Where the copies stand: one per point, at that point's position.
  • transform (Transform, optional). Per-instance offset, rotation and scale (instances.randomize_transform makes one): the offset is added to P, the rotation lands in orient and the scale in scale. Unwired, every instance is unrotated, unscaled and exactly on its point.

Outputs

  • instances (Points). The points carrying Mesh, Material, orient and scale.
local rocks = g.instances.on_points({ source = g.mesh.sphere({}), points = g.points.grid({ countX = 3, countZ = 3, spacing = 2 }), transform = g.instances.randomize_transform({ seed = 4, scaleMin = 0.5, scaleMax = 1 }) })