Does Catmull Clark Subdivision work for Meshes consisting of only triangles?

Started by
16 comments, last by teutoburger 7 years, 3 months ago

That's my question, does Catmull Clark Subdivision work for Meshes consisting of only triangles or is it basically designed for quad-faced meshes?

All the sources I found, somehow gave me the impression it works for Meshes made up of quad faces. Does it also work for Meshes with triangular faces?

Additional question, if it doesn't work, it there any subdivision scheme that works for such meshes?

Advertisement

It can be done, the problem is that dividing a triangle produces incorrect result up to 50% of the time.

It's the same problem when using a auto program to divide your quad mesh into triangles, it just uses a formula it has no way of knowing if the model looks correct.

Here is a quick example using Blender to explain.

ux250Tx.png

if it doesn't work, it there any subdivision scheme that works for such meshes?

I have once seen it done with tessellation of a triangle mesh. How it works I have no idea maybe some kind of smoothing based on the normal?

so, if I understand you correctly, given a triangle mesh, basically the usual/recommended way to use subdivision would be to:

-do a mesh operation, so that the triangle mesh is converted to a quad-faced mesh

-do subdivision on the quad-face mesh

-triangulate the quad-face mesh ?

edit: I'm trying to build tools, that allow me to create models, for populating my game world. I'd like them all to run from the same code base. So one of these tools should be a subdivision tool.

With that in mind, actually a better high level strategy, is to construct a quad-faced mesh from code, use that as input for catmull clark subdivision, and finally triangulate the output, use that as in-game mesh.

Catmull-Clark works on any convex polygon (including triangles), but it is better suited to quads and produces all quads after just one iteration.

For triangular meshes usually Loop subdivision can be better and it produces a triangular mesh. There is also the old ATI/AMD gpu friendly PN triangles subdivision.

PS: some references!

http://graphics.stanford.edu/courses/cs468-10-fall/LectureSlides/10_Subdivision.pdf

https://www.cise.ufl.edu/research/SurfLab/papers/00ati.pdf

From the artists point of view: Catmull Clark is a great subdivison method, but it totally requires quad meshes.

The artist will avoid triangles almost always and tries to use 5-sided polygons instead when necessary.

So use it only if you are willing to model with quads.

If you already have a lot if triangle models, conversion to quadmesh is hard to do for both humans or algorithms (eventually it's necessary to remesh the model).

Try Loop subdivision first for triangle meshes.

Some software uses Loop for triangles and Catmull Clark for anything else (e.g. XSI) - that's good but still the artist needs to work for a known subidivsion method upfront.

Modeling first and choosing kind of subidivsion later is a bad idea.

Thanks for the links, it's hard to find the good papers and lectures..

I got it working. After some ridiculous drafting..

The catmull clark delivered quad faces, as you say. I had to triangulate them and then check their orientation.

If the normal pointed inwards, the triangle had to be index-ordered, so that they were oriented such that the normal pointed outwards. Also my whole procedure is probably not very efficient. But it works. Thanks for the tips.

Here's the unit cube, after one subdivision pass.

[attachment=34158:catmull-clark.png]

Disney has a fast open source library working on GPU & CPU: http://graphics.pixar.com/opensubdiv/docs/intro.html

It can be done, the problem is that dividing a triangle produces incorrect result up to 50% of the time.

It's the same problem when using a auto program to divide your quad mesh into triangles, it just uses a formula it has no way of knowing if the model looks correct.

Here is a quick example using Blender to explain.

ux250Tx.png

if it doesn't work, it there any subdivision scheme that works for such meshes?

I have once seen it done with tessellation of a triangle mesh. How it works I have no idea maybe some kind of smoothing based on the normal?

I am not sure about what was done in order to have the image at the bottom-right. It does not look to be a subdivision since the number of faces look to be approximately the same.

I am not sure about what was done in order to have the image at the bottom-right. It does not look to be a subdivision since the number of faces look to be approximately the same.

left side shows good result from quad mesh, right side shows bad result from trimesh.

It's a good image to show the problem. Maybe you assumed right side means result from left side but that's not the case.

Catmull-Clark works on any convex polygon (including triangles)

That's slightly wrong - polys don't need to be convex (and also not planar).

I got it working. After some ridiculous drafting.. The catmull clark delivered quad faces, as you say. I had to triangulate them and then check their orientation. If the normal pointed inwards, the triangle had to be index-ordered, so that they were oriented such that the normal pointed outwards. Also my whole procedure is probably not very efficient. But it works. Thanks for the tips.

Looking good, very well done.

I would love to see how it responds to a normal model, if possible could you get one of the free models on the internet and show us the results?

I think the unpredictable way artist work would cause some unexpected results, although it looks really good so there is no way of telling without testing.

so, if I understand you correctly, given a triangle mesh, basically the usual/recommended way to use subdivision would be to: -do a mesh operation, so that the triangle mesh is converted to a quad-faced mesh -do subdivision on the quad-face mesh -triangulate the quad-face mesh ?

Converting to triangles, back to quads and then back to triangles will cause some unexpected results. It has the same problem as dividing, the code follows a solid rule and won't be able to work with strange results that artist could produce.

Of course if you knew what problems do happen you could set rules to allow for creation for assets that would work perfectly with your code.

I am not sure about what was done in order to have the image at the bottom-right. It does not look to be a subdivision since the number of faces look to be approximately the same.

It's normal in subdivision for faces to look the same, same leagnth faces makes it easy to work with and the results predictable.

H1zmLbF.png

Here is the mesh divided. First no division, then basic division followed by simple division and last is Catmull Clark.

Maybe it looked strange because I first used a simple division on the cube to resemble a more likely mesh, I also used two passes?

This topic is closed to new replies.

Advertisement