Ray Casting of Trimmed NURBS Surfaces on the GPU

Similar documents
Direct Rendering of Trimmed NURBS Surfaces

Review of Tuesday. ECS 175 Chapter 3: Object Representation

CHAPTER 1 Graphics Systems and Models 3

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

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

3D Modeling: Surfaces

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

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

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

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Intro to Ray-Tracing & Ray-Surface Acceleration

Computer Graphics I Lecture 11

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

Spatial Data Structures

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

Computer Graphics Curves and Surfaces. Matthias Teschner

Information Coding / Computer Graphics, ISY, LiTH. Splines

Chapter 4-3D Modeling

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

Direct Rendering. Direct Rendering Goals

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

CPSC GLOBAL ILLUMINATION

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

Solid Modeling. Ron Goldman Department of Computer Science Rice University

Central issues in modelling

Rasterization Overview

CS354 Computer Graphics Surface Representation IV. Qixing Huang March 7th 2018

Computer Graphics Ray Casting. Matthias Teschner

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

INF3320 Computer Graphics and Discrete Geometry

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Accelerating Ray-Tracing

Curve and Surface Basics

Introduction to Computer Graphics with WebGL

Single Scattering in Refractive Media with Triangle Mesh Boundaries

Curves D.A. Forsyth, with slides from John Hart

Overview: Ray Tracing & The Perspective Projection Pipeline

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

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

Tessellating and Rendering Bezier/B-Spline/NURBS Curves and Surfaces using Geometry Shader in GPU

SEOUL NATIONAL UNIVERSITY

Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03

Modeling 3D Objects: Part 2

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

Computergrafik. Matthias Zwicker. Herbst 2010

The Graphics Pipeline

Animation & Rendering

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

The Traditional Graphics Pipeline

Ray-casting Algebraic Surfaces using the Frustum Form. Eurographics 2008 Crete, Thursday April 17.

Models and Architectures

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Spatial Data Structures

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Hybrid Ray Tracing and Path Tracing of Bezier Surfaces Using A Mixed Hierarchy

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

Intersection Acceleration

The Application Stage. The Game Loop, Resource Management and Renderer Design

Intro to Modeling Modeling in 3D

Spatial Data Structures

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

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

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

Heterogeneous Computing and Geometry Processing

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

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

Correct resolution rendering of trimmed spline surfaces

Werner Purgathofer

CS 130 Exam I. Fall 2015

Ray Tracing: Intersection

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

OUTLINE. Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system

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

CS 354R: Computer Game Technology

Lecture IV Bézier Curves

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

SUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling

Subdivision Surfaces

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

11/1/13. Polygon Meshes and Implicit Surfaces. Shape Representations. Polygon Models in OpenGL. Modeling Complex Shapes

An Algorithm of 3D Mesh Reconstructing Based on the Rendering Pipeline

Level of Details in Computer Rendering

Advanced Computer Graphics

Real-time Digital Dome Rendering Techniques and Technologies Robert Kooima, Doug Roberts, Mark SubbaRao

Polygon Meshes and Implicit Surfaces

CPSC / Sonny Chan - University of Calgary. Collision Detection II

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Subdivision Surfaces

Physically-Based Modeling and Animation. University of Missouri at Columbia

Polygon Meshes and Implicit Surfaces

Transcription:

Ray Casting of Trimmed NURBS Surfaces on the GPU Hans-Friedrich Pabst Jan P. Springer André Schollmeyer Robert Lenhardt Christian Lessig Bernd Fröhlich Bauhaus University Weimar Faculty of Media Virtual Reality Systems Group IEEE Symposium on Interactive Ray Tracing 2006 1 / 21

Overview GPUCAST system Framework for single pass ray casting on the GPU Generic library: algorithms, data structures Type/value transform iterators on the GPU Shader metaprogramming Scene graph integration Publication Pabst, Springer, Schollmeyer, Lenhardt, Lessig, Froehlich: Ray Casting of Trimmed NURBS Surfaces on the GPU Introduction 2 / 21

Motivation Trimmed NURBS surfaces CAD standard Ray casting Direct rendering Pixel-accurate GPU Lots of gigaflops per value Main Goal Interactive rendering of trimmed NURBS surfaces using ray casting on commodity hardware. Introduction 3 / 21

