NPR: Lines Suggestive Contours Eric Jardim ericjardim@gmail.com IMPA - Instituto Nacional de Matemática Pura e Aplicada Suggestive Contours – p. 1
Drawing with Lines • Lines are the base of drawing • They can convey shape, without being photo-realistic [Flaxman 1835] • If you only have lines to draw a scene (no colors, no shading, etc), which lines should be drawn? • Which lines an artist would pick to draw this same scene? • If we have a 3D scene model and a viewpoint, which lines we should extract from the geometry? Suggestive Contours – p. 2
Learning with the artists [Flaxman 1835] Suggestive Contours – p. 3
Understanding the lines of the artist • (1) Lines that convey “boundaries” of the geometry • (2) Lines that convey “curvatures” on the geometry • (3) Abstract lines (out of our scope) Suggestive Contours – p. 4
b Contours: definition • Contours (or silhouettes) are the set of points of a surface, that are “almost invisible” from a given viewpoint • On a smooth surface, a point p is a countour point if it is visible and n ( p ) · v ( p ) = 0 • On polyhedra, contours are those points where every neighbourhood have front and back faces near it. n · v = 0 n · v = 0 but is invisible frontfacing backfacing Suggestive Contours – p. 5
Contours • Contours are first order curves and were largely studied • They capture most important features of the geometry, but not all of them • This leads us to investigate high order derivative curves Suggestive Contours – p. 6
Math and aesthetics [Hilbert and Cohn-Vossen 1952] • Felix Klein believed that parabolic lines make a connection between math and aesthetics Suggestive Contours – p. 7
Motivation • Look at these curves. They are clearly not contours, at least not from this viewpoint • But they might be contours of a nearby view. • Let us work with the hypothesis that they are “almost contours” Suggestive Contours – p. 8
Intuitive definition: almost contours • In this figure, moving the viewpoint from c to c ′ , we see two kinds of new contour points. • The first ( q ′ ) is the contour of q that “slid” over the surface • The other singular kind ( p ), that is an inflection of curvature, will suddenly appear • We are interested in this second kind, leading us to define suggestive contours formally Suggestive Contours – p. 9
Definition 1: local minima of n · v • We define this point to be part of the suggestive contour if it is a local minimum of n · v in the direction of w Suggestive Contours – p. 10
The radial curvature • Fixed a point p on a smooth surface, we can compute the local minima of n · v , considering the derivative in the direction of w : D w ( n · v ) = D w n · v + n · D w v = D w n · w = − II ( w, w ) = | w | 2 κ r • So p is a critical point of n · v ⇔ κ r = 0 • Further, p is a local minimum if D w ( D w ( n · v )) > 0 D w ( D w ( n · v )) = D w ( | w | 2 κ r ) = | w | 2 D w κ r • Thus, if κ r = 0 , p is a local minimum ⇔ D w κ r > 0 • This leads to a second definition of suggestive contours Suggestive Contours – p. 11
Definition 2: Zeros of κ r where D w κ r > 0 • We have prooved that these two definitions are equivalent Suggestive Contours – p. 12
Stability • View vectors almost parallel to the normal vector produces small w and can produce spurious results • It is useful to define an angular threshold θ c • Less steep minima are more susceptible to instability and noise due to errors in curvature estimation • Small segments of suggestive contours can produce undesired results Suggestive Contours – p. 13
Visibility and lining up (1) Suggestive Contours – p. 14
Visibility and lining up (2) • Contour and suggestive contours generators are the respectively solutions to n · v = 0 and κ r = 0 • They meet at the ending contours, that are points of potential visibility change of contours • Also, they meet with G 1 continuity, producing seamlessly aligned curves • Visibility can occur locally or by occlusion. The first can be computed with κ r = 0 , the other with traditional techniques Suggestive Contours – p. 15
Contour algorithms • Generally, there are two algorithms for computing contours: an image-space and an object-space algorithm • Image-space algorithm ◦ Rely on image processing of the n · v or depth map ◦ Easy, image precision results, no control over the lines • Object-space algorithm ◦ Find zero crossings of n · v on the mesh, segment joining, optional parametrization, visibility ◦ Harder to implement, control over the lines Suggestive Contours – p. 16
Suggestive contour image-space algorithm • Definition 1 leads to an image-space implementation • Find valleys of n · v maps • Alternative solution: ◦ Approximate n · v by shaded diffuse light source ◦ Find steep valleys (stable suggestive contours) ◦ Take a pixel i and collect intensities of pixels in r radius ◦ Label a pixel i a valley if: • No more than s percentage of pixels are darker than i • p max − p i exceeds a fixed threshold d where p i is the intensity of i and p max is the max intensity of the r -radius neighbourdhood ◦ Apply median filter of r radius, to remove irregularities ◦ To avoid discretization effects scale s by 1 − 1 r and d by r Suggestive Contours – p. 17
Suggestive contour object-space algorithm • Definition 2 leads to an object-space implementation • Find zero crossings of κ r and trim the results with the devative test and angular threshold ( D w κ r > 0 and θ c ) • Estimate principal directions and curvatures on the vertices and apply κ r = κ 1 cos 2 φ + κ 2 sin 2 φ , φ = angle ( κ 1 , w ) • To find D w κ r we can compute D w κ r = III ( w, w, w ) + 2 Kcot ( θ ) � ∂II ∂II � a 2 × 2 × 2 tensor and | w | = 1 where III is ∂u ∂v • To avoid errors in curvature, apply D w κ r > t d | w | • Segments shorter than t s threshold are discarded Suggestive Contours – p. 18
Results: image-space r = 4 , s = 0 . 2 and d = 0 . 25 Suggestive Contours – p. 19
Results: object-space θ c ∈ [20 , 30] degrees, t d ∈ [0 . 02 , 0 . 08] and t s = 2 Suggestive Contours – p. 20
Results contours, image-space, object-space Suggestive Contours – p. 21
Results: object-space and image-space 80K polygons, 500K polygons Suggestive Contours – p. 22
Results contours, valleys, suggestive contours Suggestive Contours – p. 23
Parabolic lines and negative gaussian curvature • Parabolic lines are boundaries of elliptic and hyperbolic regions of the surface • Suggestive contours only appear on regions of hyperbolic regions ( K < 0 ) Suggestive Contours – p. 24
Experiments with derivative tests (a) κ r = 0 , D w κ r > 0 (b) H = 0 , D w H > 0 (c) K = 0 , D w K > 0 Suggestive Contours – p. 25
Elliptic surfaces contours, ridges, modified suggestive contours κ r = 1 / 2 • Suggestive contours not appear on elliptic regions ( K > 0 ) • But finding positive crossings can yield interesting results Suggestive Contours – p. 26
Demo Suggestive Contours Demo Suggestive Contours – p. 27
Final considerations • Suggestive contours indeed extend ordinary contours • Perceptual and aesthetic research • Deal with noise and instability • Promising and much work to do Suggestive Contours – p. 28
References [1] D. DeCarlo, A. Finkelstein, S. Rusinkiewicz, A. Santella, "Suggestive Contours for Conveying Shape" , SIGGRAPH 2003 [2] S. Rusinkiewicz, D. DeCarlo, A. Finkelstein, Line Drawings from 3D Models , SIGGRAPH 2005 course notes [3] A. Hertzmann, D. Zorin, "Illustrating smooth surfaces" , SIGGRAPH 2000 [4] A. Hertzmann, "Introduction to 3D Non-Photorealistic Rendering: Silhouettes and Outlines" , SIGGRAPH 99 [5] do Carmo, M. P ., "Elementos de Geometria Diferencial" , 1971 [6] John Flaxman Odissey, www.bc.edu/bc_org/avp/cas/ashp/flaxman_odyssey.html Suggestive Contours – p. 29
Recommend
More recommend