Direct Rendering. Direct Rendering Goals

Similar documents
Circular Arcs as Primitives for Vector Textures

Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware

Point-Based Rendering

Direct Rendering of Trimmed NURBS Surfaces

Ray Casting of Trimmed NURBS Surfaces on the GPU

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Mattan Erez. The University of Texas at Austin

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Computer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing

Review of Tuesday. ECS 175 Chapter 3: Object Representation

Lecture IV Bézier Curves

Computer Graphics I Lecture 11

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

Surface Modeling. Polygon Tables. Types: Generating models: Polygon Surfaces. Polygon surfaces Curved surfaces Volumes. Interactive Procedural

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Data Representation in Visualisation

Chapter 4-3D Modeling

On improving the performance per area of ASTC with a multi-output decoder

Isosurface Rendering. CSC 7443: Scientific Information Visualization

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0)

CS 130 Final. Fall 2015

9. Three Dimensional Object Representations

Core Graphics and OpenGL ES. Dr. Sarah Abraham

Clipping and Scan Conversion

3D Rasterization II COS 426

Spring 2009 Prof. Hyesoon Kim

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

DiFi: Distance Fields - Fast Computation Using Graphics Hardware

08 - Designing Approximating Curves

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Chapter 3. Sukhwinder Singh

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Extraction of Level Sets from 2D Images

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Rendering Objects. Need to transform all geometry then

Einführung in Visual Computing

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

CHAPTER 1 Graphics Systems and Models 3

Chapter 10 Computation Culling with Explicit Early-Z and Dynamic Flow Control

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Realtime 3D Computer Graphics Virtual Reality

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Chapter - 2: Geometry and Line Generations

Hidden surface removal. Computer Graphics

Topics and things to know about them:

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

Real-Time Voxelization for Global Illumination

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

CS559: Computer Graphics. Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Rational Bezier Curves

Computergrafik. Matthias Zwicker. Herbst 2010

Sampling, Aliasing, & Mipmaps

CS451Real-time Rendering Pipeline

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

CSCI 420 Computer Graphics Lecture 14. Rasterization. Scan Conversion Antialiasing [Angel Ch. 6] Jernej Barbic University of Southern California

CS559 Computer Graphics Fall 2015

Computer Graphics Curves and Surfaces. Matthias Teschner

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

CS452/552; EE465/505. Clipping & Scan Conversion

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Rasterization. Rasterization (scan conversion) Digital Differential Analyzer (DDA) Rasterizing a line. Digital Differential Analyzer (DDA)

Sampling, Aliasing, & Mipmaps

Modeling 3D Objects: Part 2

Point based Rendering

Computer Graphics. Lecture 8 Antialiasing, Texture Mapping

Curves & Surfaces. Last Time? Progressive Meshes. Selective Refinement. Adjacency Data Structures. Mesh Simplification. Mesh Simplification

3D Rendering and Ray Casting

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Boundary descriptors. Representation REPRESENTATION & DESCRIPTION. Descriptors. Moore boundary tracking

CEng 477 Introduction to Computer Graphics Fall 2007

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

The Graphics Pipeline

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Line Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

5 Applications of Definite Integrals

Computer Graphics 7 - Rasterisation

COMPUTER GRAPHICS COURSE. Rendering Pipelines

Spring 2011 Prof. Hyesoon Kim

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

Rasterization. COMP 575/770 Spring 2013

The University of Calgary

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

2.11 Particle Systems

Parallel Triangle Rendering on a Modern GPU

Lecture 11: Ray tracing (cont.)

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Surface Reconstruction. Gianpaolo Palma

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Shape Modeling with Point-Sampled Geometry

Transcription:

May 2, 2005 Goals General Goals Small memory footprint Fast rendering High-quality results identical to those of Saffron V1 using distance-based anti-aliasing and alignment zones

