Share

cull_points

Randomly deletes points on a points object such as a particle system, based on weighted probabilities. In the case of an instances object, you can disable points instead — that is, prevent an instanced geometry from appearing at a point without deleting the point.

Inputs

points

A points object or instances object.

weights

A multiplier on the probability port.

  • 0 or less means that a point is never culled.
  • Values in the range 0—1 modify the chance of a point being culled. For example, 0.5 means that the probability that a point gets culled is 50% × probability.
  • 1 means that the chance of a point being culled is exactly probability.
  • Values above 1 mean that a point has a greater chance of being culled than probability.

If nothing is connected, the default weight is 1 for all points. This is an interpreted auto port that accepts the following types:

  • A single float is interpreted as a constant value for all points.
  • An array<float> is interpreted as values per point. The array gets resized to match the number of points, if necessary.
  • An array<bool> is interpreted as values of 0 (false) or 1 (true) per point.
  • A string is interpreted as the name of an existing geo property, and its values are used.
  • A ScalarField is sampled at each position of the geometry's components.
  • An array<long> specifies the indices to be assigned a value of 1. Other indices are assigned 0.

probability

The base chance that a point is culled.

seed

The seed for the random number generator.

disable_by_selection

If this is checked, instances are disabled instead of deleted. This sets the value of the instance_property from x to –x – 1 for disabled points. For example if instance 2 was selected, this will set the property to –3. This prevents instanced geometry from appearing for that point, but allows you to recover the index of the geometry that was previously instanced.

instance_property

The property to modify in order to disable instances.

Outputs

remaining_points

The modified geometry, without the points that were deleted. Points that were disabled instead of deleted are included in this object.

deleted_points

An geometry containing the points that were deleted, in case you want to use them for something else.

remaining_indices

The old indices of the points that were not deleted.

deleted_indices

The indices that were deleted. This can be used if you have separate data that needs to be synchronized.

Was this information helpful?