Real Time Nonphotorealistic Rendering. How to achieve real time NPR? Economy of line: present a lot of information with very few strokes. Silhouettes.

Slides:



Advertisements
Similar presentations
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
Advertisements

CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Optimized Stencil Shadow Volumes
Non-Photorealistic Rendering FORMS. Mesh (~170) Parametric (~16) Implicit/CSG (~9) Volumetric (~28) 3D Object Representation in NPR Point Cloud (~4)
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
Extended Gaussian Images
Lecture Fall 2001 Visibility Back-Face Culling Painter’s Algorithm.
Part I: Basics of Computer Graphics
Introduction to 3D Graphics Lecture 5: From Realism to Real-Time Anthony Steed University College London.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
CS 4731: Computer Graphics Lecture 18: Hidden Surface Removal Emmanuel Agu.
Graphics Programming: Polygon Filling
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
Polygonal Meshes 3D Object Representation -Tyler Abrams.
Painterly Rendering for Animation Barbara J. Meier Walt Disney Feature Animation SIGGRAPH 96.
Non-photorealistic Rendering Pablo Picasso - The Bird Cage No electrons were harmed during the production of this presentation.
Week 14 - Wednesday.  What did we talk about last time?  Collision handling  Collision detection  Collision determination  Collision response  BSPs.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
2/26/04© University of Wisconsin, CS559 Spring 2004 Last Time General Orthographic Viewing –Specifying cameras in world coordinates –Building world  view.
Hidden Surface Removal
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Shadow Algorithms Ikrima Elhassan.
SIGGRAPH 2007 Tilke Judd Frédo Durand Edward Adelson.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
Introduction to 3D Graphics Lecture 4: Scenes and Scene Graphs Anthony Steed University College London.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
02/26/02 (c) 2002 University of Wisconsin, CS 559 Last Time Canonical view pipeline Orthographic projection –There was an error in the matrix for taking.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Week 11 - Thursday.  What did we talk about last time?  Image processing  Blurring  Edge detection  Color correction  Tone mapping  Lens flare.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Visible-Surface Detection Jehee Lee Seoul National University.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Non-Photorealistic Rendering: Toon Shading David Luebke University of Virginia.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
Implementation II.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
Ramesh Raskar University of North Carolina at Chapel Hill Ramesh Raskar University of North Carolina at Chapel Hill Image Precision Silhouette Edges Michael.
Object image Reflection in Plane Mirrors Objectives: Investigate reflection in plane mirrors Verify the “1 st Law of Reflection” Compare image size and.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
Computer Graphics I, Fall 2010 Implementation II.
Non-Photorealistic Rendering FORMS. Model dependent Threshold dependent View dependent Outline form of the object Interior form of the object Boundary.
Painterly Rendering for Animation Introduction speaks of focus and detail –Small brush strokes focus and provide detail –Large strokes are abstract and.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
1 Planes, Polygons and Objects ©Anthony Steed
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Non-Photorealistic Rendering FORMS. Model dependent Threshold dependent View dependent Outline form of the object Interior form of the object Boundary.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Week 14 - Wednesday CS361.
Week 2 - Friday CS361.
CSCE 441: Computer Graphics Hidden Surface Removal
Lecture 13 Clipping & Scan Conversion
© University of Wisconsin, CS559 Fall 2004
Oblique Pictorials.
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
CS-378: Game Technology Lecture #4: Texture and Other Maps
Presentation transcript:

Real Time Nonphotorealistic Rendering

How to achieve real time NPR? Economy of line: present a lot of information with very few strokes. Silhouettes +creases + minimal shading Rapid identification of silhouette edges. Use interframe coherence. Sacrifice accuracy for speed. Some silhouettes are not drawn.

Procedure 1.Determine silhouette curves 2.Determine the visibility of silhouette and feature edges by a modified Appel’s algorithm 3.Render the silhouette and feature edges 4.May add some shading

Definition A “front-facing” polygon: A polygon that the dot product of its outward normal and a vector from a point on the polygon to the camera is positive. Otherwise, it is “back-facing”

