6.09.2012

Success!!!!

Original dragon with normal colors

After smoothing the dragon, all of the normals are 0
It may not look it, but that black dragon is exactly what is supposed to be there.  I just switched from Assimp to GLM for reading obj files, and it appears GLM is what I should use.  Although it can only handle triangles, it is better for how I need to use it.  Anyways onto the dragon.  The first picture is just the regular mesh with normals for its colors.  It may look correct, but I needed to verify that the underlying structure was all correct.  I know everything is correct, except for one specific pair of pointers - symmetric edges.  That is, edges that point to the same two vertices.  


I check it manually, making sure that all pairs actually match.  However, it is hard to check for the case of an edge that does not have a partner.  


So, I used Catmull-Clark subdivision, I wrote for last semester's final project.  That method works on only faces that are closed, meaning faces that are completely surrounded by other faces.  This means it only works on faces who have only edges with valid symmetric partners.  Now, I know the dragon is a completely closed mesh, so if my structure was correct, subdivide should work on every face.


SO, I ran subdivide on the dragon, setting the normal of the new faces generated to (0,0,0), which would make them render in black.  And - success! I know my structure is good.