Houdini 20.5 Nodes Geometry nodes

Triangulate 2D 3.0 geometry node

Connects points to form well-shaped triangles.

On this page
Since 17.0

Triangulate 2D connects 2D points in the input geometry to create a 2D triangle mesh as well-shaped as possible (avoiding acute angles if possible).

Since it works on points in a plane, Triangulate 2D needs to assign a 2D position to each 3D input point. This can be done in three ways:

Triangulate 2D can ensure that certain pairs of points appear as edges (or subdivisions of edges when refinement is performed) in the output mesh. These edges are called constraints. You can specify constraints by providing either an edge group or a primitive group (or both) under the Constraints tab.

Triangulate 2D can also remove triangles deemed as belong to the outside of the intended area in various ways which are specified under the Outside Removal tab.

You can also improve how well shaped the triangles are by allowing Triangulate 2D to add additional points under Refine tab.

Tip

To introduce randomness into the triangulation, pipe the original geometry through a Scatter SOP to add extra points at random locations.

Technically, Triangulate 2D produces a constrained Delaunay triangulation, which has the largest minimum angle among all possible triangulations for the same set of points, and the refinement process is Delaunay refinement.

Parameters

Point Group

A subset of points to use for the triangulation.

2D Positions

Determines the method for determining the 2D positions of the points used in triangulation.

Fit Plane

Obtains 2D positions of the points by projecting them into a plane that best fits the 3D point set.

Select Projection Plane

Allows the user to specify a projection plane, into which the 3D points are projected.

Origin

When Select Projection Plane is on, the projection plane is determined relative to this point which is treated as “origin”.

Distance

When Select Projection Plane is on, this parameter determines the distance between the projection plane and the point specified by Origin.

Direction

When Select Projection Plane is used, this vector determines the direction along which the projection plane is shifted away from the point specified by Origin.

Use Attribute

Reads the 2D position of each point from a supplied point attribute (the attribute must be a floating point vector with at least two components).

Attribute Name

When Use Attribute is used,, the 2D position of the points are read from the attribute with this name.

Constraints

Using constraints you can enforce certain pairs of points to be connected by edges, aka. constrained edge, in the output triangulation. You can specify constraints using a constraint primitives group (consisting of polygons or polygonal curves all whose edges are treated as constraints), or using an edge group, or both.

Edges

All edges in the supplied edge group are enacted as constraints in the output triangulation. Note that edge groups edges do not need to exist as primitive edges in the input. As an example, using the expression “p10-20 p16-24” as the constraint edge group ensures that points 10 and 20 are connected with an edge in the output as are point 16 and 24.

Polygons

Specifies that the edges of the given polygons should be preserved in the final triangulation.

Ignore Polygon Bridge Edges

When off, removes any bridge edges from the constraint group.

Silhouette

Constrain to the set of primitives that are incident to an edge that intersects the silhouette of the projected input. The silhouette is formed from the edges whose incident primitives are oriented on opposite sides of the projection.

Allow Splitting of Crossing Constraints

Allows edges to be inserted into the triangulation for the purpose of creating closed boundaries formed from the constraint edges. This greatly improves the quality of the final mesh when removing triangles that are outside of the constraint boundaries.

Use Exact Construction for Constraint Split Points

Enables use of exact predicates when splitting triangles. This can improve triangle quality, but may be slower.

Ignore Non-Constraint Points

Simplifies the constraint set by removing all interior points.

Outside Removal

This node can optionally remove a subset of the generated triangles which can be interpreted as belonging to the exterior determined by the constraints. This is done through a series of flooding operations in which, starting from an initial set of exterior triangles, the flood successively extends to neighboring triangles that are not separated from the currently flooded set by constrained edges. In other words, the removal flood is only blocked by constrained edges.

Flood from Convex Hull Boundary

Removes triangles that are outside of the constraint group.

Remove Outside of Constraint Polygons

Removes triangules outside the boundary of the constrained polygons.

Remove Outside of Silhouette

Removes triangles outside the boundary of the silhouette.

Refinement

Refine

