Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

instances.realize (procNode)

Copy the source standing on every point into one merged geometry (core.realize): the vertex count is the source's times the point count, and every other attribute a point carries stands on each point of its copy (its Mesh and Material excepted). A point stands the source its variant names (0 when the set carries none); the merged points are numbered by id. instances.unpack of a population realizes it the same way.

Inputs

  • instances (Points). The set to merge, whose points carry a Mesh.
  • sources (List<Geometry>, optional). The geometries the points stand, in the order the set was made: the one source of instances.on_points, or the list given to instances.pick_random or instances.pick_by_attribute, whose variant numbers each point's source. Unwired, they are the ones the set carries (instances.sources).
  • material (Points or AssetRef<material>, optional). The material the merged geometry carries: what a material node answers, or a reference to a material asset. Unwired, the merged geometry carries none.

Outputs

  • geometry (Geometry). The merged geometry.
local rocks = g.instances.on_points({ source = g.mesh.box({}), points = g.points.grid({ countX = 2, countZ = 2, spacing = 3 }) })
local merged = g.instances.realize({ instances = rocks })