Friday, 12 April 2019

Select a random point from a group each frame

Some code snippets from Walter to use points from a group randomly, for emission (or other things)

In a Detail Attribute Wrangle-

int npts = npoints(0);
float keep = rand(@Time + 235.624) * npts;
i@keep = int(keep);

Every time step, a random point id is chosen as the "keep" point.

Then in a blast, we kill everything but the kept point

`detail(0, "keep", 0)`

Don't forget to invert the blast selection

No comments:

Post a Comment