Motivation Trimmed NURBS surfaces CAD standard Ray casting Direct rendering Pixel-accurate GPU Lots of gigaflops per value Main Goal Interactive rendering of trimmed NURBS surfaces using ray casting on commodity hardware. Introduction 3 / 21

NURBS NURBS surfaces provide local and explicit control Primitives included, e. g. curve, sphere, cone, cube Compact representation Continuity between curves and patches Trimming allows complex boundaries and topologies Introduction 4 / 21

Outline Integrate NURBS primitives into hardware graphics pipeline Ray-NURBS intersection and accurate trimming on the GPU Demonstration Results and conclusions Introduction 5 / 21

Surface Rendering: Algorithm Overview Primitive Transform Create Rays Intersection Calc. Shading Preprocessing Create bounding volume (convex hull) Send vertices and parametric data For each surface Transform convex hull Rasterize convex hull Compute ray-surface intersection Trimming Shading Result Surface Rendering 6 / 21

Surface Rendering: Algorithm Overview Primitive Transform Create Rays Intersection Calc. Shading CPU Preprocessing Create bounding volume (convex hull) Send vertices and parametric data For each surface Transform convex hull Rasterize convex hull Compute ray-surface intersection Trimming Shading Result Screen Surface Rendering 6 / 21

Surface Rendering: Algorithm Overview Primitive Transform Create Rays Intersection Calc. Shading Raster Unit CPU Vertex Unit Preprocessing Create bounding volume (convex hull) Send vertices and parametric data For each surface Transform convex hull Rasterize convex hull Compute ray-surface intersection Trimming Shading Result Screen Surface Rendering 6 / 21

Surface Rendering: Algorithm Overview Primitive Transform Create Rays Intersection Calc. Shading Raster Unit CPU Vertex Unit Fragment Unit Preprocessing Create bounding volume (convex hull) Send vertices and parametric data For each surface Transform convex hull Rasterize convex hull Compute ray-surface intersection Result Screen Trimming Shading Surface Rendering 6 / 21

Surface Rendering: Algorithm Overview Primitive Transform Create Rays Intersection Calc. Raster Unit CPU Vertex Unit Fragment Unit Memory Preprocessing Create bounding volume (convex hull) Send vertices and parametric data For each surface Transform convex hull Rasterize convex hull Compute ray-surface intersection Shading Result Render Target Screen Trimming Shading Surface Rendering 6 / 21

Numeric Intersection Computation Evaluation: (uv) (x, y, z) Solving: (x, y, z) (uv) Methods: general root finding vs. geometrical context Subdivision Numerical (iterative) Algebraic Hybrid Newton Iteration Only parameters of one step necessary Only function values and partial derivatives needed Quadratic convergence Surface Rendering 7 / 21

Initial Values for the Newton Iteration Problem: An approximate solution is needed to get a solution Information about geometrical context can be used Ray Two complementary approaches: subdivision and uv-texturing Motivation: good initial values will result in fast convergence Surface Rendering 8 / 21

Subdivision of the Convex Hull Quadratically increasing tightness Trade-off between ray casting and standard graphics pipeline Minimizes number of fragments/rays Number of vertices increased Adaptive subdivision Minimizes number of generated vertices Union of all convex hulls Approximation of the surface Surface Rendering 9 / 21

uv-texturing Idea: interpolated guess for each ray Associate an initial value (vertex attribute) with each vertex Complement outer control points Mapping parameter range between Subdivision-aware Subdivsion increases quality Problem Good heuristic for points of the control mesh Invalid for some edges/faces of the convex hull 0 ⅓ ⅔ t = 0.75 1 Surface Rendering 10 / 21

Trimming: Algorithm Overview Ray casting in parameter domain Similar to point-in-polygon test Bézier form provides exact representation of NURBS curves Accurate intersection computation using Bézier Clipping odd odd even Trimming 11 / 21

Bézier Clipping Numerical root finding algorithm (subdivision) Makes use of the convex hull property v d ⅓ d 0 d 2 d 1 d 3 d 0 d 1 d 2 d 3 t u ⅔ 1 Transformation into local equidistant coordinate system, invariant with respect to the intersection points Trimming 12 / 21

