23
Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute of Technology

Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

  • View
    231

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Surface Simplification & Edgebreaker Compression for 2D Cel Animations

Vivek Kwatra & Jarek Rossignac

GVU Center, College of Computing

Georgia Institute of Technology

Page 2: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Cel Animations: Example

Foreground Cel

Background Cel

Animation

Page 3: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Page 4: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Page 5: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Voxelization

OverviewIso-surface Extraction

Simplification

Playback

Compression

Video

Clipping

Decompression

Page 6: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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…]

Page 7: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Voxelization

OverviewSimplification

Clipping

Compression

DecompressionVideo

Iso-surface

Playback

Page 8: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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:

RP

RP(P)

if ,1

if ,0F

5.0)(

PF

PV

Page 9: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

S P | F(P) 0.5

Page 10: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Page 11: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Page 12: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Voxelization

Playback

OverviewSimplification

Clipping

Compression

DecompressionVideo

Iso-surface

Page 13: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Odd parity

Odd parity

Odd parity

Page 14: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

C RS R

L ECRRR

LE a

b

...CRSRLECRRRLE

(2T bit code: C=0, L=110, R=101, S=100, E=111)

Page 15: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Playback

Voxelization

OverviewSimplification

Clipping

Compression

DecompressionVideo

Iso-surface

Page 16: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Page 17: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Parity:

Even

Odd

Odd

View Plane

Clipping Plane

Even

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

Page 18: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Results

Technique Human (3.2M)

320x240x337

Sphere (1.4M)

320x240x100

Jello (5.6M)

320x240x590

Compressed Size Ratio Size Ratio Size Ratio

MPEG 1.1M 2.9 0.21M 6.6 1.5M 3.8

MRLE (Microsoft Run-Length) 1.2M 2.6 0.18M 8 1.0M 5.8

Gzip (Entropy coding) 78.0K 41 17.5K 80 0.12M 46.4

Gzip on Low Resolution (LR) Video 21.0K 152 4.1K 340 25.7K 217.7

SSEC (Surface simplification & Edgebreaker)

16.8K 190 3.7K 378 19.3K 290.7

Page 19: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Results (contd…)

0

50

100

150

200

250

300

350

400

Co

mp

ress

ion

Rat

io

Human(3.2MB) Sphere(1.4MB) Jello(5.6MB)

Dataset(raw size)

MPEG

MRLE

GZIP

GZIP+LR

SSEC

Page 20: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Show Animation

Page 21: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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

Page 22: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

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.

Page 23: Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute

Thank You