Frame Field Integration
A frame field on a surface mesh can be thought as gradient vectors of some scalar functions. Retrieving a parametrization involves "integrating" this field to recover those scalar coordinates \(u\) and \(v\).
The algorithm proceeds as follows:
-
Smooth a frame field on faces of a mesh
-
Determine the singularities and cut along seams to recover a disk topology
-
Brush the frame field: determine which branch of the cross will correspond to \(u\) and to \(v\) at each face
-
Integrate the two vector fields: find the two functions \(u\) and \(v\) whose gradient match the two vector fields in the least-square sense.
FrameFieldIntegration
Usage
ff = M.framefield.SurfaceFrameField(mesh, "faces")
# /!\ Integration is supported only for a frame field defined on faces
ff_param = M.parametrization.FrameFieldIntegration(ff, verbose=True)
ff_param.run()
uvs = mesh.face_corners.get_attribute("uv_coords")
Bases: BaseParametrization
Integration of a smooth vector field into a seamless parametrization
References
-
[1] Mixed-integer quadrangulation, Bommes D, Zimmer H. and Kobbelt L., ACM Transaction on Graphics, 2009
-
[2] QuadCover - Surface Parameterization using Branched Coverings, Kälberer F., Nieser M. and Polthier K., Computer Graphics Forum, 2007
Parameters:
Name | Type | Description | Default |
---|---|---|---|
framefield
|
FrameField
|
the frame field object to integrate. |
required |
singularities
|
Attribute
|
float Attribute on vertices. Gives the target angle defects of vertices |
required |
use_cotan
|
bool
|
if True, uses cotangents as weights in the laplacian matrix. Defaults to True. |
required |
verbose
|
bool
|
verbose mode. Defaults to False. |
False
|
Other Parameters:
Name | Type | Description |
---|---|---|
debug |
bool, optional)
|
debug mode. Generates additionnal output. Defaults to False. |
Note
It is not necessary to provide the input mesh, as it is accessed via the framefield
argument
Raises:
Type | Description |
---|---|
AssertionError
|
the frame field should be defined on faces and be of order 4 |
cut_graph
property
Seam edges as a PolyLine
cut_mesh
property
Disk-topology mesh where cuts have been performed on seams
flat_mesh
property
A flat representation of the mesh where uv-coordinates are copied to xy.
Returns:
Name | Type | Description |
---|---|---|
SurfaceMesh |
SurfaceMesh
|
the flat mesh |
seam_graph
property
Returns:
Name | Type | Description |
---|---|---|
PolyLine |
PolyLine
|
Polyline of seam edges |
export_frame_field_as_mesh()
Exports the frame field as a PolyLine for visualization
quantize()
Resolves the problem with hard constraints on the translations accross seams, which have been computed by rounding the integrated translations
References
QuadCover Mixed Integer Quadrangulation
run()
Computes the integration