COMP 238 Final Project NonPhotorealistic Rendering Techniques for

  • Slides: 12
Download presentation
COMP 238 Final Project Non-Photorealistic Rendering Techniques for a Game Engine Adrian Ilie The

COMP 238 Final Project Non-Photorealistic Rendering Techniques for a Game Engine Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Remember NPR Quake? Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Remember NPR Quake? Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

How did they do it? • “grep”-ed the Quake source code for Open. GL

How did they do it? • “grep”-ed the Quake source code for Open. GL calls • Pulled them out into one source file • Added dynamic loading support • Started coding different visual styles Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

How about a “cartoon” look? • • • Adrian Ilie Silhouettes Creases Shading Shadows

How about a “cartoon” look? • • • Adrian Ilie Silhouettes Creases Shading Shadows Walls The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Silhouettes Flip the normals and extend the edges of backfacing polygons. Adrian Ilie The

Silhouettes Flip the normals and extend the edges of backfacing polygons. Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Creases (1) Add thin quadrilaterals at each edge, forming an angle with the polygon.

Creases (1) Add thin quadrilaterals at each edge, forming an angle with the polygon. Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Creases (2) • It actually works! Adrian Ilie The UNIVERSITY of NORTH CAROLINA at

Creases (2) • It actually works! Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Shadows • The function is there, but it’s never called : (. • Just

Shadows • The function is there, but it’s never called : (. • Just draw a projection of each model on a horizontal plane (not always correct, but works out pretty well). Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Cartoon-style shading • 1 D texture • coordinate at vertex = amount of light

Cartoon-style shading • 1 D texture • coordinate at vertex = amount of light received Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Walls • No lighting information available, so… • Replace with “hand-drawn” texture. • Add

Walls • No lighting information available, so… • Replace with “hand-drawn” texture. • Add charcoal style for lines (one thick line and several jittered thin lines). Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Result Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Result Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Bibliography • [1] Alex Mohr, Michael Gleicher: "Non-Invasive, Interactive, Stylized Rendering". The 2001 ACM

Bibliography • [1] Alex Mohr, Michael Gleicher: "Non-Invasive, Interactive, Stylized Rendering". The 2001 ACM Symposium on Interactive 3 D Graphics. • [2] Ramesh Raskar: "Hardware Support for Non-photorealistic Rendering", Eurographics 2001. • [3] Bert Freudenberg, Maic Masuch, Thomas Strothotte: "Walk. Through Illustrations: Frame-Coherent Pen-and-Ink Style in a Game Engine", Siggraph/Eurographics Graphics Hardware, LA, 2001. • [4] Adam Lake, Carl Marshall, Mark Harris, Marc Blackstein: "Hardware Support for Non-photorealistic Rendering", Siggraph/Eurographics Graphics Hardware, LA, 2001. • [5] Jeff Lander: "Shades of Disney: Opaquing a 3 D World", Game Developer Magazine, March 2000. Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL