| |
|
|
||||
![]() |
||||||
| |
|
|||||
|
Geometry
resampling
At this point, the mapping computation is finished. One way to look
at the mapping is consider that each vertex has a 4-tuple parameter
which tells which base domain triangle it is associating with and it's
location (given by the barycentric coordinates) within this base domain
triangle. Another way to visualize the mapping is to imagine collapsing/wrapping
the original mesh triangulation (treated as a graph) on top of the base
domain.
Once we
define the edge algebra we can proceed to the next step: perturbing
the vertex coordinates.
Code
Snippets Once
the triangle in the collapsed original mesh containing the dyadic points
is found a linear interpolation can be used to find the resample location:
Where P is the dyadic point, Triangle ABC is the collapsed original triangle with original geometry. (a, b, g) is the barycentric coordinates of P within the triangle ABC in the collapsed graph. Hence P will be a resample point on the piecewise linear original mesh geometry. Repeating this process for all new vertices allows the perturbing of the subdivision connectivity mesh to approximate the original geometry. The following examples show the results. Horse and Venus Results
To sum
up, this article presents a simple algorithm to convert triangular meshes
into subdivision surfaces. The algorithm is both easy to understand
and implement, the main idea being to recast the problem as geometry
resampling and compute the mapping (parameterization of the original
mesh) with respect to a simple base domain. Subdivision surfaces open
the doors of opportunity to character animation, free form surface design
and efficient rendering. The next part of this article looks at applying
subdivision surfaces techniques to these tasks. Stay tuned! Discuss this article in Gamasutra's discussion forums ________________________________________________________
|
|||||||||||||||||||||||||
|
|