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