Bézier Clipping (cont.) d d t t min t max t Compute convex hull intersections with t-axis Split curve at t min and t max ( clipping ) Interval contraction driven by clipping and subdivision Trimming 13 / 21

Iterative Bézier Clipping Problem: Subdivision implies recursive processing of sub-intervals clip subdivide clip subdivide clip hit Only two intervals at a time are needed Only one scalar value needed to represent remaining interval Trimming 14 / 21

Iterative Bézier Clipping (cont.) Favors re-computation over storing values Consists of a state machine inside a loop to simulate function calls Intersection test takes advantage of Bernstein-Bézier form Properties Iterative depth-first algorithm Enumerates roots in ascending order This is the first implementation of a subdivision-like single pass algorithm on current graphics hardware. Trimming 15 / 21

Direct Trimming Interactive manipulation of existing control points possible Complements the direct rendering of surfaces Can also be used for trimming triangulated patches Trimming 16 / 21

Limitations Hardware and tool chain Registers, writeable memory Compiler, graphics driver, debugging Algorithm Artifacts (ray-surface intersection) Trimming without acceleration data structure Large models Usually one program per surface Limited degree ( 6 6): M + 2N 19 with N M Limitations 17 / 21

The Trimmed Utah Teapot Iteration + Manipulation Demo 18 / 21

Results Figure Triangles Subdivision FPS 4 FPS 8 3732 1 1 18 15 Duck 15648 2 2 20 16 63602 4 4 20 16 3092 2 2 33 24 Teapot 12698 4 4 36 28 51160 8 8 30 25 Teapot Orient 12698 4 4 24 19 3092 2 2 22 18 51160 8 8 22 18 Teapot NV 12698 4 4 19 16 3092 2 2 18 15 51160 8 8 17 15 Resolution 1280 1024, screen covering 80 % of width, GPU Geforce 7900 GT Results 19 / 21

Results Figure Triangles Subdivision FPS 4 FPS 8 3732 1 1 18 15 Duck 15648 2 2 20 16 63602 4 4 20 16 3092 2 2 33 24 Teapot 12698 4 4 36 28 51160 8 8 30 25 Teapot Orient 12698 4 4 24 19 3092 2 2 22 18 51160 8 8 22 18 Teapot NV 12698 4 4 19 16 3092 2 2 18 15 51160 8 8 17 15 Resolution 1280 1024, screen covering 80 % of width, GPU Geforce 7900 GT Results 19 / 21

Results Figure Triangles Subdivision FPS 4 FPS 8 3732 1 1 18 15 Duck 15648 2 2 20 16 63602 4 4 20 16 3092 2 2 33 24 Teapot 12698 4 4 36 28 51160 8 8 30 25 Teapot Orient 12698 4 4 24 19 3092 2 2 22 18 51160 8 8 22 18 Teapot NV 12698 4 4 19 16 3092 2 2 18 15 51160 8 8 17 15 Resolution 1280 1024, screen covering 80 % of width, GPU Geforce 7900 GT Results 19 / 21

Results Figure Triangles Subdivision FPS 4 FPS 8 3732 1 1 18 15 Duck 15648 2 2 20 16 63602 4 4 20 16 3092 2 2 33 24 Teapot 12698 4 4 36 28 51160 8 8 30 25 Teapot Orient 12698 4 4 24 19 3092 2 2 22 18 51160 8 8 22 18 Teapot NV 12698 4 4 19 16 3092 2 2 18 15 51160 8 8 17 15 Resolution 1280 1024, screen covering 80 % of width, GPU Geforce 7900 GT Results 19 / 21

Conclusions Direct rendering Ideal solution for CAD Low CPU overhead Minimal storage Pixel-accurate Silhouettes Interpenetrations Normals Future Work Reliable ray-surface intersection test Trimming acceleration data structure Higher order primitives will complement triangles as the primary rendering primitive. Conclusions 20 / 21

Conclusions Direct rendering Ideal solution for CAD Low CPU overhead Minimal storage Pixel-accurate Silhouettes Interpenetrations Normals Future Work Reliable ray-surface intersection test Trimming acceleration data structure Higher order primitives will complement triangles as the primary rendering primitive. Conclusions 20 / 21

The End. Thank you for your attention. Conclusions 21 / 21