scatter_points
Generates a points object whose points are distributed across a geometry. For example, this is useful for instancing things like plants and rocks on a landscape. In addition, this compound outputs the corresponding point positions as well as the geo locations in case you want to sample other properties on the geometry.
Inputs
geometry
The geometry on which to generate points. Mesh, strands, and volumes are supported.
density_weights
Weights per point of the input geometry to control the distribution of generated points.
- A weight of 0 or less means that no points are generated nearby.
- A weight in the range 0—1 means that fewer than the normal number of points are generated nearby.
- A weight of 1 or more means that the normal number of points are generated nearby.
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
floatuses the same weight for all points. - An
array<float>uses the corresponding array element as the weight for each point. The array may be 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
stringuses the values of the property with that name as the weights. The property must exist on the geometry and consist of afloatvalue per point. - A
ScalarFielduses the field's value at each point's position as the weight. - An
array<long>specifies the indices of the points that have a weight of 1. All other points are considered to have a weight of 0.
Scatter Settings
scatter_mode
The mode to use for scattering:
Randomgives a uniform pseudo-random distribution. This is the closest to truly random, but exhibits clumps and bare patches that may be unwanted for some purposes.BlueNoisegives a "blue noise" distribution. This is also referred to as a "quasi-random" or "low discrepancy" distribution. It provides a more even distribution, with points more equally spaced.BlueNoiseMaximalgives a similar distribution toBlueNoise. This gives the most evenly-spaced distribution, but is the slowest to compute.
amount_mode
Controls the interpretation of the amount parameter:
Radiusgenerates locations that are spaced at least 2 ×amountunits apart. If spheres with this radius are placed on the resulting points, none of the spheres would intersect. Points may be further apart, but never closer than twice this radius.numbergenerates theamountnumber of locations.densitygeneratesamountlocations per unit of surface area, strand length, or volume.
amount
Controls the number of points generated (may be affected by amount_mode).
seed
The seed for the random number generator.
max_number
The maximum number of points to generate. This can be useful to avoid accidentally generating extremely large numbers of locations while adjusting settings. If this is negative, it is ignored.
Culling
density_weights_mode
Controls the interpretation of the density_weights parameter:
Randomrandomly deletes points.DistanceBaseddeletes points that are too close to other points.
cull_overlapping
Removes points that are closer than 2 x overlapping_radius units to other points.
overlapping_radius
Controls the distance between points cull_overlapping is enabled.
Properties
transfer_properties
A space-separated list of geo properties from the input geometry that are sampled and transferred to the output points. Only float, float2, float3, and float4 types are supported.
set_emit_location
Sets a property called point_emit_location on the output points.
Orientation
set_orientations_from_geometry
Create orientations based on the tangent and normals of the input geometry.
normal_mode
The normal to use as the Y axis: point_normal or face_vertex_normal.
tangent_mode
How the surface tangent is determined:
Connectivitycomputes the tangent based on the edge flow of the underlying mesh topology.UVcomputes the tangent based on the mesh'spoint_UV0property.
prioritize_normal
Controls what happens when the normals and tangents are not orthogonal. When prioritize_normal is true, the Y axis of the resulting orientation is exactly aligned with the normal. When it is false, priority is given to aligning the X and Z axes with the tangent plane.
normal_override, tangent_override
An interpreted auto port that lets you supply values to use for the normal and tangent respectively, instead of basing them on the underlying geometry. You can do any of the following:
- Connect a single
float3to use the same value for all points. - Connect an
array<float3>to use the corresponding value in the array for each point. - Connect a
VectorFieldto use the value of the field at each point's position.
Outputs
points
A points object of the resulting points scattered on geometry.
positions
The positions of the resulting points.
geo_locations
The locations on geometry of the resulting points. This can be used as input for sample_property to sample point_normal or other properties on the input geometry.