Improves the quality of the triangulation by adding new points. The triangulation will include some new points beyond the ones in the input, but the triangles will have better shapes.

If you start with the following points:

With Refine off, Triangulate 2D will create triangles using the available points, and may in the process introduce undesirable long skinny triangles:

With Refine on, Triangulate 2D will add points to create better triangles conforming to the Maximum Area, Minimum Angle, and Minimum Edge Length parameters.

Allow Splitting of Constraint Edges

Allows edges to be inserted into the final triangulation in order to improve triangle quality.

Encroach Angle

An angle threshold between 90 and 180 degrees on the angles of newly formed triangles from the insertion of edges. To avoid violating this criteria, the operator will insert additional edges.

Note

This parameter is disabled when Allow Splitting of Constraint Edges is on, so it looks like these two parameters currently do nothing.

Minimum Angle

The minimum angle, in degrees, for the interior of each triangle. Increasing this value to get more symmetrical triangles and eliminate long skinny triangles. Values larger than 30 degrees cannot be guaranteed and often force the refinement to go for ever, and only stopped by the reaching the maximum allowed number of points (Maximum New Points).

Triangle Sizes

An optional specification on that target triangle size during relaxation.

Unrestricted

The default option where the target triangle sizes are unconstrained.

Cap Maximum Area

Specifies the target triangle size by an upper bound on the triangle area.

Maximum Area

The maximum target area to constrain triangle sizes.

Set Target Edge Length

Specifies the target triangle size by an upper bound on the length of the triangle edges.

Target Edge Length

The target edge length to constrain the triangle sizes.

Minimum Edge Length

To avoid over-refinement in a local area, you can specify a minimum length for the longest edge of a triangle that is allowed to be further refined. Once all edges of a triangle become shorter than the specified length, no further attempts are made to improve the shape of the triangle.

Maximum New Points

Limits the number of new points that can be added during triangulation. New points might be added to satisfy constraints or during refinement, up to this limit. This is useful to ensure that the triangulation doesn’t run forever, and should usually be set to a value much larger than the number of points you expect to generate.

Regularization Steps

The number of iterations used to regularize the triangulation. More iterations will result in more uniform triangles, but will take longer.

Allow Movement of Interior Input Points

When regularizing the triangulation, this allows the interior points or the original projection to be moved in the plane.

Output Geometry

Restore Original Point Positions

When on, triangles of the generated triangulation are transformed to use the original 3D positions of the input points. Newly generated points (for refinement or constraint conflict resolution) are accordingly assigned interpolated positions based on the 3D positions of the input points.

Keep Primitives

Keep all input primitives (except the constraint primitives) in the output in addition to new primitives created during triangulation. When off, the input primitives do not appear in the output.

Recompute Point Normals

Recomputes point normals (if they exist).

Remove Unused Points

When on, points outside the input point group are deleted from the output.

Remove Duplicate Points from Triangulation

For any given 2D position only one point can be inserted into the triangulation. If multiple points have the same 2D position only one of them is inserted into the triangulation and the others are ignored. When on, these duplicate points are deleted from the output. Otherwise, they are left in as isolated points.

Output Groups

Split Points

Outputs a group of points used to split crossing constraints.

Constrained Edges

Outputs an edge group containing the edges specified from the constraints.

Random Seed

The triangulation and refinement algorithm implemented by this node is “randomized” in nature, meaning that its peek performance is expected with high probability only if the input points are processed in “random” order. Since Houdini node outputs must be deterministic, a fixed random-like reordering of the input points, determined by this parameter, is used. In the majority of cases, this fixed reordering should perform close to optimal but it is theoretically possible for any fixed reordering to perform poorly for a specific point set. Changing the seed value in such case may have tangible effects on the speed of the triangulation although it might affect the generated output, particularly in terms of the point and primitive numbers.

Inputs

Input1

Geometry containing point data.

Outputs

Output1

A two dimensional triangulated mesh.

Examples

Chainmail Example for Triangulate 2D geometry node

This example demonstrates advanced use of the new Triangulate2D SOP to create chainmail links.

See also

Geometry nodes