mixed-order compositing for 3d paintings

28
Presented by Hyeong Ryeol Kam 2012/05/30 Korea University Computer Graphics Lab. Mixed-Order Compositing for 3D Paintings

Upload: buckminster-ward

Post on 02-Jan-2016

41 views

Category:

Documents


1 download

DESCRIPTION

Mixed-Order Compositing for 3D Paintings. Presented by Hyeong Ryeol Kam 2012/05/30 Korea University Computer Graphics Lab. Contents. 0 Abstract 1 Introduction 2 Related Work 3 Method 4 Discussion 5 Conclusion. Abstract. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Mixed-Order Compositing for 3D Paintings

Presented by Hyeong Ryeol Kam

2012/05/30

Korea UniversityComputer Graphics Lab.

Mixed-Order Composit-ing for 3D Paintings

Page 2: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 2KUCG |

Contents

• 0 Abstract• 1 Introduction• 2 Related Work• 3 Method• 4 Discussion• 5 Conclusion

Page 3: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 3KUCG |

Abstract

• A method for rendering 3D paintings by com-positing brush strokes embedded in space

• To reconcile between1) the depth order (z-order in 3D)

• Closer strokes over earlier strokes

2) the stroke order • Strokes later over strokes earlier

- With maintaining temporal and spatial coherence

Page 4: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 4KUCG |

1 Introduction

• 2D 3D Using stroke path, a brush stamp texture A Technical dilemma : Order

• 2D : The stroke order‗ To obscure all previous paint strokes

• 3D : The depth order‗ Stroke closer obscures stroke farther away

• The same surface in stroke order• The different surfaces in depth order

‗ Using a depth tolerance, d

Page 5: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 5KUCG |

2 Related Work

• 2D Paint By Number (1990)

• Brush stroke + color + direction

• 3D Meier (1996)

• Brush stroke with particles• + Color + direction + the size of brush strokes• 3D projection to the screen plane

Disney’s Deep Canvas 3D painting system (2001)• Brush strokes – manually applied

Page 6: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 6KUCG |

2 Related Work

• 3D WYSIWYG NPR (2002)

• Not using depth order• Popping• Restricted for 3D

Keefe et al. (2001)• Strict depth order• Not aesthetic

Page 7: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 7KUCG |

2 Related Work

• The alpha channel Catmull and Smith (1995)

• Digital compositing Wallace (1981)

• The equation for the over operator Porter and Duff (1984)

• Premultiplied alpha Mammen (1989)

• Sorting algorithm (order = important, ∵ not commu-tative)

McCann and Polard (2009)• The user controls the order

Page 8: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 8KUCG |

2 Related Work

• Conflicting orders of compositing Bruckner et al. (2010)

• Depth order user-specified layer order• Orders cannot change continuously• Expensive

Page 9: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 9KUCG |

3 Method

3.1 Compositing Background

• The over operator

• Color : h / Opacity : α

• c = h α

• β = 1 – α : associative / not commutative

Page 10: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 10KUCG |

3 Method

3.2 Desired Properties

• Mixed-order compositing Should work independently on each pixel “Single Pixel”

• C(f1,f2,…,fn) fi(ci,αi,zi,si)

• n : the # of fragments at the pixel• zi : depth (starting with the closest to the viewer)

‗ Q. zi ( ? ) zi+1

• si : stroke number : 1~n‗ Q. Possible that two fragments have the same stroke number?

Page 11: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 11KUCG |

3 Method

3.2 Desired Properties

• Goals Fragment close in depth

• Q. Should be composited in (stroke/depth?) order Fragment further apart

• Q. Should be composited in (stroke/depth?) order Spatial and temporal coherence

• Should be maintained

Strove to balance generality But didn’t attempt to formulate a set of proper-ties

Page 12: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 12KUCG |

3 Method

3.2 Desired Properties

To composite fragments at the same depth in stroke order• Same depth = same surface

Page 13: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 13KUCG |

3 Method

3.2 Desired Properties

