suggestive contours and abstracted shading Daniel Arias
LINES AND SHADES Shape, volume, shades and texture in drawing lines as nonphotorealistic rendering technique Luis Caballero
Suggestive contours Many lines in artistic representations came from contours. Suggestive contours: Features that are almost contours, that become contours in nearby views DeCarlo D, et al. Suggestive contours for conveying shape. 2003.
Contours The contour generator is defined as points that lie on the surface and fulfill: n(p).v(p) = 0 p belongs to S, and n(p) is the unit surface normal at p, and v is the view vector v(p) = c-p (you draw a line, when the norm of the surface and the view vector are orthogonal.) DeCarlo D, et al. Suggestive contours for conveying shape. 2003.
Towards suggestive contours, radial curvature Curvature of 0 are either an inflection point or a line. The radial curvature of surface S in p: intersect S with plane that a. construction of surface curvature. contains p, n(p), and a b. radial curvature (curvature in the direction w that, in this direction of the camera, w). case is the projection of v (p) in the plane. DeCarlo D, et al. Suggestive contours for conveying shape. 2003.
SUGGESTIVE CONTOURS The curvature of surface S in p: intersect S with plane that contains p, n(p), and a direction w that, in this case is the projection of v(p) in the plane. Suggestive contours are curves along which the radial curvature is 0, and the surface bends away from the camera. a. values of the radial curvature b. type of line and position of the camera (contour, suggestive contour, or no line) DeCarlo D, et al. Suggestive contours for conveying shape. 2003.
SUGGESTIVE CONTOURS Suggestive contours are: curves along which the radial curvature is 0, and the surface bends away from the camera. true contours in relatively nearby viewpoints: 1. from c': p and q' are contours, however from c, p is not (nor q'), but p appears suddenly when we move from c to c', p is a suggestive contour in c. DeCarlo D, et al. Suggestive contours for conveying shape. 2003.
FORMAL DEFINITIONS 1. Set of points on the surface at which its radial curvature kr is 0, and the directional derivative of kr in the direction of w is positive: Dwkr > 0 2. Set of minima of n.v in the direction of w: Dw(n.v) = 0, and Dw (Dw (n.v)) > 0 3. The set of points on the contour generator of a nearby view point (of radial distance less than 90 degrees) that are not in a radial correspondence with points on the contour generators of any (radially) closer viewpoint. For definition 1. sometimes it is useful to reinforce the constrain with :
RESULTS Suggestive contours are related with contours in two ways:
Algorithms Object-space algorithm Found solution kr = 0, on entire mesh Detect contours on the mesh: Dwkr > 0 additional constrains (angle) Render the lines Image space algorithm identify suggestive contours directly from a rendered image. n(p).v(p) is approximated by rendering a smoothly shaded image with diffuse light source placed at the camera point. Detect suggestive contours by step valleys (stable minima of n. v/ v ) to identify the ridges and the valleys, it inspect neighborhood, places of high contrast are edges.
Line Drawings via abstracted shading Line drawing can be understood as an abstraction of the shaded image. Candidates: Dark-light boundaries Shading areas close to lines (image-space algorithm)
General solution 1. Render grayscale "tone image" (it already describe the illumination of the scene) 2. Blur image, and save it as texture memory 3. second pass, fragment shader to render dark lines in thin areas of dark tone. 4. render light zones into a different channel and with different thresholds. 5. combine dark and light images with a toon shaded base coat The resulting technique convey shape well, are temporal coherent in animation and can be render interactively.
Rendering lines two steps: 1. Render the tone image, from the frame buffer to a texture: GLSL fragment shader 2. detect ridges and valleys in the tone image: Base on standard representation (1 white, 0 black). If the height field surface normals point down, then on a ridge (highlight) the curvature with larger magnitude is a negative, while in a valley (dark line) it is positive. fits a polynomial to the pixels and neighbors, and then compute the curvature analytically (least square).
Rendering lines 3. Ridge searching (Opacity) grid 3x3 around pixel location, with spacing half distance line width w. Blur with a Gaussian kernel of size w. Base on distance to valleys or ridges and its first principal curvature the original pixel belongs to one of four cases: c=0 a, b and d: measure polynomial, move toward the ridge line, do it again, and set opacity 0 below a threshold or half line width, otherwise 1.
Rendering lines Tone edges are drawn base on the iterative process.
Rendering lines to smooth lines, it is set not one, but a lower and upper thresholds cl and cu. if c, cl stop. After iteration if c< cl opacity = 0, or 1 if c > cu. (c maximal curvature) between limits (c - cl)/(cu + cl) Drop off opacity with distance to the ridge line
Thanks