David Luebke University of Virginia
“Using a term like ‘nonlinear science’ is like referring to the bulk of zoology as ‘the study of nonlinear animals’” Photorealism: age-old goal of graphics Non-photorealistic rendering – Broadly, techniques for rendering that don’t strive for realism, but style, expressiveness, abstraction, uncertainty, etc – A
term that we’re probably stuck with Better terms: stylized rendering, artistic rendering, abstract rendering
NPR is most commonly used to refer to graphics techniques that emulate a particular artistic style or medium – Impressionistic painting – Pen-and-ink (cross hatching, outlining, etc) – Colored-pencil, copperplate engraving, you name it –
Toon shading is the term that we use to refer to cartoon-like rendering effects Tendencies in cartoon/comic style: – Simple, flat shading (cel shading) Two-tone (light/shadow) or three-tone (light/shadow/highlight) – Edge highlighting Boundary (border edge) Crease (hard edge) Material edge Silhouette edge
Cel shading – Threshold the lighting equation Ex: the Cg program we looked at Diffuse below 0.5 ? dark color : light color Specular above 0.5 ? hilight color : diffuse color If no pixel shaders, can use N ● L to look up a 1-D texture containing the shaded colors – In general, can think of these procedures as remapping the traditional lighting equation elements (
Boundary (border edge) – Not shared by two polygons – E.g. the edge of a sheet of paper – Solid models usually have no boundaries Crease (hard edge) – Shared by two polygons at a dihedral angle greater than some threshold (often 60 °) – Or a vertex with two normals/two colocated vertices –
Material edge – Triangles sharing edge have different materials/texture maps/etc – Or just an edge that the artist wants to emphasize Silhouette edge – Triangles sharing edge face different directions (towards/away from viewer) – Lots of techniques to find at runtime!
Surface angle silhouetting – Again, like the Cg program we looked at – Calculate N●V, if below threshold draw black – Problem: depends on surface curvature (see Fig 7.5)
Idea: render the geometry in such a way that the silhouettes “fall out” Ex: – Draw frontfacing polygons – Draw backfacing polygons But draw them in thick (2-pixel) wireframe Or draw them in wireframe, z-biased forward a bit Or “fatten” them Or displace them along their normals (“halo” effect)
Idea: analyze the image after it’s rendered, and extract silhouettes (like edge detection) Can help by rendering e.g. depth image, object-ID image, normal image Perfect for fragment program!
Idea: find silhouette edges geometrically and render them explicitly – Randomized Appel’s algorithm – Lots of interesting geometric approaches Most work, but gives the most flexibility in how silhouettes are drawn
Wireframe Translation Fattening 40 fps 50 fps 11.5 fps Original Venus model : 5672 triangles, 66 fps