SURFIX 2.0 ---------- This is a utility made to fix some of the problems caused by Breeze Designer specifically, and possibly other software packages. When saving, these programs turn objects into a series of triangles. The problem with this is that for Meddle and other programs to work correctly, these triangles need to be arranged a specific way, so that it's possible to tell which side is the 'surface' and which belongs underneath. The program works with the .RAW file format which is usable by Meddle, a model editor for Quake. To use it, try it like this: surfix -i broken.raw -o fixed.raw -n This will read in the file 'broken.raw', fix the triangles, and then write out the results to 'fixed.raw'. When fixing the triangles, Surfix will also remove any degenerate (bad) triangles in the file. To do this, it separates the file into several "objects" made up of several triangles, and proceeds to try and orient all the triangles in that object with each other. To do this, it takes the triangle whose center is furthest from the center of the object, and then assumes that it points "out". I can offhand think of a couple of cases where this will not be true; however, in the large majority it will be true. If the object turns out in Meddle inside-out, you can flip it like so: surfix -i fixed.raw -o fixed2.raw -f However, this flips the entire object. If only one section is wrong, this doesn't particularly help. :) Other known problems: When Meddle saves .RAW files, it writes the name of the frame to the top of the file. This'll prevent surfix from working; just use your favourite text editor and cut it out. As an aside, because of Breeze Designer's dismal 'snap' ability, you can also use this to make all the points snap to a grid of a size you specify. Use like this: surfix -i fixed2.raw -o fixed3.raw -s 0.5 to force all the points onto a 0.5 width snap grid. All the flags, -n, -f, and -s, can be used in conjunction with each other. Any problems/questions/requests can be mailed to: tlawson@acs.ucalgary.ca Source code for this is (probably) available on request.