2
$\begingroup$

I implemented catmul clark based on this Wikipedia article. And it seems to work fine for meshes where the edge point count is equal to the face point count, but not for planes where the corners have 2 edge points and 1 face point.

The article states the following for this formula

$$ \frac{F + 2R + (n-3)P}{n} $$

(Note that from the perspective of a vertex P, the number of edges neighboring P is also the number of adjacent faces, hence n)

And that seems to be true for cube-like shapes, but not for planes.

point count

Does this implementation not work for planes, or am I doing something wrong?

$\endgroup$
1
  • $\begingroup$ 2 edge points? I can see how this would happen in code, but anyplace you end up with 2 points on top of each other the curves will have the "expected" behavior that occurs when you have to coincident points. $\endgroup$
    – pmw1234
    Jun 1 at 10:54
1
$\begingroup$

The procedure only works for closed meshes or closed parts of a mesh with boundaries.

For vertices $V_{i}$ on the boundary of an mesh you have to use the following rules:

$$V_i = \frac{V_{i-1} + 6 V_{i} + V_{i+1}}{8},$$ where $V_{i-1}$ and $V_{i+1}$ are previous and next vertex on the boundary with respect to $V_i$. In your case it would be:

$$P = \frac{e_2 + 6 P + e_1}{8}.$$ New positions on edges of the boundary are inserted as the midpoint between two subsequent vertices. This will nicely smooth the boundaries of the mesh and the generated boundary curve will reproduce a uniform cubic B-spline curve in the limit.

You can also interpolate the corners of your plane if you do not apply this update step to the corners, but let them remain stationary.

$\endgroup$
2
  • $\begingroup$ This seems to work, except for the non-corner edges. Those are slightly bent inward, creating a slightly jagged outer edge, but that could be due to my implementation. Could you please share the source of this solution? $\endgroup$
    – Jan-Fokke
    Jun 1 at 18:36
  • $\begingroup$ graphics.pixar.com/library/SEC/supplemental.pdf You can look at figure 4 for a summary of the CC subdivision rules. $\endgroup$
    – Reynolds
    Jun 1 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.