C I S 2009 International Press Vol. 9, No. 2, Pp. 197-212, 2009 003
C I S 2009 International Press Vol. 9, No. 2, Pp. 197-212, 2009 003
∗ Computer Science Department, State University of New York at Stony Brook, Stony Brook, NY
USA.
197
198 KYLE HEGEMAN ET AL.
fluid propagation.
In practice it is frequently desirable to make a conformal cube map consistent
across different surfaces. For example, we may want to map major feature points on
several surfaces to corresponding locations on the cube. In this case, we use a Mobius
transformation to ensure the feature correspondence of up to three separate feature
points. A more theoretical issue is that the edges (and corners) of the constructed
cube map are not covered by any local charts. We describe how to add special charts
to cover these singularities, such that all local parameters are still conformal and
the transition functions to other existing charts are conformal as well. In practice,
we found it was not necessary to actually use these extra charts but we include the
corresponding discussion in the interest of completeness and theoretical rigorousness.
Our approach combines the benefits of several recent developments. Most impor-
tant novel contributions to computer graphics are:
• A new algorithm for computing conformal structure of curved geometry. This
structure enables us to simplify Navier-Stokes equation and other types of
PDEs on surfaces without losing accuracy;
• By using cubic conformal mapping combined with regular geometry image
representation, we demonstrate how to adopt off-the-shelf GPU-based fluid
solvers with minimal modifications;
• By tightly coupling deformable geometry with fluid dynamics, we develop
to the best of our knowledge the first GPU-based interactive fluid solver for
arbitrary surfaces.
We tested our system on several surfaces with complex geometric details. We demon-
strate interactive user control and also conduct fluid experiments over shape morphing
sequences. In all our examples, we achieve interactive performance, while preserving
stability and accuracy.
1.1. Previous Work. Floater and Hormann [Floater and Hormann 2004] pro-
vide an extensive survey of the state of the art in parameterization. We refer the
reader to this paper for a more detailed discussion of this subject and briefly mention
only the most related work below.
Geometry images were introduced By Gu et al. [Gu et al. 2002], who represent
geometric surfaces with a regular image format to enable GPU-based geometric pro-
cessing. Spherical parameterizations have been discussed in [Praun and Hoppe 2003].
Conformal parameterizations for topological disks have been presented in [Lévy et al.
2002], [Desbrun et al. 2002], and [Sheffer and de Sturler 2001].
Stam [Stam 2003] introduced flows on surfaces to the graphics community. His
technique uses the same underlying 2D Stable Fluid solver [Stam 1999] as our method,
but the parameterization he chose leads to hundreds of charts for meshes of reasonable
complexity. Our conformal cubic parameterization can handle similar meshes using
200 KYLE HEGEMAN ET AL.
only six charts. A fixed number of charts that can handle many different models is
a key factor in simplifying a GPU implementation. A somewhat different approach
to the flows on surfaces problem was taken by later researchers [Shi and Yu 2004,
Fan et al. 2005]. Instead of using a parameterization to solve the equations in 2D,
they solve the system in 3D using an irregular discretization based on the triangular
mesh.
Fig. 2. Conformal Cube Map of David Head Surface. The Michelangelo’s David head surface
(a) is conformally mapped to the unit sphere (b). The unit cube is also mapped to the sphere (c).
These two maps induce a conformal cube map of the David head surface (d).
E = G = λ2 ,
2 Z
X
(2) E(φ) = < ∇φi , ∇φi > dσ,
i=0 S
where σ is the surface area. Intuitively, harmonic energy is proportional to the elastic
stretching energy of the surface due to its distortion which is created by its mapping
into another surface. It has been proven that if φ : S → S2 is conformal, then it has
the minimal harmonic energy in all maps from S to the unit sphere. We will compute
conformal maps by minimizing this energy.
Harmonic energy minimizers (conformal maps) are not unique. They form a 6-
dimensional Möbius transformation group. In order to obtain a unique solution, we
need to apply additional constraints. For example, we can set the “center of mass”
202 KYLE HEGEMAN ET AL.
1
1
2 3
3
2
1
2
3
Fig. 3. Full conformal atlas of a cube map. Three face charts, three edge charts and one corner
4
chart are illustrated. The chart transition map from face to corner is w = z 3 , which is conformal.
This constraint will remove three degrees of freedom. The remaining three are then
equivalent to rotations. Alternatively, we can choose positions of three arbitrary
feature points on the surface. This is used by Möbius transformation described below.
If the surface is a topological disk, we can use the conventional double covering
technique [Lang 1999] to turn it into a symmetric closed surface by gluing two copies
of the surface along their boundaries. Therefore, in the following discussion, we only
focus on closed genus zero surfaces.
Suppose S1 is an arbitrary genus zero surface and we want to construct its con-
formal mapping to another surface S2 . In all our examples S2 is a simple cube, which
makes hardware implementation particularly simple (see section 5), but it can be
a polycube to better represent the shape of S1 . We first compute conformal maps
φ1 : S1 → S2 and φ2 : S2 → S2 . Then the composition φ−1 2 ◦ φ1 : S1 → S2 is the
sought conformal map from S1 to S2 .
We construct a conformal atlas in a manner similar to [Grimm 2002] and [Ying
and Zorin 2004] Each face, edge and corner vertex are associated with its own local
chart. Each face chart covers only interior points of corresponding face and leaves off
edges of the face. Each edge chart covers interior points of the edge but leaves off cor-
ner vertices. The corner vertices are covered by corner charts. Figure 3 demonstrates
face, edge and corner charts of a unit cube. The transition map from a face chart to
an edge chart is a planar rigid motion. The transition map from a face chart to a
4
corner chart is w = z 3 composed with a planar rigid motion, where z is the complex
coordinates on the face chart, and w is the complex coordinates on the corner chart.
Therefore, all transition maps are conformal.
GPU-BASED CONFORMAL FLOW ON SURFACES 203
A constructed conformal atlas can be used to solve any partial differential equa-
tions if theoretical correctness of the solution is required. In practice we found it
sufficient for graphics applications to compute and store only face charts with shared
boundaries. This does not lead to visually noticeable artefacts and simplifies data
structures and algorithms considerably.
Figure 2 illustrates the complete process of conformal cube map creation. After
the parameterization is computed, we use it in the final step to resample the surface
into a set of geometry images using regular grid on each face of the cube. The
collection of resulting images forms a conformal cubic map of the entire surface which
can be used to solve differential equations on the surface as described in Section 4.
φ : S1 → S2 , vi → ni .
which will serve as our initial map from S1 to S2 . Note that it will be more convenient
for us to interpret φ(p) as a vector from the origin to a point on the sphere (which is,
of course, normal to the sphere) rather than as the point itself. We adapt Polthier’s
method [Polthier 2002] to approximate the harmonic energy defined by equation 2:
X
(4) E(φ) = wij < φ(vi ) − φ(vj ), φ(vi ) − φ(vj ) >,
[vi ,vj ]∈S1
where vk and vl are the two vertices sharing a face with edge [vi , vj ]. We will use a heat
flow method [Schoen and Yau 1997] to minimize harmonic energy. This technique
updates φ(p) according to a variant of the heat equation:
dφ(p)
(5) = −∆T φ(p), ∀φ ∈ S,
dt
where ∆ is the Laplacian-Beltrami operator and ∆T φ(p) represents its tangential
component. The purpose of updating the map along the tangential direction of its
Laplacian (rather than along the direction of full Laplacian) is to keep the image of
point p on the target surface (sphere) while minimizing the harmonic energy.
204 KYLE HEGEMAN ET AL.
At each vertex, ∆φ(vi ) can be split into the normal component ∆⊥ φ(vi ) =<
∆φ(vi ), φ(vi ) > φ(vi ) and the tangential component which we need for equation 5:
The heat flow dynamics given by equation 5 is approximated by updating φ(vi ) along
the negative direction of this vector. The center of mass constraint 3 is simplified to
X
φ(vi ) = 0.
vi ∈S1
P
which is enforced by subtracting i φ(vi ) from all φ(vi )’s and re-normalizing the
result to unit length after each iteration.
The process converges to a discrete conformal map from a surface to the unit
sphere. The convergence speed is determined mainly by the geometric properties of
the surface. For all models used in this paper (tens of thousands of vertices) the heat
flow computation takes about 30 seconds. Figure 2 a and b illustrates the result of
the conformal spherical map of the David head surface. For more details on heat
flow method, including a formal proof of convergence of the constrained heat flow,
we refer readers to [Schoen and Yau 1997]. The convergence of discrete Laplacian-
Beltrami operator has been extensively discussed in [Xu 2004].
The final piece of information we need for our PDE solver is the conformal factor
λ. For each vertex vi we compute the sum of areas of all faces adjacent to vi (its
one-ring) in R3 and the sum of areas of one-ring neighbor faces in (u, v) plane. The
ratio of these quantities gives an approximation for conformal factor λ2 (vi ).
the first surface, the three feature points are z0 , z1 , z2 . We first construct the Möbius
transformation which takes them into 0, 1, ∞:
(z − z0 )(z1 − z2 )
ψ1 = .
(z − z2 )(z1 − z0 )
We can construct ψ2 in a similar way. Then ψ1−1 ◦ ψ2 maps the feature points on the
second surface into those on the first one. The two conformal spherical parameteri-
zations φ1 and
τ −1 ◦ ψ1−1 ◦ ψ2 ◦ τ ◦ φ2
are therefore two consistent conformal spherical parameterizations, which align three
feature points accurately on the sphere. Figure 4 demonstrates the alignment using
Möbius transformation. The three feature points used are centers of the eyes and the
tip of the nose for both skull and David head surface.
Fig. 4. Consistent Conformal Spherical Maps. The skull surface (a) is conformally mapped to
the unit sphere. A Möbius transformation is acted on the sphere to align eyes and nose tip with
those features on the conformal spherical image of the David head surface (d).
∂u 1
(7) = −(u · ∇)u − ∇p + f ; ∇·u=0
∂t ρ
where u and ρ are velocity and density of the fluid, p is pressure and f is external
body forces such as gravity.
For flows on surfaces, fluid velocity is restricted to the tangent plane. Given a
mapping of the surface to (u, v)-plane, we can attempt to solve differential equations in
this plane and then map the result back onto the surface. This involves computation
only in two dimensions and therefore we can take advantage of fast off-the-shelf 2D
solvers, including those using graphics hardware. However, we first need to express
all differential operators in the new domain taking into account any distortion caused
by parameterization. Unfortunately, for most surface-to-plane mappings the resulting
equations in (u, v)-plane are significantly different from being a simple 2D version
of equations 7 above (including appearance of new terms) and extensive non-trivial
modification of existing solvers is required. The key advantage of using a conformal
mapping is that all differential operators can be obtained by simple incorporation of
conformal factor λ(u, v). We use subscript g to emphasize that these operators are
computed differently. Symbols without subscripts refer to “standard” operators in
corresponding domain.
Gradient of a scalar function φ is expressed as:
1 ∂φ ∂φ ∇φ
(8) ∇g φ = 2 = 2
λ ∂u ∂v λ
and its Laplacian:
∂2φ ∂2φ
1 ∆φ
(9) ∆g φ = + 2 =
λ2 ∂u2 ∂v λ2
Given fluid velocity in (u, v)-plane u = (u1 (u, v), u2 (u, v)), the divergence operator
becomes:
!
1 ∂ λ2 u1 ∂ λ2 u2
(10) ∇g · u = 2 +
λ ∂u ∂v
Since we will be using solvers based on Stam’s stabe fluid algorithm [Stam 1999],
it is useful to explicitly present here expressions for major steps of this technique (see
original paper for details). In particular, advection equation becomes:
∂u 1
(11) = − 2 (∇ · u) u
∂t λ
For projection operation, 1/λ2 terms cancel leading to :
∂ λ2 u1 ∂ λ2 u2
∂2p ∂2p
(12) + 2 = +
∂u2 ∂v ∂u ∂v
GPU-BASED CONFORMAL FLOW ON SURFACES 207
Fig. 5. Left: Cubic map. Right: full texture layout with boundary regions added. Colors corre-
spond to those on the left and show which faces of the cube map provide the data for corresponding
part of the texture. Texture is setup to wrap back over the edges.
6. Examples. This section and accompanying video present the results of our
approach for several meshed of genus zero. We used an Intel Pentium 1.8GHz PC
with a 128MB NVIDIA GeForce 6800 GT graphics card. Each face of the cube has
resolution 128x128 (512x512 total texture size) in all the examples. At this resolution,
the system runs at approximately 15fps. Off-line preprocessing step to create geometry
images and compute conformal mapping takes tens of seconds for our 104 − 105 vertex
meshes. Our first two video examples show fluid flowing over two surfaces of different
geometric complexity - a sphere and a skull. In the second case, there are multiple
sources introducing fluid.
One of the benefits of significant performance gain owed to implementing the
system in hardware is that the user can directly interact with the flow. Our sys-
GPU-BASED CONFORMAL FLOW ON SURFACES 209
Fig. 6. The user can place internal boundaries (shown in white) on the mesh. The first
two images demonstrate the effect of the added boundary on the flow and the third presents final
appearance.
Fig. 7. Left: A simple reaction-diffusion texture synthesized with our approach. Contrast
uniform feature size on the surface to that in the texture space. Right: The same texture computed
without taking into account surface (using unmodified R-D equation).
tem allows users to introduce force on the surface using the mouse, as well as draw
new internal boundaries. This allows to interactively manipulate the flow to create
a desired effect. Figure 6 shows several frames from a session where the user has
added internal boundaries (in white) preventing fluid from entering face area of the
model. Internal boundaries can also serve to create regions on the surface forbidden
for fluid flow. With appropriate (absorbing) boundary conditions this can be used to
implement simple “holes” in the surface without resorting to solving equations on a
non-genus zero surface.
If a surface is modified, it might be important to see how editing operations affect
the fluid flow over the surface. Since surface geometry is changing, this would, strictly
speaking, require to recompute the conformal parameterization which is prohibitively
slow for interactive applications. However, for small changes it might be possible to
210 KYLE HEGEMAN ET AL.
use the original parameterization and stretching factors modifying only the geometry.
One special case involves key frame based morphing of surfaces. For this case, we
can compute necessary information for the end positions (and, if needed, for several
other key frames) and simply interpolate stretching factors at runtime. The resulting
mapping is no longer conformal for in-between frames. For large changes in geometry,
this can lead to visible artefacts as demonstrated by an example included in the video.
Figure 1 shows an example of successful application of this technique.
Other PDEs can also be solved using our approach. Figure 7 shows a model with
a simple texture that was generated using reaction-diffusion technique [Turk 1991].
Note the non-uniform size of spots in the texture domain which is corrected by the
inverse mapping. Simply running the unmodified solver in texture domain creates
uniform size spots leading to distorted pattern on the surface.
REFERENCES
[Harris 2004] M. Harris, Fast fluid dynamics simulation on the GPU. In: GPU Gems, R. Fernando,
Ed. Addison Wesley, 2004.
[Lang 1999] S. Lang, Fundamentals of Differential Geometry. Springer, 1999.
[Lévy et al. 2002] B. Lévy, S. Petitjean, N. Ray, and J. Maillot, Least squares conformal maps
for automatic texture atlas generation. In: SIGGRAPH, pp. 362–371, 2002.
[Polthier 2002] K. Polthier, Computational aspects of discrete minimal surfaces. In: Processing
of the Clay Summer School on Global Theory of Minimal Surface, J. Hass, D. Hoffman,
A. Jaffe, H. Rosenberg, R. Schoen, and M. Wolf, Eds. 2002.
[Praun and Hoppe 2003] E. Praun and H. Hoppe, Spherical parametrization and remeshing. ACM
Trans. Graph. 22:3(2003), pp. 340–349.
[Schoen and Yau 1997] R. Schoen and S.-T. Yau, Lectures on Harmonic Maps. International
Press, 1997.
[Sheffer and de Sturler 2001] A. Sheffer and E. de Sturler, Parameterization of faceted surfaces
for meshing using angle-based flattening. Eng. Comput. (Lond.) 17:3(2001), pp. 326–337.
[Shi and Yu 2004] L. Shi and Y. Yu, Inviscid and incompressible fluid simulation on triangle
meshes: Research articles. Comput. Animat. Virtual Worlds 15:3-4(2004), pp. 173–181.
[Stam 1999] J. Stam, Stable fluids. In: Proceedings of SIGGRAPH ’99, pp. 121–128, 1999.
[Stam 2003] J. Stam, Flows on surfaces of arbitrary topology. ACM Transaction on Graphics.
22:3(2003), pp. 724–731.
[Turk 1991] G. Turk, Generating textures on arbitrary surfaces using reaction-diffusion. In:
SIGGRAPH ’91: Proceedings of the 18th annual conference on Computer graphics and
interactive techniques, ACM Press, New York, NY, USA, 289–298, 1991.
[Xu 2004] G. Xu, Discrete laplace-beltrami operators and their convergence. In: Computer Aided
Geometric Design, 2004, pp. 767–784.
[Ying and Zorin 2004] L. Ying and D. Zorin, A simple manifold-based construction of surfaces of
arbitrary smoothness. ACM Trans. Graph. 23:3(2004), pp. 271–275.
212 KYLE HEGEMAN ET AL.