Skip to content

Houdini groups

Group first and last points of the curve

The example below shows how to create point group for first and last point of the curve. Very usefull when need to pin the start and end of the curve to some other object for simulation.

Point.wrangle
// Vertexcurveparam
i@group_root = vertexcurveparam(0, @vtxnum) == 0;
i@group_tip = vertexcurveparam(0, @vtxnum) == 1;

Group first point on each curve

Point.wrangle
// For each primitive
i@group_braid_start = primpoints(0, @primnum)[-1] == @ptnum;

Select random points by percentage

Point.wrangle
i@group_random = rand(@ptnum, chf("seeed")) < chf("percentage");