Share

translate_points

Offsets the point_position property of a point-based geometry by the specified translation.

Inputs

points

The geometry with points to be moved.

weights

The proportion of the translation value to apply.

  • A weight of 0 gives no translation.
  • A weight in the range 0—1 moves a point by that proportion of the given translation value.
  • A weight of 1 moves a point by the exact translation value.
  • A weight above 1 moves a point by more than the given translation value.
  • 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.

translation

The base vector by which to move the points. The actual offset also depends on the value of weights.

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 translation.

local_space

If this is checked, the translation is applied in the local coordinate space of each point taking into account each its current orientation and scale.

Outputs

out_points

The geometry with translated points.

point_position

The point_position values that were set on the geometry.

Was this information helpful?