Definition A “silhouette edge” : An edge adjacent to one front-facing and one back-facing polygons. A silhouette edge is “front-facing” if its adjacent face nearest the camera is front facing. Otherwise it is “back-facing.” A “border edge”: An edge adjacent to only one face.

Assumption: generic view The multiplicity of the image of the silhouette curves is everywhere one, except at a finite number of points where is it two. These multiplicity=2 points do not coincide with the projection of any vertices Their number is invariant under small changes in viewing direction

Appel’s Algorithm QI (Quantitive Invisibility) : count of the number of front-facing polygons between a point on object and the camera. Draw anywhere with QI=0 Procedure: Identify silhouette edges, then determine visibility. First determine the QI at a certain point, then propagate along edges.

Observation: The “Complications” of Appel’s Algorithm When traverse an edge, QI changes only when the edge crosses behind a silhouette. Or, QI can also change at vertices. This happens only when the vertex lies on a silhouette edge.

Speeding up Appel’s Algorithm Appel’s Algorithm requires exhaustive search to find silhouette. Need to speed up for real time. It is easy once we find one silhouette edge. Just step along silhouette edges to trace out the entire silhouette curve. Examine a small percentage (1%) of edges to find a silhouette.

Finding a Silhouette using Frame- To-Frame Coherence A silhouette in previous frame is likely a silhouette edge of current frame. This can be used to increase our chances of finding silhouette edges. Start with a small subset of edges that are silhouette edges in previous frame, Traverse towards (for back-facing silhouette edges) or away (front-facing silhouette edges) from camera, and check if those are silhouette in current frame.

Determine Complications Once the silhouette curve is found, determine visibility using QI.

Recall: The “Complications” of Appel’s Algorithm When traverse an edge, QI changes only when the edge crosses behind a silhouette. Or, QI can also change at vertices. This happens only when the vertex lies on a silhouette edge.

Cusps: Vertices where QI might change. A Cusp is a vertex that satisfies any of the following, 1.It is adjacent to exactly 2 silhouette edges, one front-facing and one back- facing, or 2.It is adjacent to more than 3 silhouette edges 3.It is adjacent to a border edge.

Testing less vertices Appel’s algorithm requires a local test at every vertex Since we are only propagating QI “along” a silhouette curve, we only test at cusp vertices. This saves a lot of testing.

Avoiding Ray Tests Assumption: objects are completely in view of the camera. Hence, any edge that touches the 2D bounding box of the silhouette requires no test – it is automatically visible. Some ray tracing tests can be avoided.

Re-ordering Appel’s Algorithm In Appel’s Algorithm, the procedure in determine visibility is, 1.Use a ray test to establish QI at some point on each cluster. (connected silhouettes) 2.Propagate from there to assign QI everywhere.

Re-ordering Appel’s Algorithm If the above order is reversed, sometimes we can eliminate ray test all together. Example: if a whole cluster is occluded, then there’s no need to do ray test.

Modified Traversal 1.Find a point on an edge very close to a vertex. This is the base point, b. 2.Assign the QI at b to be 0. 3.Record the QI of all other points in cluster as offset from b. 4.If the lowest resulting QI is m<0, then we can increment b by –m. 5.If the edge is between two clusters, adjust/match their QI accordingly.

Walking In most cases, all the clusters will be discovered, so no ray test will be needed at all. For the remaining case, an efficient way testing technique called “walking” is used.

Rendering Now with visible surface, the rest is rendering. 3 expressive NPR techniques are presented, 1.Drawing the lines with different thickness. 2.Drawing perturbed lines for artistic effect. 3.Rendering (1) wrt occluding faces.

Perturbing the line To get artistic effect by perturbing the line, first parameterize the line, then add vector offset.

Stroke as texture map

Rendering with respect to layers of occluding surfaces

Place shading strokes in the world space, rather than screen space, to maintain temporal coherence. Make lighting to be point light from camera position. Even distribution of strokes produces higher apparent dentities in regions slanting away from the light. Assign one stroke particle to each triangle, direction is the cross product ofsurface normal and ray from camera to stroke location. This makes it line up with silhouette.

Shading strokes