Non-Photorealistic Rendering: Toon Shading - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Non-Photorealistic Rendering: Toon Shading

Description:

... refer to graphics techniques that emulate a particular artistic style or medium ... Tendencies in cartoon/comic style: Simple, flat shading (cel shading) ... – PowerPoint PPT presentation

Number of Views:142
Avg rating:3.0/5.0
Slides: 13
Provided by: davidl9
Category:

less

Transcript and Presenter's Notes

Title: Non-Photorealistic Rendering: Toon Shading


1
Non-Photorealistic RenderingToon Shading
  • David Luebke
  • University of Virginia

2
Non-Photorealistic Rendering
  • 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 dont
    strive for realism, but style, expressiveness,
    abstraction, uncertainty, etc
  • A terrible, terrible term that were probably
    stuck with
  • Better terms stylized rendering, artistic
    rendering, abstract rendering

3
Stylized 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
  • Cartoon drawing

4
Toon shading
  • 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

5
Toon Shading
  • 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 (tone mapping)

6
Silhouette Rendering
  • 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
  • Ridge or valley edges

7
Silhouette Rendering
  • 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!

8
Finding/Rendering Silhouette Edges
  • 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)

9
Procedural Geometry Silhouetting
  • 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)

10
Image Processing Silhouetting
  • Idea analyze the image after its rendered, and
    extract silhouettes (like edge detection)
  • Can help by rendering e.g. depth image, object-ID
    image, normal image
  • Perfect for fragment program!

11
Silhouette Edge Detection
  • Idea find silhouette edges geometrically and
    render them explicitly
  • Randomized Appels algorithm
  • Lots of interesting geometric approaches
  • Most work, but gives the most flexibility in how
    silhouettes are drawn

12
Results
  • Wireframe Translation Fattening
  • 40 fps 50 fps 11.5 fps
  • Original Venus model 5672 triangles, 66 fps
Write a Comment
User Comments (0)
About PowerShow.com