displace_points
Displaces a geometry's points along the given vectors.
Inputs
points
The object with points to displace.
weights
Weights that are used as multipliers for the base magnitude (scale × length) of the displacement.
- A weight of 0 gives no displacement.
- A weight in the range 0—1 moves a point by that proportion of the base magnitude.
- A weight of 1 moves a point by exactly the base magnitude.
- A weight above 1 moves a point by more than the base magnitude.
- A weight below 0 moves a point in the opposite direction.
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.
Displacement
scale
A multiplier for the magnitude (length) of the displacement vectors.
displacement_vector
The vector along which to displace the points. If nothing is set or connected to this port, the point_normal
property is used by default. The magnitude of the displacement depends on the length of this vector, as well as weights
and scale
.
This is an interpreted auto port that accepts the following types:
- Connect a single
float3
to use its value for all points. - Connect an
array<float3>
to use the corresponding element of the array for each point. The array gets resized to match the number of points, if necessary. - Connect a
string
to use the vector given by the property of that name (float3
per point). - Connect a
VectorField
to use the value of the field at the point's current position.
Note that it is also possible to use scalar values instead of vectors, in which case the single element is used for all three axes. However this is almost never useful for displacement.
Outputs
out_points
The geometry with points displaced.