Ramesh Raskar University of North Carolina at Chapel Hill Ramesh Raskar University of North Carolina...

59
Ramesh Raskar Ramesh Raskar University of North University of North Carolina Carolina at Chapel Hill at Chapel Hill Image Precision Silhouette Edges Michael Cohen Michael Cohen Microsoft Microsoft Research Research

Transcript of Ramesh Raskar University of North Carolina at Chapel Hill Ramesh Raskar University of North Carolina...

  • Image Precision Silhouette EdgesRamesh RaskarUniversity of North Carolina at Chapel HillMichael CohenMicrosoft Research

  • Silhouette EdgesHighlight detailTechnical Illustrations

  • Silhouette EdgesHighlight detailTechnical Illustrations

  • Silhouette EdgesInformation with few strokesNon-photorealistic rendering

  • Definitions

    Scene : Collection of oriented polygons

    Silhouette edge : Boundary between adjacent front facing and back facing polygon

  • Rendering Silhouette EdgesFind all silhouette edges

    Solve the partial visibility problem to render only non-occluded parts of silhouette edges

  • Previous WorkHidden line removalMarkosian et. al. Siggraph 1997Trace out silhouette curvesVisibility using sweep method in image spaceRossignac et. al. Eurographics Hardware 1992Polygons and wireframeGooch I3DG 1999

  • Previous MethodsObject PrecisionPre-processing or Batch orientedNeed connectivity informationFor static scenesTwo primitives, polygons + edges

  • GoalReal-time performance using graphics hardwareNo pre-processing (Dynamic scenes)No adjacency information (Changing topology)Single primitive (Polygons)

    Image precision

  • Video

  • Basic Approach

  • Basic Approach

  • Basic Approach

  • Basic Approach :Polygonal Surfaces

    Compute the two nearest layers from cameraFirst layer : subset of front facing polygonsSecond layer : subset of back facing polygonsCompute intersection in image space

  • Basic AlgorithmDraw white backgroundSet depth function to Less ThanRender front facing polygons in whiteSet depth function Equal ToDraw back-facing polygons in blackRepeat for a new viewpoint

  • Basic AlgorithmDraw white backgroundSet depth function to Less ThanRender front facing polygons in whiteSet depth function Equal ToDraw back-facing polygons in blackRepeat for a new viewpoint! Limited depth buffer precision, single pixel width

  • Image Precision Techniques1. Back facing polygons as wireframes2. Z-scaled translation3. Fattened back facing polygons

  • Wireframe RenderingFront facing polygons in whiteBack facing polygons in wireframe in blackFrontFacesBackFaces

  • Wireframe RenderingChange wireframe thickness or colorUniform silhouette line width

    ! Gaps at neighboring polygons! Two different primitives : line and polygon

  • Z-scaled TranslationCameraFront-facingPolygonBack-facingPolygon

  • Z-scaled TranslationProjection width of visible part of back-face depends on translationCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled TranslationProjection width of visible part of back-face depends on translationCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled TranslationProjection width of visible part of back-face depends on translationCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled TranslationProjection width of visible part of back-face depends on translationCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation using ScalingCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation using ScalingCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation using ScalingCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation using ScalingCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation using ScalingCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation using ScalingCameraFront-facingBack-facingPart of back-face visible andseen as silhouette edge

  • Z-scaled Translation Projection width of visible part depends on dihedral angleTranslationFCameraFBPart of back-face visible

  • Fattened Backfacing PolygonsCameraFront-facingPolygonBack-facingPolygon

  • Fattened Backfacing PolygonsCameraFront-facingPolygonBack-facingPolygonPart of fattened backface visible

  • Fattened Backfacing PolygonsCameraFront-facingPolygonBack-facingPolygonPart of fattened backface visible

  • Fattened Backfacing PolygonsCameraFront-facingPolygonBack-facingPolygonPart of fattened backface visible

  • Fattened Backfacing Polygons Fattening is dependent only on the orientation of back facing polygonPart of fattened backface visibleFBF and B at differentorientationsCamera

  • Fattening ProcessIdentify back facing polygon

  • Fattening ProcessIdentify back facing polygon

  • Fattening ProcessFatten by pushing the edges outwards

  • Fattening ProcessFatten by pushing the edges outwards

  • Fattening ProcessFatten by pushing the edges outwards

  • Fattening ProcessFatten by pushing the edges outwards

  • Fattening ProcessFatten by pushing the edges outwardsCreate a triangle fan

  • Fattening ProcessFatten by pushing the edges outwardsCreate a triangle fan

  • Fattening ProcessFatten by pushing the edges outwardsCreate a triangle fan

  • Fattening ProcessFatten by pushing the edges outwardsCreate a triangle fan

  • Fattening ProcessFatten by pushing the edges outwardsCreate a triangle fan

  • Fattening Process.Fatten by pushing the edges outwardsFattened part appears as silhouetteCreate a triangle fan

  • Fattening Process.Fatten by pushing the edges outwardsFattened part appears as silhouetteCreate a triangle fan

  • Fattening Process.Fatten by pushing the edges outwardsFattened part appears as silhouetteCreate a triangle fan

  • Fattened Backfacing PolygonsUniform width silhouette edgesFattening dependent onOrientation of the polygon wrt cameraOrientation of the edgeDistance of the edge from camera

    Polygon vertices move as camera moves Creates more triangles

  • Charcoal Style RenderingFatten frontfacing polygons seen almost edge-onFattened part appears in front of original polygonsSimple lighting model for fattened polygons

  • Demonstration

  • AdvantagesNo pre-processingNo adjacency informationRobust and general purposeEasy to implement using traditional hardwareDynamic scenes, changing topology, LODInteresting effectsModels in other representations

  • ModificationsDifferent objects with colored silhouettesTexture mapped silhouettesDistance from viewer, light effectsShaded or Texture mapped front polygonsIntersecting polygons

  • IssuesComplete scene traversal necessaryDensity of silhouette edges for distant objectsInconsistent face normals

  • PerformanceRendering cost increased by a factor of twoFattening method, six triangles for each backfacing triangleOpenGL with SGI Indigo2 MaxImpact timings:Venus model, ~6K triangles, 66fpsWireframe: 40 fps Z-scaled translation: 50 fps Fattened backfaces: 11.5 fps

  • AcknowledgementsNSF STCMicrosoft Research Graphics groupRick Szeliski, John SnyderLink FellowshipGeometric Models :Electric BoatStanford UniversityVideoMatt Cutts, Todd Gaul

  • SummaryReal-time silhouette renderingUpdate depth buffertranslate or fatten backfacing polygonsApplicable to dynamic scenes, changing topology Traditional graphics pipeline

    http://www.cs.unc.edu/~raskar/Sil/

    Silhouette edges are useful in highlighting detail especially in technical illustrations. For example, on the left, a machine room is rendered using traditional method. But when black silhouette edges are added, the details are more easily seen.Silhouette edges are useful in highlighting detail especially in technical illustrations. For example, on the left, a machine room is rendered using traditional method. But when black silhouette edges are added, the details are more easily seen.Using silhouettes, we can convey a lot of information with a few strokes and we can also use them in non-photorealistic rendering.In this paper, we will focus on rendering silhouette edges in scenes made up of polygons with specified normals. For a given view, we will render edges which are common to a front facing polygon and a back facing polygon. In addition we are only interested in edges for which the front facing polygon is closer than the corresponding backfacing polygon.To render silhouette edges, first, we need to find all edges between front and back facing polygons. Then we must solve the more difficult partial visibility problem, i.e. render only that part of silhouettes which is not occluded.This can be achieved using one of the many hidden line removal methods. Markosian and others describe a fast technique where you start with a silhouette edge and then trace out silhouette curve on the model by walking along the boundary between front and backfacing polygons. To solve the partial visiblity, you project all silhouette edges into image space and use a sweep method. Because of the preprocessing involved, this method is better suited for static models will well defined adjacency information between polygons. Rossignac and others first draw the scene in polygon mode and then push back and draw again the same scene in thick wireframe mode. So most of the previous methods attempt to first identify edges in object space. They need pre-processing and polygon adjacency information. This limits them to rendering rigidly moving objects or static scenes. If you have to implement it in graphics hardware, most of them force you to use polygons and lines both.The question is, can we move away from this notion of dealing with edges in object space in 3D (which we are doing by walking or rendering edges explicitly) ? Do we need to treat silhouette rendering as a different problem than traditional polygon rendering ?Traditionally, when we draw just polygons in a scene, we do not worry about pre-processing or polygon adjacency information. So whether the underlying objects are moving or deforming, are closed or not-closed, is the topology changing .. It doesnt matter.Can we come up with a method that renders silhouette edges at image precision without worrying about the issues we saw on the previous slide ? Lets see the video segments that shows the techniques and some results.The methods are based on the basic observation that only two sets of primitives are need to render silhouette edges from a given viewpoint. The first set is the nearest layer of polygons which is basically the parts of polygons visible from that viewpoint. The second set is made up of the polygons just behind the visible polygons. Note that sometimes only part of a polygon may appear in one of these two layers. Now, the intersection of these two layers is visible silhouette edges. We somehow need to compute the projection of this intersection in image space in real time.The methods are based on the basic observation that only two sets of primitives are need to render silhouette edges from a given viewpoint. The first set is the nearest layer of polygons which is basically the parts of polygons visible from that viewpoint. The second set is made up of the polygons just behind the visible polygons. Note that sometimes only part of a polygon may appear in one of these two layers. Now, the intersection of these two layers is visible silhouette edges. We somehow need to compute the projection of this intersection in image space in real time.The methods are based on the basic observation that only two sets of primitives are need to render silhouette edges from a given viewpoint. The first set is the nearest layer of polygons which is basically the parts of polygons visible from that viewpoint. The second set is made up of the polygons just behind the visible polygons. Note that sometimes only part of a polygon may appear in one of these two layers. Now, the intersection of these two layers is visible silhouette edges. We somehow need to compute the projection of this intersection in image space in real time.Fortunately, in general, the first layer can be calculated by running a visibility algorithm on all front-facing polygons. Moreover, the second layer is made up of parts of only the back-facing polygons. So for example, if we use depth-buffer for visibility, we can easily calculate where they intersect by finding where the z values are equal when the two sets are rendered.This leads to our basic algorithm to render black silhouette edges on white background. Render the front facing polygons in white, this fills up the depth-buffer and then render the back facing polygons in black so that only the regions where they intersect will be rendered in black.

    ....

    However, this doesnt work very well in image space because of limited numerical precision. Also this will create atmost a single pixel width edges. To overcome this problem, I will briefly talk about the three techniques to compute the intersection of these two layers at image precision. They were also mentioned in the video.123

    In the first method, we render the front facing polygons in white to fill up the depth buffer as before. Then render edges of only the back facing polygons as thick lines. Part of these thick edges will appear around the corresponding front facing polygons. You can imagine other variations of this method using two primitive, polygons and lines. E.g. after filling up depth-buffer we can render only potential silhouette edges.One can change color, thickness or other parameters. The good part is that the silhouettes have uniform width. But when the width becomes large, you see gaps at corners as you saw in the video.The second technique brings the back facing polygons slightly in front of the corresponding front facing polygons.The paper describes solutions