Simplify Surface Instructions
by Chris Tchou
USAGE: SimplifySurface [options] infile
- -f #
- Specifies the target number of triangle faces
- -v #
- Specifies the target numbef of vertices.
If both are given, the algorithm stops when both of these targets are met.
- -u #
- Specifies the level of initial subdivision.
Note: this just subdivides every triangle into 4 triangles, # times, fairly inefficiently.
Not an ideal solution, but the ideal solution could be an entire project in itself.
- Specifies the input file is in .smf format.
- Allows contractions that invert face normals.
The default is to put off these contractions until later by increasing their error.
(this means if every contraction inverts a normal, then it will loop forever)
Turning this on often results in a mesh that better follow the color contours, but will have inverted triangles in places.
- -o outfile.smf
- Specifies the output file (writes in .smf format)
- -c calfile
- Specifies the optional texture calibration file
If no file is given, vertices are colored by the color given in their input file, or 50% gray if no color is specified there
Example calfile (good for projecting onto a sphere centered at the origin): example.cal
- Calfile File Format: text, one parameter per line:
- -the input picture file name
- (Radiance's high dynamic range .pic format), this should be a cylindrical sphere projection (x/y = longitude/latitude)
- -the center of projection, x coordinate
- -the center of projection, y coordinate
- -the center of projection, z coordinate
- -the scale for color values
- (appropriate to compare to the coordinates), larger numbers increase the importance of color relative to geometry
Some things to try:
St. Peter's Basilica environment sphere, decimated to 8000 faces:
simplifysurface -s -c stp2.cal -o sphere8000.smf -f 8000 globe-rgb.smf
Globe, decimated to 800 faces:
simplifysurface -s -o globe800.smf -f 800 globe-rgb.smf
Cow, decimated to 1000 faces:
simplifysurface -s -o cow1000.smf -f 1000 cow.smf
or down to 100 faces - alot of the features are degenerating at this point..
simplifysurface -s -o cow100.smf -f 100 cow.smf
Swirl, decimated to 1000 faces:
simplifysurface -s -o swirl1000.smf -f 1000 swirl.smf