Houdini 20.5 Nodes Geometry nodes

Tangent Field geometry node

Creates a smooth tangent (multi-) vector field on a polygonal surface.

On this page
Since 19.5

Overview

The Tangent Field generates smoothly varying tangent vector fields on polygonal surfaces, and stores the fields as either point or primitive attribute data. The fields may be optionally directed by sparse guide values and smoothly interpolate between the given values. Curvature directions and boundary curves can also influence the fields.

For fields computed over points, instance vectors are reported as being tangent to one of the faces incident to a point. In this case, the instances of a multi-vector at a point are equally spaced around the point in terms of the total face angle sum between consecutive pairs of them.

You can use this node as an alternative to PolyFrame to generate smoothly varying frames across the faces of a surface mesh. To do this, generate a 4-vector field over the faces and report only the first two instances. Optionally, you can make the frame line up with curvature directions or boundary curves.

Notes

  • This node also generates instances of rotationally symmetric (RoSy) multi-vector fields, such as line-fields (RoSy 2-vector fields) or cross-fields (RoSy 4-vector fields). Fields assign to each point multiple tangent vectors (ex. 4 in cross-fields) that are rotationally spaced evenly in the tangent plane of the point. Each of these vectors is an instance of the multi-vector. As a multi-vector field, these vectors represent the same object. In the same way that rotating a tangent vector by 360 degrees in its tangent plane doesn’t change the vector, rotating a 2-vector field by a multiple of 360/2 = 180 degrees or a 4-vector field by a multiple of 360/4 = 90 degrees gives the same multi-vector. In other words, a 2-vector field is like a vector field in which we do not distinguish between a vector and its negation. Similarly, a 4-vector field is like a vector field where we think of a vector as being the same as the 90, 180, and 270 degree rotations of that vector. This node represents a multi-vector field by reporting all or some of the instance vectors at each element. For example, a smoothly varying pair of local UV coordinate axes over a patch of surface can be thought of as the first two instance vectors of a 4-vector field (the other two being the negative U and V axes). As a result, this node produces smoothly varying frame-fields over geometries.

  • In general, you can’t have an everywhere nonzero smoothly varying frame-field across an entire surface. For example, it’s impossible to have such a frame field over a deformed sphere regardless of the connectivity or the deformation (The Hairy Ball Theorem). However, the output of this node is a discrete sample (one sample per point or polygon) of a smooth field that ranges over the whole surface and this larger field becomes zero in some (non-sample) singular locations. If the field is computed over points, these singularities land inside some of the faces (known as singular faces). If the field is computed over primitives, then singularities are vertices. Indexing the instances of a multi-vector field at a point or a face are arbitrary. This node tries to choose the first instance vectors so individual instances with the same index over all elements appear like a smoothly varying vector field with as little discontinuity as possible. However, it’s not always possible to avoid discontinuities entirely as this violates similar provable restrictions.

  • This node doesn’t alter the geometry of its input. However, the computations in this node are always performed on a triangulated surface. If the input geometry has non-manifold edges or points, they're treated as being cut away with narrow slits or holes left in their place. Polygonal faces with four or more vertices are triangulated internally. The result reported on an input face that’s internally triangulated is picked arbitrarily from one of its member triangles. In other words, this node doesn’t combine the results from individual member triangles by some form of averaging. This is because complicated polygons generally exhibit a substantial amount of variation over the member triangles, which means an average inaccurately represents all the individual member values. Therefore, triangulating a surface before using this node yields better results.

Parameters

Group

A subset of primitives or points in the input geometry the field attribute values are set. Leave this blank to affect the attribute value for all closed polygons in the input.

Carried On

Specifies whether the generated field is points or primitives.

The default value is Points.

Directions

The number of directions in the output field. Set to 1 for ordinary vector fields.

The default value is 4. The most common values are 1, 2, 4, and sometimes 6.

Global Rotation

Rotate all the generated directions uniformly in their respective tangent spaces.

The default value is 0.

Alignment

When there is no alignment guiding (when all alignment parameters are set to zero), the Tangent Field node finds the smoothest field over the surface. This smoothest field is equally smooth when globally rotated using the Global Rotation parameter. The alignment criteria is a weighted combination of per element vectors representing surface curvature, boundary directions, and optional user specified guide vectors. These three vector components can be thought of as independent channels that get mixed together.

Weight

A weight specifying the balance between the alignment of the tangent field with the alignment criteria and the global smoothness of the tangent field. Increasing the weight makes the field more aligned, while decreasing the weight make the field smoother. Use values are in the range from zero to one.

Mask

Specifies an attribute of floats that weights elements where the tangent field should be more closely aligned. Use values are in the range from zero to one.

Curvature

This channel is only available for 2-vector fields and up.

Note

This node can’t force an ordinary vector field (a 1-vector field) to be guided by principal curvature directions of the surface. Each principal direction is a 2-vector field, which means that at each point the indicated direction of curvature is unoriented. This node’s algorithms can only use a multi-vector field to guide the construction of a field whose number of directions is a multiple of the number of directions of the guide.

Enable

Enables the curvature contribution to the overall alignment criteria.

Weight

The force of curvature directions in influencing the generated field. Use values are greater than or equal to zero.

