Houdini 21.0 Nodes Geometry nodes

UV Flatten from Points geometry node

Creates UV islands from points that measure distance and direction outward from the sources.

On this page
Since 21.0

Overview

This node computes UV maps that measure distance and direction along a surface. This can be useful for applying masking, decaling, and surface traversal operations that are based on these attributes. These UV coordinates can also be reliably generated without much user input, making them suitable for procedural UV map generation. This node assigns to each vertex a UV coordinate describing the tangent vector from the point in the source group that is closest to it. It uses a distance measured along the surface, not through 3D space. From the source point, if you follow the shortest path along the surface pointing in the direction of a vector, it will terminate at the vertex. This results in the lines of constant angle through the origin describe the geodesics from the source point (pink/purple lines) and the circles of constant radius describe the geodesic disks centered at the source point (red/yellow lines).

When multiple source points are specified, the UV coordinates describe the distance and direction from the closest source point. This means it computes Voronoi diagrams on surfaces along with UV coordinates to the generating points. Vertices that are not reachable from any of the points in the source group will not be assigned any UV coordinates and their existing UV coordinates will not be modified).

These UV maps are known in mathematics as geodesic normal coordinates or surface logarithmic maps (closely related to the exponential map). They can be thought of as surface polar coordinates. Two methods are available that provide a tradeoff between computational cost and accuracy.

Tips

  • The direction to the nearest source point can be computed as an angle f@theta = atan2(v@uv[1], v@uv[0]) and the distance can be computed as f@dist = length(v@uv). For this to hold, the source points need to be placed at the origin in UV space using the None layout option. The node enforces this property and will produce overlapping UV islands. Further separation of the islands can be achieved using UV Layout.

  • This method only works for flattening portions of manifold surfaces, meaning distances and directions cannot be tracked across non-manifold edges or points. Non-manifold edges and points are interpreted as though being cut away from the surface, leaving narrow slits or tiny holes in their places.

  • The Fast method is useful if the source points are modified frequently, e.g. in a loop network. Once you modify the source group, it maintains a cache to recompute the UV flattening quickly and with the same accuracy.

  • Surface Voronoi diagrams and their boundary seams are byproducts of the computation. They can be computed (without any UV coordinates) by using the Only Seams method.

  • Unlike UV Flatten, this node does not produce an angle-preserving (conformal) flattening. As a result, there may be high distortion far away from the source points. Options for pruning the high distortion regions from the parameterization are provided through the post-processing tab. The maximal amount of distortion will be found near the cut locus, the set of points that have more than one shortest path back to the source point.

Parameters

Group

A subset of points in the input geometry whose attribute value will be set. Leave this blank to affect the attribute value for all points in the input.

UV Attribute

The name of the UV vertex attribute to create.

Method

Algorithm to flatten 3D geometry into 2D texture space. The node has three different methods that have different tradeoffs. The Fast and Accurate methods are designed to flatten portions of the surface and computing the UV coordinates. The Only Seams only computes information related to the connectivity of the UV islands.

Fast

The default. Faster, slightly lower quality than Accurate. Distortion and numerical instabilities near the cut locus are expected.

Accurate

Slower with no amortized cost savings, but results in a higher quality parameterization with much less distortion further from the source point.

Only Seams

Only computes seams and the Voronoi cells. Faster than computing UV coordinates.

Points Source

Which input should be used to find the source points.

First Input

For using existing points on the mesh

Second Input

For using a point cloud. Points are assumed to lie on the surface (and they are projected onto it à la the Ray SOP)

Source Group

The points in the group will be the origin of the UV islands. When the first input is used as a point source, an empty group specification indicates that no flattening should be done. When the second input is used, an empty group specification uses all second input points as sources.

Automatic Source Selection

The parameters in this tab can be used to automatically select point sources that are distributed over the surface.

Point Selection Method

Furthest Point Sampling

This option will choose point sources incrementally as the point furthest from all existing sources.

Distortion Based

This option will use a heuristic to place additional sources at regions where the previous flattening failed to produce a high quality flattening.

Additional Points

The number of additional point sources to add automatically.

Distortion Threshold

This determines the threshold to measure the quality of the flattening for the Distortion Based selection method. See also the Post-Procesing option for more details on the distortion measure.

Attributes

V Direction Attribute

3D vector attribute specifying a tangent direction (at each source point) to use orient with the +V direction in UV space. If the attribute is not valid, the node defaults to using an arbitrary and fixed direction for each point.

Scale Attribute

3D vector attribute specifying scaling of UV coordinates for each island. A non-uniform scaling will invalidate the property that straight lines in UV space follow the shortest paths along the surface. If the attribute is not valid, the node defaults to applying no scaling.

Uniform Scale Attribute

Float attribute specifying a uniform scaling of each UV coordinate. Multiplies all components of the scale attribute uniformly. If the attribute is not valid, no further scaling is applied.

Layout Options

Pack Into

Controls the area of texture space within which the node will try to pack the texture pieces.

Rectangle

Lets you specify a rectangular areas in the UV plane to pack into.

UDIM Tiles

Lets you specify tiles on the UV plane by their UDIM number.

None

The centers of the UV islands are placed at the origin. This results in overlapping UV islands.

UDIM Target

Select this checkbox to specify an integer attribute on source points specifying the UDIM tile to pack the corresponding island into.

Center

Use this to specify the center of the UV islands when using the None option.

Packing Area

This section is visible when Pack Into is set to “Rectangle”.

Center

The center of the packing area in UV space.

Size

The width and height of the packing area, in UV units.

Post-Processing

Ignore Distorted Faces

Select this checkbox to ignore primitives that are highly distorted.

Distortion Threshold

Triangles with distortion above this threshold are ignored in the parameterization. Distortion is measured as the maximal amount of stretching needed to deform the original primitive to its image in the parameterization space. Distortion is minimized by isometries with a value of 1.

Distorted Group

Select this checkbox to store the distorted faces, where no UV attribute was written, as a primitive group.

UDIM Target

Select this checkbox to specify an integer attribute on source points specifying the UDIM tile to pack the corresponding island into.

Output Groups and Attributes

Preserve UVs on Unflattened Faces

Select the checkbox to keep any existing UV coordinates on regions where the SOP does not author new UV coordinates

Unprocessed Group

Select the checkbox to store the regions of the mesh that are disconnected from any input source point. These regions can be flattened using more traditional methods with subsequent nodes.

Seams Group

Select the checkbox to create an edge group in the output containing the seam edges.

Island ID

Select this checkbox to create a primitive attribute in the output labeling the Voronoi cell (equivalently, the closest source point).

Copy Attributes from Points

When the second input is used as an input source, select this checkbox to copy the specified attributes onto the primitives contained in the UV island associated to the point.

Create UV Set Per Point

Select this checkbox to save the multiple UV coordinates associated to each individual source point. These extended UV islands will be saved as multiple vertex attributes describing the flattening back to the center of each Voronoi cell, but they are extended over the entire geometry.

UV Set Prefix

The UV attribute sets are labeled by appending the island number to this attribute name.

See also

Geometry nodes