with Parallelogram Prediction Compressing Polygon Mesh Geometry Martin Isenburg UNC Chapel Hill Pierre Alliez INRIA Sophia-Antipolis
Take this home: “Non-triangular faces in the mesh can be exploited for more efficient predictive compression of vertex positions.” “Non-triangular faces tend to be planar and convex.”
Overview Background Previous Work Linear Prediction Schemes “within” versus “across” Example Run Can we do better ? Conclusion
Background
Polygon Meshes connectivity geometry vertex 1 ( x, y, z ) vertex 2 ( x, y, z ) vertex 3 ( x, y, z ) vertex v face face face face f ~ 4v 32 bits 3v * 32 bits size: bytes log 2 ( v ) 2832 vertices
Geometry Compression [ Deering, 95 ] – Fast Rendering – Progressive Transmission – Maximum Compression Geometry Compression [ Deering, 95 ] Mesh Compression Maximum Compression
Geometry Compression [ Deering, 95 ] – Fast Rendering – Progressive Transmission – Maximum Compression Connectivity Geometry Geometry Compression [ Deering, 95 ] Mesh Compression Maximum Compression Geometry
Geometry Compression [ Deering, 95 ] – Fast Rendering – Progressive Transmission – Maximum Compression Connectivity Geometry – Triangle Meshes – Polygon Meshes Geometry Compression [ Deering, 95 ] Mesh Compression Polygon Meshes Maximum Compression Geometry
Triangle Mesh Compression Connectivity Coder – stores the connectivity as sequence of vertex degrees Triangle Mesh Compression [ Touma & Gotsman, Graphics Interface 98 ] Geometry Coder – stores the geometry as sequence of vectors; each corrects the prediction of a vertex position
Not Triangles … Polygons! Face Fixer [ Isenburg & Snoeyink, 00 ]
Connectivity Coder Generalization of TG coder Compressing Polygon Connectivity with Degree Duality Prediction, [ Isenburg, 02 ] Near-optimal connectivity coding of Polygon meshes, [ Khodakovsky, Alliez, Desbrun & Schroeder, 02 ] this paper [ Isenburg & Alliez, 02 ] Geometry Coder
triceratops galleon cessna … tommygun cow teapot … Results TG bits per vertex model IA … min / max / average [ % ] = 9 / 41 / % 35 % % -1 % 24 % gain
Previous Work
Classic approaches [ 95 – 98 ]: – linear prediction Geometry Compression [ Deering, 95 ] Geometric Compression through topological surgery [ Taubin & Rossignac, 98 ] Triangle Mesh Compression [ Touma & Gotsman, 98 ] Java3DMPEG - 4Virtue3D
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based Spectral Compression of Mesh Geometry [ Karni & Gotsman, 00 ] expensive numerical computations
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based Progressive Geometry Compression [ Khodakovsky et al., 00 ] modifies mesh prior to compression
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based Geometric Compression for interactive transmission [ Devillers & Gandoin, 00 ] poly-soups; complex geometric algorithms
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based Vertex data compression for triangle meshes [ Lee & Ko, 00 ] local coord-system + vector-quantization
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based certain 3D models + expensive matching Compression of engineering models by repeated feature [ Shikhare et al., 01 ] discovery
Previous Work Classic approaches [ 95 – 98 ]: – linear prediction Recent approaches [ 00 – 02 ]: – spectral – re-meshing – space-dividing – vector-quantization – feature discovery – angle-based Angle-Analyzer: A triangle- quad mesh codec [ Lee, Alliez & Desbrun, 02 ] dihedral + internal = heavy trigonometry
Linear Prediction Schemes
1.quantize positions with b bits 2.traverse positions 3.linear prediction from neighbors 4.store corrective vector ( , , ) ( 1008, 68, 718 ) floating point integer
Linear Prediction Schemes 1.quantize positions with b bits 2.traverse positions 3.linear prediction from neighbors 4.store corrective vector use traversal order implied by the connectivity coder
Linear Prediction Schemes 1.quantize positions with b bits 2.traverse positions 3.linear prediction from neighbors 4.store corrective vector ( 1004, 71, 723 ) apply prediction rule prediction
Linear Prediction Schemes 1.quantize positions with b bits 2.traverse positions 3.linear prediction from neighbors 4.store corrective vector position distribution corrector distribution ( 1004, 71, 723 )( 1008, 68, 718 ) position ( 4, -3, -5 ) correctorprediction
Deering, 95 Prediction: Delta-Coding A processed region unprocessed region P P = A
Taubin & Rossignac, 98 Prediction: Spanning Tree A B C D E processed region unprocessed region P P = α A + βB + γC + δD + εE + …
Touma & Gotsman, 98 Prediction: Parallelogram Rule processed region unprocessed region P P = A – B + C A B C
Parallelogram Rule “good” prediction “bad” prediction “non-convex” “bad” prediction “non-planar”
More “good” Predictions average multiple predictions Multi-way geometry encoding. [ Cohen-Or, Cohen & Irony, 02 ] Optimized compression of triangle mesh geometry using prediction trees. [ Kronrod & Gotsman, 02 ] search for best prediction direct the traversal ( prediction tree ) average gain of 11 %average gain of 8 % ( smooth ) & 42 % ( CAD )
Polygon Meshes … ? TG coder triangulate compress resulting triangle mesh IA coder do NOT triangulate use polygons for better predictions within versus across
“within” versus “across”
Non-triangular Faces Question:Why would a mesh have a non-triangular face?
Non-triangular Faces Question:Why would a mesh have a non-triangular face? Answer:Because there was no reason to triangulate it! This face was “convex” and “planar”. use this info for “good” predictions
within-predictions often find existing parallelograms ( quadrilaterals ) “within” versus “across” within-predictions avoid creases within-prediction across-prediction
triceratops galleon cessna … tommygun cow teapot … Bitrates: “within” vs. “across” within bits per vertex model across … min / max / average [ % ] = 13 / 47 / % 37 % 45 % % - 34 % diff
Maximizing the number of within-predictions
Greedy Strategy always try to: ( A )pick a vertex whose position can be within-predicted otherwise: ( B )do an across-prediction, but pick a vertex that creates ( A ) for the next iteration
we’re lucky: process vertices in order dictated by our connectivity coder Traversal Order Compressing Polygon Connectivity with Degree Duality Prediction [ Isenburg, 02 ] Valence-driven Connectivity Encoding for 3D meshes [ Alliez & Desbrun, 01 ] avoid “splits” by adaptive traversal
“splits”
processed region
“splits” processed region
“splits” processed region
“splits” processed region
“splits” processed region
“splits” processed region split
Adaptive Traversal
% of within-predictions triceratops galleon cessna … tommygun cow teapot within prediction type: model min / max / average [ % ] = 74 / 91 / 84 across ………… lastcenter 90 % 85 % 83 % … 81 % 0 % 85 % within % of
Example Decoding Run
center-prediction: no parallelogram rule possible predict this position as center of the bounding box center
Example Decoding Run 0 last last-prediction: no parallelogram rule possible predict this position as the last position
Example Decoding Run 1 0 last last-prediction: no parallelogram rule possible predict this position as the last position
Example Decoding Run across-prediction: parallelogram rule possible predict across two polygons across 1 0 2
Example Decoding Run within-prediction: use parallelogram rule predict within a polygon within
Example Decoding Run 1 0 within 4 3 2
Example Decoding Run across 5 4 0
Example Decoding Run within 6 4 5
Example Decoding Run within 6 4 3
Example Decoding Run within 7 2 3
Can we do better ? ( and keep it simple )
Keep it simple Constraints: single linear prediction use connectivity traversal order Possibilities: floating point coefficients use more than three vertices
better within-predictions perfect systematic error deg = 4 assuming ideal ( regular ) polygons P = A – B + C P = α A + βB + γC α = 1, β = -1, γ = 1 deg = 6 A BC deg = 8 B C A C B A deg = 5 A C B
Switch “within” Coefficients if ( deg == 4 ) { α = 1.000;β = ;γ = 1.000; } else if ( deg == 5 ) { α = 1.024;β = ;γ = 0.503; } else if ( deg == 6 ) { α = 1.066;β = ;γ = 0.249; } else … How did we pick these numbers?
Finding the Coefficients no obvious “scientific” way use Matlab – for each degree separately – sum all possible prediction errors as function of α and β – optimize α and β for minimal error Err = len ( N – α A + βB + γC ) with 1 = α + β + γ B A C N
Switch “within” Coefficients if ( deg == 4 ) { α = 1.000;β = ;γ = 1.000; } else if ( deg == 5 ) { α = 1.024;β = ;γ = 0.503; } else if ( deg == 6 ) { α = 1.066;β = ;γ = 0.249; } else … on average 70 % of predictionsparallelogram prediction within a quadrilateral is optimal
assuming equal edge length better across-predictions 33333434353536363838 43434444454546464848 adjacent polygons are coplanar
assuming equal edge length better across-predictions 33333434353536363838 43434444454546464848 adjacent polygons are not coplanar crease angle: 60°
Switch “across” Coefficients if ( deg == 3 3 ) { α = 0.917;β = ;γ = 0.916; } else if ( deg == 3 4 ) { α = 0.621;β = ;γ = 0.883; } else if ( deg == 3 5 ) { α = 0.557;β = ;γ = 0.777; } else … … } else if ( deg == 4 3 ) { α = 1.153;β = ;γ = 0.201; } else if ( deg == 4 4 ) { α = 1.001;β = ;γ = 0.647; } else … …
Conclusion
Summary ( 1 ) polygon information can improve predictive geometry compression using parallelogram rule “within” rather than “across” polygons average improvement of 23 % over TG coder has simple and straight-forward implementation
Summary ( 2 ) proof-of-concept implementation in form of a Web java-applet compression software will soon be made available
Future Work a scientific way to find numbers for this “coefficient switching” polygonification: – turn triangle meshes into polygon meshes for better compression
Acknowledgments funding: ARC Télégéo grant of INRIA at Sophia-Antipolis logistics: Jack Snoeyink Olivier Devillers Agnès Clément Bessière Jean-Daniel Boissonnat
Thank You!