transform_points
Transforms a point-based geometry by a 4x4 matrix. The effect is the similar to parenting the geometry to the transformation, and baking the results into world space. In the case of points and instances, the effect can be applied in local space.
Behaviors are slightly different depending on geometry type.
Points and Instances behavior
Points and instances may be transformed in graph space or a local per-point space. In graph space, all instances will appear to move together as if parented to the transformation. A translation along Y would move a geometry along the graph's Y axis.
With local_point_space
enabled, each instance will move depending on its own orientation and scale. A translation along Y would be oriented to the instance's local orientation, and scaled to its size or scale. It is as if the transformation is parented to the instance.
point_position
, point_orientation
, point_scale
and point_size
are taken into account and written to. For points, point_size
is generated. For instances, only point_scale
is generated.
With non-uniform scale or a shearing transform, the results may be incorrect, as points and instances cannot express sheared points or instances.
With weights, the transformation will be linearly interpolated, or blended.
Meshes and Strands behavior
Meshes and strands are always transformed in the global space. local_point_space
has no effect.
On meshes and strands, the following geo properties are affected:
point_position
point_size
(if it exists)point_scale
(if it exists)point_orientation
(if it exists)face_vertex_normal
(if it exists)point_normal
(if it exists. Also transformed on points / instances.)point_tangent
(if it exists. Also transformed on points / instances.)point_binormal
(if it exists. Also transformed on points / instances.)
With non-uniform scale or a shearing transform, tangents should remain tangent to the geometry. Normals and binormals should remain perpendicular to the geometry.
With weights, points with partial weights will be partially transformed. Face vertex normals will become unshared. Tangents are not guaranteed to remain tangent to the geometry, nor are normals and binormals guaranteed to remain perpendicular to the geometry.
Inputs
points
The geometry with points to be transformed.
weights
The proportion of the transform
to apply to each point.
- A weight of 0 gives no transformation.
- A weight in the range 0—1 transforms a point by that proportion of the given value.
- A weight of 1 transforms a point by the exact value.
- A weight above 1 transforms a point by more than the given value.
- A weight below 0 transforms a point by the inverse.
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.
transform
The float4x4
transform to apply to the points.
local_point_space
See points and instances above.
If this is checked, the transformation is applied in the local coordinate space of each point taking into account its current position, orientation, and scale. Only applies to transformations of points and instances.
Outputs
out_points
The geometry with transformed points.