Jump to content
  • Advertisement
Sign in to follow this  
teutoburger

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

This topic is 724 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

 

Share this post


Link to post
Share on other sites
Advertisement

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.

Edited by teutoburger

Share this post


Link to post
Share on other sites

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

Edited by Jihodg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites
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?

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!