Different surfaces composite in depth order A distance d

Page 14: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 14KUCG |

3 Method

3.2 Desired Properties

A stroke (whose alpha smoothly fades to zero) towards its borders can cause sharp visible edges• A fully transparent fragment have no effect to avoid sharp visible edges

Page 15: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 15KUCG |

3 Method

3.2 Desired Properties

During animation• Colors, α, depth may change• Popping should be avoided

Page 16: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 16KUCG |

3 Method

3.3 Existing Techniques

Method How? P1 P2 P3 P4

Meier Composited in depth order X X

OverCoatOffsets the fragments’ z in stroke or-derBefore compositing in depth order

X X X

Luft and Deussen

Blurred depth test for smooth com-positing / only aim for improving temporal coherence

X Δ X X

Bruckner et al.

Depth order (not designed for stroke order) O O O

Deep Can-vas

Cluster the fragment by zComposite each cluster using depth and stroke order

X O X X

Page 17: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 17KUCG |

3 Method

3.4 Compositing Function

• Main idea To replace the color of each of the fragment

1) Composite nearby fragments in stroke order2) Composite the fragments with replaced colors in depth order

Simple But ensure continuity and good performance

Page 18: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 18KUCG |

3 Method

3.4 Compositing Function

• The user specifies a global constant, d Fragments farther than d apart

• Only composite in depth order

S(z) = ( Sc(z), Sα(z) )• The result of compositing all fragments with depths

strictly between z-d/2 and z+d/2 in stroke order‗ No fragment S=(0,0)

• S is a piecewise-constant function with discontinuities at zi+d/2 and zi-d/2

• Compute the colors and alpha as:

Page 19: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 19KUCG |

3 Method

3.4 Compositing Function

• Because the colors are premultiplied with al-phas, this integral is correctly weighted by al-pha

• We replace the fragment colors, while keeping their original alpha values, setting c’’i=c’i αi/α’i

• The final output : Not exhibit discontinuities

Page 20: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 20KUCG |

3 Method

3.5 Algorithm

Page 21: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 21KUCG |

3 Method

3.5 Algorithm

• 1. Sort : fragments (by stroke number 1~n)• 2. S is modified to include the new fragment

[zi - d/2 , zi + d/2]

Complete binary tree

Page 22: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 22KUCG |

4 Discussion

4.1 Implementation and Results

• Test 3D paintings drawn in OverCoat OverCoat generates splats by projecting stroke

centerlines onto the 2D display and uniformly sampling them in 2D

Page 23: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 23KUCG |

4 Discussion

4.1 Implementation and Results

Page 24: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 24KUCG |

4 Discussion

4.2 Parameters and Temporal Coherence

• d (window size) Should be large enough

Sometimes useful to vary d with depth• Wide brush strokes may need to be composited in

stroke order over a larger window than thin brush strokes

Page 25: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 25KUCG |

4 Discussion

4.2 Parameters and Temporal Coherence

• r : 0.5 Smaller value decreases the amount of blend-

ing

Page 26: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 26KUCG |

4 Discussion

4.3 Extensions, Limitations, and Future Work

• Extensions Large scenes & d << the depth range

• The running time : O(n log m)‗ m : the maximum number of fragments in an interval of length

d

• Can be sped up using a dynamic binary tree• Memory usage : O(m)

• Limitations The surface pass through each other

Page 27: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 27KUCG |

4 Discussion

4.3 Extensions, Limitations, and Future Work

• Future Work The stroke order is irrelevant and only a tem-

porally-coherent depth-order compositing that satisfies Properties 2-4 is needed• Re-define :

Page 28: Mixed-Order Compositing for 3D Paintings

Korea UniversityComputer Graphics Lab.

Hyeong Ryeol Kam | 2012/05/30 | # 28KUCG |

5 Conclusion

• 3D paintings Great potential

• To allow to make use of 3D structure• Over limitations of the old 3D pipeline

• A sound rendering & compositing method Necessary for animated scenes To gain wider use and realize the potential