Goals Specific Goals Avoid explicit ADF generation Compute a minimum number of distances Only compute distances near the edge of a glyph (i.e., within the filter area ) Set areas outside the filter area without computing distances For each sample point within the filter area, only compute the distance to the nearest feature (line, curve, corner) Avoid computing distances to the endpoints of lines and curves Eliminate bounding box tests Goals Specific Goals Amenable to CPU, GPU, and ASIC implementations Suitable for outlines and stroke-based formats Solve known issues Robust predicate test for special cells Support gross deformation and non-uniform scaling

Direct rendering vs. explicit ADF generation An explicit ADF representation computes distances for all potential density images and thus can be used to render multiple density images of the same glyph Different point sizes Different rotation angles Different CSM parameters Varying stroke weight and edge sharpness Direct rendering only computes distances needed for a particular density image Produces the density image for a single set of glyph attributes as efficiently as possible Explicit ADF Generation Glyph Attributes - Point size - Rotation angle - CSM params, 72 pt Path Generate ADF Render ADF - Locate cell - Reconstruct dist - Map to density 24 pt ADF Potentially too slow for processorconstrained devices Potentially too big to cache for memoryconstrained devices 6 pt

Glyph Attributes - Point size - Rotation angle - CSM params, 72 pt Map to Density Path Direct Rendering 24 pt Map to Density 6 pt Map to Density Distance buffer Basic approach Divide the distance field for each glyph into three areas Outside area Inside area Filter area Render each area separately to determine distances, combining these distances in a distance buffer the size of the density image Initialize the buffer to a large negative value (< outside cutoff) Fill the inside area with a large positive value (> inside cutoff) Compute distances in the filter area and combine in the buffer Map distances in the distance buffer to density values

Basic approach Initialize distance buffer to large neg. value (< outside cutoff) Fill inside with large pos. value (> inside cutoff) Compute distances in the filter area and combine in the distance buffer Map distances to density values Basic approach The geometry defining the filter area Can be very coarse (a fine sweep is unnecessary) Is fast to determine Is composed of simple shapes which can be decomposed into primitive shapes (e.g., triangles and quadrilaterals) which are fast and simple to render on CPUs, GPUs, and ASICs Exploit the mathematical properties of distance fields and features (lines, corners, curves) to compute distances within the filter area very efficiently For each sample point within the filter area, only computes distances to features within the filter radius

Step 1: Setting the outside area Initialize distance buffer to large neg. value (< outside cutoff) Fill inside with large pos. value (> inside cutoff) Compute distances in the filter area and combine in the distance buffer Map distances to density values Step 2: Filling the inside area Initialize distance buffer to large neg. value (< outside cutoff) Fill inside with large pos. value (> inside cutoff) Compute distances in the filter area and combine in the distance buffer Map distances to density values

Filling the inside area Two approaches Rasterize the original outline using a binary fill Rasterize a polygonal shape approximating the inside area Rasterize the outline using a binary fill Approximate the inside area with a simpler shape Filling the inside area The filled inside area can overlap the filter area Distance values computed from overlapping areas are combined in the distance buffer Combining chooses the smallest distance value Distances in the filter area will be smaller than the inside fill value so they will be chosen over the inside value during combining

Step 3: Computing distances in the filter area Initialize distance buffer to large neg. value (< outside cutoff) Fill inside with large pos. value (> inside cutoff) Compute distances in the filter area and combine in the distance buffer Map distances to density values Filter area The region of the distance field that is mapped to a density value between zero and one Depends on the CSM parameters (inside and outside cutoff) and point size Density max Outside area Inside area Outside cutoff Filter area Inside cutoff Distance This approach produces the same density image as Saffron V1 (i.e., explicit ADF generation) Identical density image yields identical type quality

Rendered glyph Anti-aliased pixels Required filter area 72 pt 24 pt 6 pt The filter area depends on point size Computing distances in the filter area Consider each feature (line, corner, curve) independently Define a region bounding the feature s contribution to the filter area Compute the distance to the feature for each density image pixel (or pixel component) in that region Combine distances in the distance buffer Choose the smallest distance for each pixel (or pixel component) This provides accurate distance values no quality compromise