Mask

A per element scalar weight applied as the curvature force when influencing the generated field. Higher values will increase the alignment with the curvature directions, while lower values will attenuate the curvature alignment. Use values are greater than or equal to zero.

Rotation

An optional rotation applied to all curvature contributions of the field alignment. Use values are between -180 and 180 degrees.

Boundary

Enable

Enables the boundary contribution to the overall alignment criteria.

Mode

Defines whether boundary contributions are applied inclusively or exclusively. In Add mode boundary vectors are combined with curvature and guide vectors. In Over mode boundary vectors will overwrite any curvature vectors.

Weight

The force of boundary tangents in influencing the generated field. Use values are greater than or equal to zero.

Mask

A per element scalar weight applied as the boundary force when influencing the generated field. Higher values will increase the alignment with the boundary directions, while lower values will attenuate the boundary alignment. Use values are greater than or equal to zero.

Rotation

An optional rotation applied to all boundary contributions of the field alignment. Use values are between -180 and 180 degrees.

Guide

Enable

Enables custom guide contributions to the overall alignment criteria.

Mode

Defines whether guide contributions are applied inclusively or exclusively. In Add mode guide vectors are combined with curvature and boundary vectors. In Over mode guide vectors will overwrite any curvature and boundary vectors.

Weight

The force of guide vectors in influencing the generated field. Use values are greater than or equal to zero.

Mask

A per element scalar weight applied as the guide force when influencing the generated field. Higher values will increase the alignment with the guide directions, while lower values will attenuate the guide alignment. Use values are greater than or equal to zero.

Attribute Name

The name of the guide attribute. The guide attribute must be a vector-3 attribute that assigns a nonzero vector to points or primitives on which the field is guided. This node ignores and fills in zero-vector values. The output directions assigned to points or primitives with nonzero guide values may not exactly match the input values and their magnitudes may be different.

Note

You can compare guide vectors with the resulting field in the Tangent Field state.

Output Attributes and Groups

Field Attribute

The name of the field attribute(s) to create.

Depending on the number of directions generated, individual direction attribute names are appended by their index number.

The default value is field.

Normalize

Provides all generated field vectors with unit length. Otherwise, they're reported as computed with smoothly varying magnitudes that typically drop near singular locations.

Generate

The number of field instance vectors produced in the output as attributes. The directions are numbered 0, 1, and so on in counterclockwise order.

All Directions (default)

Generates all directions. For example, a 4-vector field produces four direction attributes.

One Direction Per Symmetric Pair

If the number of directions is even, this generates the first out of any two directions that are opposites. For example, a 4-vector field produces a coordinate frame (a pair of axis vectors) over each element.

Only One Direction

Reports only the first of the directions.

Singular Group

Reports the list of singular elements (points if the field is generated over primitives or primitives if the field is generated over points) as a group.

The default value is singular.

Positive Singular Group

Reports the list of positive singular elements (points if the field is generated over primitives or primitives if the field is generated over points) as a group.

The default value is positive_singular.

Negative Singular Group

Reports the list of negative singular elements (points if the field is generated over primitives or primitives if the field is generated over points) as a group.

The default value is negative_singular.

Discontinuities

When the number of directions is greater than 1, this reports an edge group that indicates discontinuities in field direction indexing.

In most places, each individual field direction vector behaves like a smoothly varying vector-field. However, this often can’t be achieved globally and there must be places that individual directions appear to jump (for example, by 90 degrees). For fields generated over points, these edges indicate a jump from one end of the edge to the other. In the case of fields on faces, these edges indicate jumps between the faces on the two sides of the edge.

The default value is discontinuities.

Visualization

The viewport state of Tangent Field uses these parameters, which don’t recook the operator when modified.

Field

Displays the field over the geometry when the viewport state of the node is active.

When displaying multi-vector fields, the vector field of the first instance is red and the other vector fields are blue. When displaying a field computed over primitives, a set of instances is displayed for every member triangle in the internal triangulation of faces with four or more vertices.

Field Scale Mode

Specifies the length of the visualized field vectors.

Prescale for Viewing: mode displays the vectors at a precalculated scale such that the field vectors are easier to see.

Normalized: the field vectors are set to unit length.

None: field vectors visualized with their actual length.

Field Scale

Rescales the current viewing scale of the field vectors by any factor.

The default value is 1.

Singularities

Displays a dot in the approximate location of each singularity. A red dot indicates a singularity with a positive index and a blue dot indicates a singularity with a negative index.

Guides

Displays any non-zero guide vectors that are specified by an attribute. This is useful for comparing guides with the resulting field.

Guide Scale Mode

Specifies the length of the visualized guide vectors.

Prescale for Viewing: displays the vectors at a precalculated scale so the guide vectors are easier to see.

Normalized: the guide vectors are set to unit length.

None: guide vectors visualized with their actual length.

Guide Scale

Rescales the current viewing scale of the guide vectors by any factor.

The default value is 1.

Examples

TangentFieldExample Example for Tangent Field geometry node

This example demonstrates how to use the Tangent Field node on a mesh.

TangentFieldGuidingExample Example for Tangent Field geometry node

Demonstrates a couple different methods for guiding tangent fields.

See also

Geometry nodes