Ray Tracing: Intersection

Similar documents
Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Ray Tracing Acceleration Data Structures

Spatial Data Structures

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

Spatial Data Structures

Spatial Data Structures

Computer Graphics. Bing-Yu Chen National Taiwan University

Advanced 3D-Data Structures

Spatial Data Structures

Spatial Data Structures

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

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Computer Graphics. - Spatial Index Structures - Philipp Slusallek

Hidden Surface Elimination: BSP trees

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

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

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

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

VIII. Visibility algorithms (II)

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Intersection Acceleration

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Accelerating Ray Tracing

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

CPSC GLOBAL ILLUMINATION

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Solid Modeling. Ron Goldman Department of Computer Science Rice University

Acceleration Data Structures

Algorithms for GIS:! Quadtrees

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

Accelerated Raytracing

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

Computer Graphics. - Ray-Tracing II - Hendrik Lensch. Computer Graphics WS07/08 Ray Tracing II

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

Collision Detection based on Spatial Partitioning

MODELING AND HIERARCHY

Spatial Data Structures. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

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

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Lecture 11: Ray tracing (cont.)

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Recursion and Data Structures in Computer Graphics. Ray Tracing

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

Spatial Data Structures and Acceleration Algorithms

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing

Spatial Data Structures and Speed-Up Techniques. Ulf Assarsson Department of Computer Science and Engineering Chalmers University of Technology

CSE 167: Introduction to Computer Graphics Lecture 11: Scene Graph 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Acceleration Data Structures for Ray Tracing

Ray Genealogy. Raytracing: Performance. Bounding Volumes. Bounding Volume. Acceleration Classification. Acceleration Classification

COMP 175: Computer Graphics April 11, 2018

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

9. Visible-Surface Detection Methods

Spatial Data Structures and Acceleration Algorithms

Graphics 2009/2010, period 1. Lecture 8: ray tracing

SAH guided spatial split partitioning for fast BVH construction. Per Ganestam and Michael Doggett Lund University

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Data Structures and Algorithms

Row Tracing with Hierarchical Occlusion Maps

CHAPTER 1 Graphics Systems and Models 3

Computational Geometry

Collision Detection. Pu Jiantao.

Binary Space Partition Trees. Overview. Binary Space Partitioning Trees (Fuchs, Kedem and Naylor `80)

Lecture 2 - Acceleration Structures

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

Ray Tracing Acceleration. CS 4620 Lecture 20

Speeding up your game

קורס גרפיקה ממוחשבת 2010/2009 סמסטר א' Rendering 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Computer Graphics Ray Casting. Matthias Teschner

Ray Intersection Acceleration

Sung-Eui Yoon ( 윤성의 )

Space-based Partitioning Data Structures and their Algorithms. Jon Leonard

CS535 Fall Department of Computer Science Purdue University

Advanced Ray Tracing

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

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Ray Casting. COS 426, Spring 2015 Princeton University

Computer Graphics II

Second degree equations - quadratics. nonparametric: x 2 + y 2 + z 2 = r 2

9. Three Dimensional Object Representations

Comparison of hierarchies for occlusion culling based on occlusion queries

3D Modeling: Solid Models

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

A Model to Evaluate Ray Tracing Hierarchies

Ray Casting of Trimmed NURBS Surfaces on the GPU

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

Lecture 11. More Ray Casting/Tracing

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Ray Casting. 3D Rendering. Ray Casting. Ray Casting. Ray Casting. Ray Casting

Transcription:

Computer Graphics as Virtual Photography Ray Tracing: Intersection Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera tone model reproduction (focuses simulated lighting) synthetic image Ray Tracing: Intersection We only talked about ray intersection with spheres and planes What about? Boxes Cylinders Cones Triangles Spline surfaces Irregular shapes Ray Tracing - Object - Ray Intersection For each ray, intersection test needs to be made for each object This could costly if you have many objects consider if object has n polygons, n very large! Solutions Adaptive Depth Control Bounding Volume Spatial Subdivision Ray Tracing Adaptive Depth Control Indices of diffuse/reflection/refraction get multiplied together as the ray tracer recurses Depending on material properties, this attenuation can get very small Keep running product and stop when below a threshold Place simple objects (i.e., sphere or box) around complex objects Suitability depends on object being enclosed! Do initial intersection tests on bounding objects. If ray intersects bounding volume, then test complex bounded object Can be nested 1

[Watt/Watt,235] [Watt/Watt,236] Motivation Without spatial subdivision, for each ray, you will need to query all objects/polygons and test for intersection With spatial subdivision, you know which objects are in each volume so you only test objects that are in the volumes where a ray is traveling. Subdivide your scene volume into hierarchical regions Octrees BSP Trees Create a tree structure that indicates for each region: if the region is empty the object present at that particular region Test ray intersection with region volume Ray Tracing - Octrees Ray Tracing - Octrees Recursively subdivide volume into equal regions. If subregion is empty or contains a single object, then stop Otherwise, further subdivide. Continue until each subregion is empty or contains a single object. [Foley/Van Dam] 2

Ray Tracing Oct(quad)trees Subdivisions represented as a tree Ray Tracing - Oct(quad)trees Quadtree applet http://njord.umiacs.umd.edu:1601/users/brabec/qu adtree/points/pointquad.html [Watt/Watt,244] Images from http://www.flipcode.com/tutorials/tut_octrees.shtml Shows viewing frustum and which octants need to be checked. 3

Binary Space Partitioning Trees (BSP Trees) Like Octrees but divides space into a pair of subregions Subregions need not be equally spaced Planes separating regions can be placed at object boundaries. Octrees vs BSP Trees [Watt/Watt,246] BSP Trees Each non-terminal node represents a single partitioning plane that divides space in two BSPTree applet http://symbolcraft.com/graphics/bsp/index.html [Watt/Watt,247] Advantages Efficient means for finding objects within your space Compact representation Disadvantages Preprocessing required If scene changes, must rebuild your tree Not foolproof Potential Problems - can double testing or miss small items [Watt/Watt,247] 4

Octrees vs BSP trees BSP Trees are generally more balanced than Octrees BSP Traversal more efficient BSP Trees have additional storage overhead as must store subdivision planes Summary Intersection Calculations Bounding Volumes Spatial Subdivision Octrees BSPTrees Questions? 5