Efficient distance computation Each feature contributes to a limited region of the filter area The distance near more than one feature is the smallest of the distances to each nearby feature Blue line contributes Green and blue lines contribute Green line contributes to this region of the filter area Glyph outline Filter area Curve bounding region Corner bounding region Line bounding region Define regions bounding each feature s contribution to the filter area Regions can overlap Regions can be too big (but not too small) Choose simple shapes that are easy to determine and to rasterize Compute distances for each region and combine them in the distance buffer In each region, compute distance to a single feature Combining chooses the smallest distance value for each pixel or pixel component

Regions for bounding features Line bounding region - Perpendicular to line at endpoints - Spans outside to inside cutoffs - Distance field is linear Corner bounding regions - Limited by normals of adjacent edges - Diameter determined by filter cutoffs - Distance field is quadratic Curve bounding region - Perpendicular to curve at endpoints - Polygonal shape - Based on convex hull of quadratic curve (easy to determine) Computing distances in feature regions Lines Analytic method Rasterize quadrilateral region bounding the line Compute the distance at each sample point P inside the quadrilateral region according to dist(p) = (P P 0 ) (P 1 P 0 ) / (P 1 P 0 ) Note that the quadrilateral region is constructed to avoid» Endpoint distance computations» Conditionals Vector (P - P 0 ) P Minimum distance to line P 0 P 1 P 0 P 1 Line P 0 P 1

Computing distances in feature regions Corners Analytic method (use squared distances to avoid square roots) Rasterize triangles partitioning the region bounding the corner Compute the distance at each sample point P inside each triangle according to squareddist(p) = (P P 0 ) 2 = (x x 0 ) 2 + (y y 0 ) 2 P = (x, y) Corner point Minimum distance to corner point P 0 P 0 = (x 0, y 0 ) Computing distances in feature regions Curves Texture mapping (use squared distances to avoid square roots) Rasterize triangles partitioning the region bounding the curve Compute the distance at each sample point P inside each triangle by» Mapping P to P in a canonical parabola (i.e., y = x 2 ) distance field stored in a texture map» Texture map contains, for every point in space, the vector (dx,dy) to the closest point on the canonical parabola» Determining (dx, dy ) at P from the texture map using bilinear interpolation» Mapping (dx, dy ) to (dx, dy) in the coordinates of the sample point» Computing squareddist(p) = dx 2 + dy 2

P 2 P P P 2 P 0 P 1 P 0 P 1 Curve with control points P 0, P 1, and P 2. Sample point P. Canonical parabola distance field and transformed sample point P and curve control points Computing distances in feature regions Curves Analytic method (use squared distances to avoid square roots) Rasterize triangles partitioning the region bounding the curve Compute the distance at each sample point P inside each triangle using a cubic root finder Cubic root finder can be accelerated by mapping the sample point P to a canonical parabola (y = x 2 ) which defines convergence regions and an initial guess for the solution

Back-of-the-envelope calculation 200 MHz ARM 9 processor 66K Gouraud-shaded texture-mapped triangles per second when rendering a full-screen (320x320) 3D model Direct rendering rates Average outline: 10 corners, 10 lines, 15 Bezier curves 3 triangles per corner, 2 per line, 5 per curve 125 triangles to represent the filter area Can direct render 66K/125 = 520 full screen glyphs (320x320) per second Glyphs occupying less screen space (typical point sizes) would render significantly faster With a density image cache that delivers a 90% hit rate, rendering throughput increases by 10x Summary Accurate Given a set of glyph attributes, direct rendering produces the same density image as would be produced via explicit ADF generation Fast Minimum number of distance computations Only compute distances in the filter area Filter area is fast to determine and can be decomposed into primitive shapes that are fast and simple to render on CPUs, GPUs, and ASICs Computing distances within each primitive shape is fast and simple Low memory overhead Compute distances directly from outlines or strokes Process each feature independently Buffer for combining distances the same size as the final density image