Skip to topic
|
Skip to bottom
Jump:
TModeling
TModeling Web
TModeling Web Home
Changes
Notify
Index
Search
Webs
BioGeometry
Main
TModeling
TWiki
Edit
Attach
Printable
TModeling.Sm2sm
r1.1 - 16 Dec 2008 - 13:38 - Main.guest
topic end
Start of topic |
Skip to actions
*sm2sm* Software that can compress meshes on-the-fly in whichever triangle order they happen to be in. It can do so in a completely lossless manner if that is really needed. We no longer need to give the entire mesh to the compressor and then wait several hours (for large meshes) until preprocessing has finished and then wait a few more hours until compression has completed. We simply compress the mesh triangle by triangle without any preprocessing or and without any temporary storage. As you see below we can simply "pipe" meshes to and from a compressed format. Also, if our mesh triangles are in a particular order that we like to preserve (e.g. an order for efficient rendering on graphics cards with vertex cache) then we will not loose this order during compression. Some people just do not like the idea of quantizing floating point numbers prior to compression. Therefore we have the option of doing the geometry compression completely losslessly (e.g. every single bit of each float will be put back into its place after decompression). This lowers the achieved compression but allows us to use compression whenever quantization is not allowed. %TOC% ---+++ SM formats (_For more information regarding the various SM formats, go to [[http://wwwx.cs.unc.edu/Research/compgeom/twiki/bin/view.cgi/TModeling/StreamingCompression][StreamingCompression]]_) We currently use three streaming formats. SMA and SMB are uncompressed; SMC is compressed. You can convert between the formats using the sm2sm converter in the following manner: <pre>sm2sm -i mesh.sma -o mesh.smc </pre> |*File type*| *Description*| |*.sma| a simple OBJ-like ASCII format | |*.smb| a simple PLY-like uncompressed binary format | |*.smc| our compressed binary format | _More formats are being developed - stay tuned._ ------ ---+++ Compression <pre> sm2sm -i cow.sma -o cow.smc sm2sm -isma -o cow.smc < cow.sma sm2sm -isma -osmc < cow.sma > cow.smc </pre> --> compresses cow.sma with 16 bits of precision <pre> sm2sm -b 0 -i cow.sma -o cow_lossless.smc </pre> --> compresses cow.sma in a lossless manner <pre> sm2sm -b 12 -dry -i cow.sma -osmc </pre> --> compresses cow.sma with 12 bits while only producing bit-rate information <pre> sm2sm -compact -i canonical_cow.smf -o canonical_cow.smc </pre> --> compress your own meshes in non-streaming formats such as *.obj or *.smf or *.ply. use the "-compact" flag to finalize vertices. Without finalizing the compression rates will be much higher because each explicit index will use many more bits. Note that meshes in non-streaming formats are pretty much loaded into memory completely before compression can start ... ------ ---+++ Decompression <pre> sm2sm -i cow.smc -o cow.sma sm2sm -i cow.smb -osma > cow.sma </pre> --> decompresses the compressed cow.smc to our ASCII SM format <pre> sm2sm -i cow.smc -o cow.smb sm2sm -i cow.smc -osmb > cow.smb </pre> --> decompresses the compressed cow.smc to binary SM format <pre> sm2sm -dry -i cow.smc </pre> --> decompresses the compressed cow.smc without producing output ------ ---+++ Compression with delay buffer To improve compression rates we can give the compressor the option do some local re-orderings subject to a constraint of a maximal displacement of a triangle within the triangle array. This works great: <pre> sm2sm -i cow.sma -osmc -dry -delay 250 </pre> --> compresses cow.sma using a delay buffer of 250 triangles <pre> sm2sm -i cow.sma -osmc -dry -delay 5000 </pre> --> compresses cow.sma using a delay buffer of 5000 triangles Use the '-dry' flag to see itemized bit-rates. ------ ---+++Miscellaneous For more on streaming compression, experiment! See http://www.cs.unc.edu/~isenburg/smc/ for papers and interesting models, most of which are compressed. You can either first decompress them (to the binary format SMB), <pre> sm2sm -i big_mesh.smc -o big_mesh.smb sm2sm -i big_mesh.smb -osmc -delay 5000 -dry </pre> or directly decompress and recompress them. <pre> sm2sm -i big_mesh.smc -osmc -delay 5000 -dry </pre> For fun ... you can also pipe decompressor and compressor together, <pre> sm2sm -i big_mesh.smc -osmb | sm2sm -ismb -osmc -delay 5000 -dry </pre> or pipe them together using the ASCII format. <pre> sm2sm -i big_mesh.smc -osma | sm2sm -isma -osmc -delay 5000 -dry </pre> This teaches you how inefficient ASCII conversion is ...
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
More topic actions
Revisions: | r1.1
|
Total page history
|
Backlinks
You are here:
TModeling
>
Sm2sm
to top
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback