<sk-simple-point-constraint>

← prev index next →

Displaces every point of a host by a per-point amount that follows a field's weight — translating, scaling, and rotating a cloner's clones, or displacing a mesh or spline's vertices — the general-purpose way to sculpt field-by-field.

Remarks

This is the general-purpose member of the PointConstraint family: like every point-constraint it runs a GPU kernel over all of its host's points at once — the clones of a sk-cloner, or the vertices of a mesh or spline — so it stays cheap at huge point counts. It samples a SpatialField at each point to get a weight in [0, 1], then applies animatable transform deltas scaled by that weight — with no field, the deltas apply at full strength everywhere.

Key attributes. field names the SpatialField to sample by #id. Each clone is then displaced by animatable deltas scaled by its field weight: translate dx/dy/dz (added × weight) and scale dsx/dsy/dsz (columns scaled by 1 + delta × weight) are the workhorses. Also available are rotation dh/dp/db (Euler heading / pitch / bank × weight), position-scale sx/sy/sz (push each point toward or away from the world origin, or a pivotNode when one is set), and field-weight-range, which remaps the raw weight before it scales the deltas. All deltas default to no-effect, so set only the ones you want — no mapping expressions needed, and every delta is animatable. On a cloner every delta applies; on a mesh or spline host, whose output carries only vertex positions, the position deltas (dx/dy/dz, sx/sy/sz) take effect while the per-clone rotate/scale deltas have no per-vertex slot.

Related. Sibling point-constraints specialise the kernel: sk-radial-push-point-constraint pushes clones from an origin, sk-target-at-point-constraint aims each clone at a node, and sk-custom-wgsl-point-constraint runs an arbitrary WGSL kernel. Its single-node CPU cousin is sk-field-constraint.

Serve these docs to run the live example. WebGPU needs a secure context — open this page via grunt serve rather than double-clicking the file. The Markup tab works from disk.

Attributes

AttributeTypeDefaultDescription
fieldanimatable <id-ref> The field providing the per-point weight, as a Field instance. reference by id
field-weight-rangeanimatable <field-weight-range> ([<number>, <number>]) The [lo, hi] range the field weight maps onto.
dxanimatable <number> 0 Position delta X.
dyanimatable <number> 0 Position delta Y.
dzanimatable <number> 0 Position delta Z.
dsxanimatable <number> 0 Scale delta X — additive: final scale factor = 1 + dsx × weight.
dsyanimatable <number> 0 Scale delta Y — additive: final scale factor = 1 + dsy × weight.
dszanimatable <number> 0 Scale delta Z — additive: final scale factor = 1 + dsz × weight.
dhanimatable <angle> 0 Rotation heading delta in radians.
dpanimatable <angle> 0 Rotation pitch delta in radians.
dbanimatable <angle> 0 Rotation bank delta in radians.
d-quaternionanimatable <quaternion> ({ <number>, <number>, <number>, <number> }) Rotation delta as quaternion. Slerped by field weight.