Blender Git Loki
Git Commits -> Revision 134e562
Revision 134e562 by Geoffrey Bantle (master) October 18, 2006, 05:18 (GMT) |
-> Improved Triangle to Quad conversion Alt-J behavior has been replaced by a port of the Tri2Quad python script currently in CVS. This method has many advantages over the old behavior. A simple illustration of how the new method is superior to the old can be made by triangulating a suzzane and converting it back to quads. http://www.umsl.edu/~gcbq44/t2q2a.jpg http://www.umsl.edu/~gcbq44/t2q2b.jpg The algorithm works by considering all possible triangle pairings and then weighting them according to how appropriate it would be to join. These pairs are then quick-sorted and those with the highest weighting factor are combined. The function is quite fast even for dense meshes and usually involves no noticeable wait-time for completion. For instance the following imported model took less than 2 seconds to convert on my 1.3ghz PPC powerbook: http://www.umsl.edu/~gcbq44/mimitri.jpg http://www.umsl.edu/~gcbq44/mimiquad.jpg It should be noted by the user that this method also discards face pairs where the two triangles: -do not share the same material -do not share the same UV image (texface) -do not share a compatible set of UV coordinates -do not share a compatible set of vertex colors -will form a concave quad or create a non-planar face Additionally if the edge shared by the pair is marked 'sharp' the pair will be discarded from the quicksort. In this way the user can gain great control over the conversion process if they desire as this imported VRML model of a sneaker illustrates: http://www.umsl.edu/~gcbq44/t2qa.jpg http://www.umsl.edu/~gcbq44/t2qb.jpg For the future it would be nice if some of the options for the conversion process, such as angle tolerance, could be made configurable in the UI. However it is unclear at this time which options should be made configurable and where to put them. Feedback on this is appreciated. Special Thanks goes to Joe Eager for the two macros he contributed to this code and to Campbell Barton for writing the script this was based on! |
Commit Details:
Full Hash: 134e5622193cd4eb168b0457208ed6794b5935df
SVN Revision: 8649
Parent Commit: f0fbffc
Lines Changed: +493, -70
1 Modified Path:
/source/blender/src/editmesh_tools.c (+493, -70) (Diff)