Share

rotate_points

Updates the current point_orientation values of a point-based geometry by the specified rotation. This affects the orientation of instances, as well as point shapes (if they are not aligned to the camera). However, it does not affect the rotation of the geometric object as a whole. In addition, this compound also updates the point_normal, point_tangent and point_binormal properties if they are present.

Inputs

points

The geometry with points to be rotated.

weights

The proportion of the rotation to apply.

  • A weight of 0 gives no rotation.
  • A weight in the range 0—1 gives a rotation by a proportion of the given angle.
  • A weight of 1 means gives a rotation of the given angle.
  • A weight above 1 gives a rotation greater than the given angle.
  • A weight below 0 gives a rotation 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.
  • 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.

axis

The axis of rotation. The vector does not need to be normalized.

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 specifying an axis.

radians

The angle of rotation in radians.

local_space

Controls how the new rotation and old rotation are combined. When it is true, the randomized rotation is applied in the current local space of the point, so for example a rotation about Y occurs around the local Y axis of the point's current orientation.

Outputs

out_points

The geometry with rotated points.

point_orientation

The point_orientation values that were set on the geometry.

Was this information helpful?