2013-09-18 21:17:33 +00:00
|
|
|
..
|
2013-09-26 19:04:57 +00:00
|
|
|
Copyright 2013 Pixar
|
2014-02-26 01:08:22 +00:00
|
|
|
|
2013-09-26 19:04:57 +00:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "Apache License")
|
|
|
|
with the following modification; you may not use this file except in
|
|
|
|
compliance with the Apache License and the following modification to it:
|
|
|
|
Section 6. Trademarks. is deleted and replaced with:
|
2014-02-26 01:08:22 +00:00
|
|
|
|
2013-09-26 19:04:57 +00:00
|
|
|
6. Trademarks. This License does not grant permission to use the trade
|
|
|
|
names, trademarks, service marks, or product names of the Licensor
|
|
|
|
and its affiliates, except as required to comply with Section 4(c) of
|
|
|
|
the License and to reproduce the content of the NOTICE file.
|
2014-02-26 01:08:22 +00:00
|
|
|
|
2013-09-26 19:04:57 +00:00
|
|
|
You may obtain a copy of the Apache License at
|
2014-02-26 01:08:22 +00:00
|
|
|
|
2013-09-26 19:04:57 +00:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2014-02-26 01:08:22 +00:00
|
|
|
|
2013-09-26 19:04:57 +00:00
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the Apache License with the above modification is
|
|
|
|
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
KIND, either express or implied. See the Apache License for the specific
|
|
|
|
language governing permissions and limitations under the Apache License.
|
2013-09-18 21:17:33 +00:00
|
|
|
|
2013-07-04 17:47:56 +00:00
|
|
|
|
|
|
|
Subdivision Surfaces
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
:local:
|
|
|
|
:backlinks: none
|
|
|
|
|
|
|
|
----
|
|
|
|
|
2013-07-08 01:20:46 +00:00
|
|
|
Introduction
|
|
|
|
============
|
2013-07-04 17:47:56 +00:00
|
|
|
|
2013-09-18 21:17:33 +00:00
|
|
|
The most common way to model complex smooth surfaces is by using a patchwork of
|
|
|
|
bicubic patches such as BSplines or NURBS.
|
2013-07-04 17:47:56 +00:00
|
|
|
|
|
|
|
.. image:: images/torus.png
|
|
|
|
:align: center
|
|
|
|
:height: 200
|
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
However, while they do provide a reliable smooth limit surface definition,
|
|
|
|
bi-cubic patch surfaces are limited to 2-dimensional topologies, which only
|
2015-04-04 01:29:10 +00:00
|
|
|
describe a very small fraction of real-world shapes. This fundamental
|
2014-09-05 22:07:46 +00:00
|
|
|
parametric limitation requires authoring tools to implement at least the
|
|
|
|
following functionalities:
|
2013-07-08 01:20:46 +00:00
|
|
|
|
2013-07-30 02:14:19 +00:00
|
|
|
- smooth trimming
|
|
|
|
- seams stitching
|
2013-09-18 21:17:33 +00:00
|
|
|
|
2013-07-08 01:20:46 +00:00
|
|
|
Both trimming and stitching need to guarantee the smoothness of the model both
|
2013-09-18 21:17:33 +00:00
|
|
|
spatially and temporally as the model is animated. Attempting to meet these
|
2013-07-08 01:20:46 +00:00
|
|
|
requirements introduces a lot of expensive computations and complexity.
|
|
|
|
|
|
|
|
Subdivision surfaces on the other hand can represent arbitrary topologies, and
|
2013-09-18 21:17:33 +00:00
|
|
|
therefore are not constrained by these difficulties.
|
2013-07-08 01:20:46 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Arbitrary Topology
|
|
|
|
==================
|
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
A subdivision surface, like a parametric surface, is described by its control
|
|
|
|
mesh of points. The surface itself can approximate or interpolate this control
|
|
|
|
mesh while being piecewise smooth. But where polygonal surfaces require large
|
|
|
|
numbers of data points to approximate being smooth, a subdivision surface is
|
|
|
|
smooth - meaning that polygonal artifacts are never present, no matter how the
|
|
|
|
surface animates or how closely it is viewed.
|
2013-07-08 01:20:46 +00:00
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
Ordinary cubic B-spline surfaces are rectangular grids of tensor-product
|
|
|
|
patches. Subdivision surfaces generalize these to control grids with arbitrary
|
|
|
|
connectivity.
|
2013-07-08 01:20:46 +00:00
|
|
|
|
2013-07-16 02:06:57 +00:00
|
|
|
.. raw:: html
|
2013-07-08 01:20:46 +00:00
|
|
|
|
2013-07-16 02:06:57 +00:00
|
|
|
<center>
|
|
|
|
<p align="center">
|
2015-06-23 03:03:21 +00:00
|
|
|
<IMG src="images/tetra.0.png" style="width: 20%;">
|
|
|
|
<IMG src="images/tetra.1.png" style="width: 20%;">
|
|
|
|
<IMG src="images/tetra.2.png" style="width: 20%;">
|
|
|
|
<IMG src="images/tetra.3.png" style="width: 20%;">
|
2013-07-16 02:06:57 +00:00
|
|
|
</p>
|
|
|
|
</center>
|
2013-07-08 01:20:46 +00:00
|
|
|
|
2013-07-04 17:47:56 +00:00
|
|
|
----
|
|
|
|
|
2015-06-23 00:49:46 +00:00
|
|
|
Uniform Subdivision
|
|
|
|
===================
|
|
|
|
|
|
|
|
Applies a uniform refinement scheme to the coarse faces of a mesh.
|
|
|
|
The mesh converges closer to the limit surface with each iteration of the algorithm.
|
|
|
|
|
|
|
|
.. image:: images/uniform.gif
|
|
|
|
:align: center
|
|
|
|
:width: 300
|
|
|
|
:target: images/uniform.gif
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Feature Adaptive Subdivision
|
|
|
|
============================
|
|
|
|
|
|
|
|
Applies a progressive refinement strategy to isolate irregular features.
|
|
|
|
The resulting vertices can be assembled into bi-cubic patches defining the limit surface.
|
|
|
|
|
|
|
|
.. image:: images/adaptive.gif
|
|
|
|
:align: center
|
|
|
|
:width: 300
|
|
|
|
:target: images/adaptive.gif
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Uniform or Adaptive ?
|
|
|
|
=====================
|
|
|
|
|
|
|
|
Feature adaptive refinement can be much more economical in terms of time and memory use,
|
|
|
|
but the best method to use depends on application needs.
|
|
|
|
|
|
|
|
The following table identifies several factors to consider:
|
|
|
|
|
|
|
|
+-------------------------------------------------------+--------------------------------------------------------+
|
|
|
|
| Uniform | Feature Adaptive |
|
|
|
|
+=======================================================+========================================================+
|
|
|
|
| | |
|
|
|
|
| * Exponential geometry growth | * Geometry growth close to linear and occuring only in |
|
|
|
|
| | the neighborhood of isolated topological features |
|
|
|
|
| | |
|
|
|
|
+-------------------------------------------------------+--------------------------------------------------------+
|
|
|
|
| | |
|
|
|
|
| * Current implementation only produces bi-linear | * Current implementation only produces bi-cubic |
|
|
|
|
| patches for uniform refinement | patches for feature adaptive refinement |
|
|
|
|
| | |
|
|
|
|
+-------------------------------------------------------+--------------------------------------------------------+
|
|
|
|
| | |
|
|
|
|
| * All face-varying interpolation rules supported at | * Currently, only bi-linear face-varying interpolation |
|
|
|
|
| refined vertex locations | is supported for bi-cubic patches |
|
|
|
|
| | |
|
|
|
|
+-------------------------------------------------------+--------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. container:: notebox
|
|
|
|
|
|
|
|
**Release Notes (3.0.0)**
|
|
|
|
|
|
|
|
* Full support for bi-cubic face-varying interpolation is a significant
|
|
|
|
feature which will be supported in future releases.
|
|
|
|
|
|
|
|
* Feature adaptive refinement for the Loop subdivision scheme is
|
|
|
|
expected to be supported in future releases.
|
|
|
|
|
|
|
|
----
|
|
|
|
|
2013-07-08 01:20:46 +00:00
|
|
|
Boundary Interpolation Rules
|
|
|
|
============================
|
|
|
|
|
2015-01-09 03:07:35 +00:00
|
|
|
Boundary interpolation rules control how boundary edges and vertices are interpolated.
|
2013-07-30 02:14:19 +00:00
|
|
|
|
2013-09-18 21:17:33 +00:00
|
|
|
The following rule sets can be applied to vertex data interpolation:
|
|
|
|
|
2014-12-18 19:14:19 +00:00
|
|
|
+----------------------------------+----------------------------------------------------------+
|
|
|
|
| Mode | Behavior |
|
|
|
|
+==================================+==========================================================+
|
2015-06-17 18:14:06 +00:00
|
|
|
| **VTX_BOUNDARY_NONE** | No boundary edge interpolation should occur; instead |
|
|
|
|
| | boundary faces are tagged as holes so that the boundary |
|
|
|
|
| | edge-chain continues to support the adjacent interior |
|
|
|
|
| | faces but is not considered to be part of the refined |
|
|
|
|
| | surface |
|
2014-12-18 19:14:19 +00:00
|
|
|
+----------------------------------+----------------------------------------------------------+
|
2015-01-09 03:07:35 +00:00
|
|
|
| **VTX_BOUNDARY_EDGE_ONLY** | All the boundary edge-chains are sharp creases; boundary |
|
2014-12-18 19:14:19 +00:00
|
|
|
| | vertices are not affected |
|
|
|
|
+----------------------------------+----------------------------------------------------------+
|
2015-01-09 03:07:35 +00:00
|
|
|
| **VTX_BOUNDARY_EDGE_AND_CORNER** | All the boundary edge-chains are sharp creases and |
|
|
|
|
| | boundary vertices with exactly one incident face are |
|
|
|
|
| | sharp corners |
|
|
|
|
+----------------------------------+----------------------------------------------------------+
|
2013-09-18 21:17:33 +00:00
|
|
|
|
2015-06-23 16:26:02 +00:00
|
|
|
On a grid example:
|
2013-09-20 17:39:05 +00:00
|
|
|
|
|
|
|
.. image:: images/vertex_boundary.png
|
|
|
|
:align: center
|
|
|
|
:target: images/vertex_boundary.png
|
|
|
|
|
|
|
|
|
2015-01-09 03:07:35 +00:00
|
|
|
----
|
2013-09-18 21:17:33 +00:00
|
|
|
|
2015-01-09 03:07:35 +00:00
|
|
|
Face-Varying Interpolation Rules
|
|
|
|
================================
|
|
|
|
|
2015-06-19 00:30:15 +00:00
|
|
|
Face-varying data is used when discontinuities are required in the data over the
|
|
|
|
surface -- mostly commonly the seams between disjoint UV regions.
|
2015-01-09 03:07:35 +00:00
|
|
|
Face-varying data can follow the same interpolation behavior as vertex data, or it
|
|
|
|
can be constrained to interpolate linearly around selective features from corners,
|
2015-06-17 18:22:47 +00:00
|
|
|
boundaries, or the entire interior of the mesh.
|
2015-01-09 03:07:35 +00:00
|
|
|
|
2015-06-19 00:30:15 +00:00
|
|
|
The following rules can be applied to face-varying data interpolation -- the
|
|
|
|
ordering here applying progressively more linear constraints:
|
|
|
|
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
|
|
|
| Mode | Behavior |
|
|
|
|
+================================+=============================================================+
|
|
|
|
| **FVAR_LINEAR_NONE** | smooth everywhere the mesh is smooth |
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
|
|
|
| **FVAR_LINEAR_CORNERS_ONLY** | sharpen (linearly interpolate) corners only |
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
|
|
|
| **FVAR_LINEAR_CORNERS_PLUS1** | CORNERS_ONLY + sharpening of junctions of 3 or more regions |
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
|
|
|
| **FVAR_LINEAR_CORNERS_PLUS2** | CORNERS_PLUS1 + sharpening of darts and concave corners |
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
|
|
|
| **FVAR_LINEAR_BOUNDARIES** | linear interpolation along all boundary edges and corners |
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
|
|
|
| **FVAR_LINEAR_ALL** | linear interpolation everywhere (boundaries and interior) |
|
|
|
|
+--------------------------------+-------------------------------------------------------------+
|
2015-01-09 03:07:35 +00:00
|
|
|
|
|
|
|
These rules cannot make the interpolation of the face-varying data smoother than
|
|
|
|
that of the vertices. The presence of sharp features of the mesh created by
|
|
|
|
sharpness values, boundary interpolation rules, or the subdivision scheme itself
|
|
|
|
(e.g. Bilinear) take precedence.
|
2013-07-30 02:14:19 +00:00
|
|
|
|
2015-06-19 00:30:15 +00:00
|
|
|
All face-varying interpolation modes illustrated in UV space using the
|
|
|
|
catmark_fvar_bound1 regression shape -- a simple 4x4 grid of quads segmented
|
|
|
|
into three UV regions (their control point locations implied by interpolation
|
|
|
|
in the FVAR_LINEAR_ALL case):
|
2014-02-26 01:08:22 +00:00
|
|
|
|
|
|
|
.. image:: images/fvar_boundaries.png
|
|
|
|
:align: center
|
|
|
|
:target: images/fvar_boundaries.png
|
|
|
|
|
2013-07-08 01:20:46 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Semi-Sharp Creases
|
|
|
|
==================
|
|
|
|
|
2014-09-05 22:07:46 +00:00
|
|
|
It is possible to modify the subdivision rules to create piecewise smooth
|
|
|
|
surfaces containing infinitely sharp features such as creases and corners. As a
|
|
|
|
special case, surfaces can be made to interpolate their boundaries by tagging
|
|
|
|
their boundary edges as sharp.
|
2013-07-30 02:14:19 +00:00
|
|
|
|
2013-09-18 21:17:33 +00:00
|
|
|
However, we've recognized that real world surfaces never really have infinitely
|
2014-09-05 22:07:46 +00:00
|
|
|
sharp edges, especially when viewed sufficiently close. To this end, we've
|
|
|
|
added the notion of semi-sharp creases, i.e. rounded creases of controllable
|
|
|
|
sharpness. These allow you to create features that are more akin to fillets and
|
|
|
|
blends. As you tag edges and edge chains as creases, you also supply a
|
|
|
|
sharpness value that ranges from 0-10, with sharpness values >=10 treated as
|
|
|
|
infinitely sharp.
|
|
|
|
|
|
|
|
It should be noted that infinitely sharp creases are really tangent
|
|
|
|
discontinuities in the surface, implying that the geometric normals are also
|
|
|
|
discontinuous there. Therefore, displacing along the normal will likely tear
|
|
|
|
apart the surface along the crease. If you really want to displace a surface at
|
|
|
|
a crease, it may be better to make the crease semi-sharp.
|
2013-07-30 02:14:19 +00:00
|
|
|
|
2015-06-23 03:03:21 +00:00
|
|
|
.. image:: images/gtruck.png
|
2013-07-16 02:06:57 +00:00
|
|
|
:align: center
|
|
|
|
:height: 300
|
2015-06-23 03:03:21 +00:00
|
|
|
:target: images/gtruck.png
|
2013-07-16 02:06:57 +00:00
|
|
|
|
2013-07-04 17:47:56 +00:00
|
|
|
----
|
|
|
|
|
2013-11-01 18:38:20 +00:00
|
|
|
Chaikin Rule
|
|
|
|
============
|
|
|
|
|
|
|
|
Chaikin's curve subdivision algorithm improves the appearance of multi-edge
|
2014-09-05 22:07:46 +00:00
|
|
|
semi-sharp creases with varying weights. The Chaikin rule interpolates the
|
2013-11-18 23:56:07 +00:00
|
|
|
sharpness of incident edges.
|
|
|
|
|
2014-12-18 19:14:19 +00:00
|
|
|
+---------------------+---------------------------------------------+
|
|
|
|
| Mode | Behavior |
|
|
|
|
+=====================+=============================================+
|
|
|
|
| **CREASE_UNIFORM** | Apply regular semi-sharp crease rules |
|
|
|
|
+---------------------+---------------------------------------------+
|
|
|
|
| **CREASE_CHAIKIN** | Apply "Chaikin" semi-sharp crease rules |
|
|
|
|
+---------------------+---------------------------------------------+
|
|
|
|
|
|
|
|
Example of contiguous semi-sharp creases interpolation:
|
|
|
|
|
2013-11-18 23:56:07 +00:00
|
|
|
.. image:: images/chaikin.png
|
|
|
|
:align: center
|
|
|
|
:target: images/chaikin.png
|
2013-11-01 18:38:20 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2015-06-10 18:43:18 +00:00
|
|
|
"Triangle Subdivision" Rule
|
|
|
|
===========================
|
|
|
|
|
|
|
|
The triangle subdivision rule is a rule added to the Catmull-Clark scheme that
|
|
|
|
can be applied to all triangular faces; this rule was empirically determined to
|
|
|
|
make triangles subdivide more smoothly. However, this rule breaks the nice
|
|
|
|
property that two separate meshes can be joined seamlessly by overlapping their
|
|
|
|
boundaries; i.e. when there are triangles at either boundary, it is impossible
|
|
|
|
to join the meshes seamlessly
|
|
|
|
|
|
|
|
+---------------------+---------------------------------------------+
|
|
|
|
| Mode | Behavior |
|
|
|
|
+=====================+=============================================+
|
|
|
|
| **TRI_SUB_CATMARK** | Default Catmark scheme weights |
|
|
|
|
+---------------------+---------------------------------------------+
|
|
|
|
| **TRI_SUB_SMOOTH** | "Smooth triangle" weights |
|
|
|
|
+---------------------+---------------------------------------------+
|
|
|
|
|
|
|
|
Cylinder example :
|
|
|
|
|
|
|
|
.. image:: images/smoothtriangles.png
|
|
|
|
:align: center
|
|
|
|
:height: 300
|
|
|
|
:target: images/smoothtriangles.png
|
|
|
|
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Manifold vs Non-Manifold Geometry
|
|
|
|
=================================
|
|
|
|
|
|
|
|
Continuous limit surfaces generally require that the topology be a
|
|
|
|
two-dimensional manifold for the limit surface to be unambiguous. It is
|
|
|
|
possible (and sometimes useful, if only temporarily) to model non-manifold
|
|
|
|
geometry and so create surfaces whose limit is not as well-defined.
|
|
|
|
|
|
|
|
The following examples show typical cases of non-manifold topological
|
|
|
|
configurations.
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Non-Manifold Fan
|
|
|
|
****************
|
|
|
|
|
|
|
|
This "fan" configuration shows an edge shared by 3 distinct faces.
|
|
|
|
|
|
|
|
.. image:: images/nonmanifold_fan.png
|
|
|
|
:align: center
|
|
|
|
:target: images/nonmanifold_fan.png
|
|
|
|
|
|
|
|
With this configuration, it is unclear which face should contribute to the
|
|
|
|
limit surface (assuming it is singular) as three of them share the same edge.
|
|
|
|
Fan configurations are not limited to three incident faces: any configuration
|
|
|
|
where an edge is shared by more than two faces incurs the same problem.
|
|
|
|
|
|
|
|
These and other regions involving non-manifold edges are dealt with by
|
|
|
|
considering regions that are "locally manifold". Rather than a single limit
|
|
|
|
surface through this problematic edge with its many incident faces, the edge
|
|
|
|
locally partitions a single limit surface into more than one. So each of the
|
|
|
|
three faces here will have their own (locally manifold) limit surface -- all
|
|
|
|
of which meet at the shared edge.
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
Non-Manifold Disconnected Vertex
|
|
|
|
********************************
|
|
|
|
|
|
|
|
A vertex is disconnected from any edge and face.
|
|
|
|
|
|
|
|
.. image:: images/nonmanifold_vert.png
|
|
|
|
:align: center
|
|
|
|
:target: images/nonmanifold_vert.png
|
|
|
|
|
|
|
|
This case is fairly trivial: there is a very clear limit surface for the four
|
|
|
|
vertices and the face they define, but no possible way to exact a limit surface
|
|
|
|
from the disconnected vertex.
|
|
|
|
|
|
|
|
While the vertex does not contribute to any
|
|
|
|
limit surface, it may not be completely irrelevant though. Such vertices may
|
|
|
|
be worth retaining during subdivision (if for no other reason than to preserve
|
|
|
|
certain vertex ordering) and simply ignored when it comes time to consider
|
|
|
|
the limit surface.
|
|
|
|
|