230 likes | 380 Views
Surface Simplification & Edgebreaker Compression for 2D Cel Animations. Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute of Technology. Cel Animations: Example. Foreground Cel. Background Cel. Animation. Motivation. Need to compress
E N D
Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute of Technology
Cel Animations: Example Foreground Cel Background Cel Animation
Motivation • Need to compress • To speed up transmission • Want to compress boundary of region • Image/video compression too expensive • Compress pixels instead of regions • MPEG, RLE, Octree, Gzip • Applications • Entertainment: Animations • Web-based instruction: manuals, tutorials, explanations • Visualization: weather, environmental, medical
Cel Animations: Observations • Collection of regions • Uniform color per region • Only few colors/regions • Shape of region changes slowly with time • Want to encode shape instead of pixels
Iso-surface Extraction Voxelization Playback Simplification Clipping Overview Compression Decompression Video
Prior Art (building blocks) • Iso-surface extraction to build 3D model • Marching Cubes [Lorensen & Cline’87] • Tetrahedral Decomposition [Gueziec’95] • Surface simplification for lossy compression • [Hoppe’96, Lindstrom & Turk’98, Rossignac & Borrel’93, Ronfard & Rossignac’96…] • Geometric Compression • [King & Rossignac’99, King et al’00, Rossignac’99: Edgebreaker, Rossignac & Szymczak’99, Rossignac et al’01, Taubin & Rossignac’98, Touma & Gotsman’98…]
Iso-surface Voxelization Simplification Clipping Playback Overview Compression Video Decompression
Voxelization • Assume animation is segmented into regions • Pixels P(x,y,t) sample 3D image-time space • We could extract the black/white bounding faces • But it would be too jaggy • Given region R, we define a scalar field: • As t changes, R sweeps a volume V:
Iso-surface Extraction • Compute S (bounding surface of V): • Interpolate F between pixel centers • piecewise constant • bilinear interpolation • linear interpolation(over triangular elements) • Use Marching tetrahedra [Gueziec’95]: simpler and more robust than marching cubes
Marching Tetrahedra • Each cube is divided into five tetrahedra • The iso-surface of a tetrahedron is either a triangle or a quad • Consistent tetrahedral decomposition of cubes ensures a watertight mesh
Marching Tetrahedra (contd…) • Tetrahedralization may produce sharp corners; depends upon the particular decomposition • Move corner away from the midpoint to smooth it out • Result is then independent of tetrahedralization
Iso-surface Voxelization Simplification Clipping Playback Overview Compression Video Decompression
Odd parity Odd parity Odd parity Simplification • Triangle count reduced by 95-99% for geometric error of less than 0.2% • Metro [Cignoni et al.’98] • Simplify using edge-collapse operations • [Lindstrom & Turk’98] • Degenerate cases • Surface folds onto itself • Manifold connectivity preserved • Surface remains watertight • Parity preserved
R R R b L C L E a S R E R C Compression • Edgebreaker for connectivity compression • Compresses connectivity to 1 bit per triangle • Vertex quantization • Span the range represented by the animation • Predictive encoding for vertices • Parallelogram prediction rule • Compresses geometry to 13 bits per vertex ...CRSRLECRRRLE (2T bit code: C=0, L=110, R=101, S=100, E=111)
Iso-surface Voxelization Playback Simplification Clipping Overview Compression Video Decompression
Animation Playback • Clip the surface with the plane t = frame # • Paint the front-facing triangles (shown in green here) in color of background (black) • Paint the back-facing triangles (shown in gray) with the region color • Degenerate triangles can causing popping artifacts
Animation Playback (contd…) • Parity checking logic improved to handle overlapping triangles • No need for z-buffer • Odd parity: point on clipping plane is inside the solid • Even parity: Front facing is visible • Hardware supported OpenGL stencil buffers to expedite process Parity: Even Odd Odd Even Clipping Plane View Plane
Summary • Input: series of images (uniform regions) • Represent each region as pixels • Represent its evolution as volume of voxels • Compute 3D boundary as iso-surface • Simplify while preserving parity test • Compress using Edgebreaker • Use clipping and stencils to display slices
Conclusion & Future Work • Conclusion • Improve cel animation compression • Ratios of 200 - 300 • Leverage existing techniques • Iso-surface extraction for binary voxels • Simplification • Compression • Future work • Compressing multiple regions together • Extensions to other applications: • medical imaging, weather visualization etc.