----------------------------------------------------- Edgebreaker encoding and decoding routines February 26, 2002 Andrzej Szymczak (andrzej@cc.gatech.edu) College of Computing Georgia Tech Atlanta, GA 30332 USA ----------------------------------------------------- OVERVIEW This is an implementation of the Edgebreaker 3D surface compression algorithms optimized for large and regular meshes and described in detail in the paper 'Optimized Edgebreaker Encoding for Large and Regular Triangle Meshes', available at http://www.cc.gatech.edu/fac/Andrzej.Szymczak Any updates of this code will also be posted on that web site. ----------------------------------------------------- BUILDING The code should compile on most LINUX/UNIX machines by simply typing 'make'. On some machines, some edits of the compier commands/options in the Makefile may be necessary. The resulting executables and the 'cenc' script have to be moved to the installation directory, preset to /usr/local/bin, using 'make install'. The installation directory can be changed by editing the 'BINDIR=' line in the Makefile. ----------------------------------------------------- FILE FORMAT This code uses a somewhat simplistic format for storing triangle meshes. Files in that format will have the '.t' extension. A .t file looks as follows N M t(0)[0] t(0)[1] t(0)[2] t(1)[0] t(1)[1] t(1)[2] .... t(N-1)[0] t(N-1)[1] t(N-1)[2] v(0)[0] v(0)[1] v(0)[2] v(1)[0] v(1)[1] v(1)[2] .... v(M-1)[0] v(M-1)[1] v(M-1)[2] where N and M are the numbers of triangles and vertices (respectively), t(i)[0], t(i)[1] and t(i)[2] are the identifiers of the vertices of the i-th triangle and v(j)[0],v(j)[1] and v(j)[2] are the x,y and z coordinates of the j-th vertex. All the counting is done starting from zero. ----------------------------------------------------- FILE FORMAT CONVERSION To convert a .t file to the inventor format use t2iv <.t file name> It will write the .iv file to the standard output. Similarly, to convert to the smf format, use t2smf <.t file name> ----------------------------------------------------- COMPRESSION AND DECOMPRESSION To compress, use the cenc script as follows cenc <.t file name> The quantization of the vertex coordinates is done by scaling them so that their coordinates fall between 0 and range and then rounding them to the nearest integer. The output is written to out.t.x To decompress a file named .t.x use cdec .t ----------------------------------------------------- LIMITATIIONS The input mesh has to be an orientable topological manifold, possibly with a boundary. Handles are handled correctly. The parallelogram rule residuals of the quantized mesh have to fit in an interval of length 2^14 ----------------------------------------------------- TERMS The program is distributed under the GNU GPL licence, see LICENCE or http://www.fsf.org/copyleft/gpl.html ----------------------------------------------------- CREDITS We are heavily basing on the range coder by Michael Schindler, available from http://www.compressconsult.com/rangecoder/ -----------------------------------------------------