Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Similar documents
Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Enabling immersive gaming experiences Intro to Ray Tracing

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Shadows. COMP 575/770 Spring 2013

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

Introduction to PowerVR Ray Tracing Tuesday 18th March, GDC. James A. McCombe

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Sung-Eui Yoon ( 윤성의 )

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

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

The Traditional Graphics Pipeline

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

Intro to Ray-Tracing & Ray-Surface Acceleration

Photorealism: Ray Tracing

Ray Casting on Programmable Graphics Hardware. Martin Kraus PURPL group, Purdue University

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline

Rasterization Overview

Course Recap + 3D Graphics on Mobile GPUs

03 RENDERING PART TWO

NVIDIA Case Studies:

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

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

Metal for Ray Tracing Acceleration

Previously... contour or image rendering in 2D

Lecture 9: Deferred Shading. Visual Computing Systems CMU , Fall 2013

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

3D Rendering Pipeline

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

PowerVR Graphics - Latest Developments and Future Plans

Chapter 7 - Light, Materials, Appearance

PowerVR Hardware. Architecture Overview for Developers

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

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

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

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

POWERVR MBX. Technology Overview

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

Real-Time Voxelization for Global Illumination

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

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Pipeline Operations. CS 4620 Lecture 14

Interpolation using scanline algorithm

Fast Stereoscopic Rendering on Mobile Ray Tracing GPU for Virtual Reality Applications

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

Review for Ray-tracing Algorithm and Hardware

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

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

Real-Time Ray Tracing Using Nvidia Optix Holger Ludvigsen & Anne C. Elster 2010

Advanced Shading I: Shadow Rasterization Techniques

Hardware-driven Visibility Culling Jeong Hyun Kim

CPSC GLOBAL ILLUMINATION

CS427 Multicore Architecture and Parallel Computing

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

GeForce4. John Montrym Henry Moreton

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Interactive Light Mapping with PowerVR Ray Tracing

Conemarching in VR. Johannes Saam Mariano Merchante FRAMESTORE. Developing a Fractal experience at 90 FPS. / Framestore

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

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

Luxo Jr. (Pixar, 1986) Last Time. Real Cameras and Ray Tracing. Standard Rasterization. Lights, Cameras, Surfaces. Now Playing:

Fondamenti di Grafica 3D The Rasterization Pipeline.

Computer Graphics Shadow Algorithms

NVIDIA RTX: Enabling Ray Tracing in Vulkan. Nuno Subtil, Sr. Devtech Engineer / Eric Werness, Sr. System Software Engineer March 27, 2018

Lecture 12: Advanced Rendering

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

The Animation Process. Lighting: Illusions of Illumination

Deferred Rendering Due: Wednesday November 15 at 10pm

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

CS354R: Computer Game Technology

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

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections

ASYNCHRONOUS SHADERS WHITE PAPER 0

Models and Architectures

Introduction to Computer Graphics with WebGL

TSBK03 Screen-Space Ambient Occlusion

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]

Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow. Takahiro Harada, AMD 2017/3

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

CS GAME PROGRAMMING Question bank

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Working with Metal Overview

A distributed rendering architecture for ray tracing large scenes on commodity hardware. FlexRender. Bob Somers Zoe J.

Transcription:

Enhancing Traditional Rasterization Graphics with Ray Tracing October 2015

James Rumble Developer Technology Engineer, PowerVR Graphics

Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using Ray Tracing 3

Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using Ray Tracing 4

Introduction to Ray Tracing Ray Tracing is not a new concept! Synonymous with photorealistic (offline) renders Traditionally too resource intensive for broad industry applications Ray tracing is emerging as the next big thing in real-time graphics Used in a limited fashion i.e. reflections and shadows Often limited to very few rays and low resolution/course grained scene representations The benefits ray tracing can offer are obvious 5

Ray Tracing Fundamentals Triangles Rays Intersection Testing Process of determining if a given ray has intersected a given triangle RAY = {origin, direction, clipping distance} 6

Tracing Rays Forward Ray Tracing vs Backward Ray Tracing Commonly visualised and explained as a process of modelling light Rays used to model real-world behaviour of light Forward Ray Tracing: Rays traced from the light source Many rays never reach our eyes Backward Ray Tracing: Rays traced from the eye towards light 7

Tracing Rays Forward Ray Tracing vs Backward Ray Tracing Commonly visualised and explained as a process of modelling light Rays used to model real-world behaviour of light Forward Ray Tracing: Rays traced from the light source Many rays never reach our eyes Backward Ray Tracing: Rays traced from the eye towards light 8

What is Ray Tracing? Backwards Ray Tracing How is ray tracing commonly used? Primary rays fired from eye through pixels of the screen Finds closest triangle intersection Secondary Rays used for additional effects 9

Ray Tracing Basics Backwards Ray Tracing Now using a concrete example Cast primary rays out into the world through each pixel Find the closest triangle intersection Secondary Rays used for additional effects (direct lighting) 10

What is Ray Tracing? Spatial Queries Can be used in a more abstract way than simply modelling light Can be used to calculate spatial queries between rays and objects/triangles i.e. Does ray x intersect object 1 A ray can be fired as long it has been given an origin and direction Fire a ray from a box towards a neighbouring object. It intersects the plane in between Fire a ray from a box towards a neighbouring object. It reaches the other box and is marked as intersected 11

What is Ray Tracing? Ray Tracing provides a mechanism for determining inter-object visibility using spatial queries Objects can be aware of both their own properties and position but now also those of other objects in the scene through the use of rays Provides elegant solutions to many traditionally difficult to render or process effects 12

Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using Ray Tracing 13

Introducing PowerVR Ray Tracing PowerVR Ray Tracing GPUs are built on top of the latest generation of PowerVR GPUs Additional ray tracing specific hardware designed to integrate efficiently and communicate perfectly with the rest of the GPU architecture Real-time, interactive ray traced graphics that can comfortably scale from mobile and embedded platforms to gaming consoles and mainstream gaming PCs 14

PowerVR Ray Tracing Pipeline Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 15

Scene Hierarchy Organises triangles based on their size and position Scene Hierarchy Building Phase Vertex Processing Hierarchy Generation Memory Geometry Data Scene Hierarchy Geometry Submission Scene Components Scenes 16

Scene Hierarchy Generation Geometry submission Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy Geometry Submission Scene Components Scenes 17

Scene Hierarchy Generation Scene Components Windshield Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Chrome Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Car Body Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Headlights Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Tyres Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures 18

Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Component: - Program: - Vertex Shader - Ray Shader - Uniforms - Geometry Data - Buffers - Textures Scene Hierarchy Generation World Scenes Contain groups of scene components Ray traversal occurs within scene Windshield Chrome Windshield Chrome Car Body Car Body Headlights Tyres Headlights Tyres Windshield Chrome Car Body Headlights Tyres 19

Scene Hierarchy Generation Vertex processing Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 20

Scene Hierarchy Generation Vertex processing Vertex shader used to transform geometry to world space 21

Scene Hierarchy Generation Hierarchy generation Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 22

Scene Hierarchy Generation Hierarchy generation Vertex shader output is passed to a fixed function scene generator which calculates the scene hierarchy 23

Scene Ray Traversal Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 24

Scene Ray Traversal Primary ray generation Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 25

Scene Ray Traversal Primary ray generation Frame Shaders are run once per pixel to emit primary rays into the scene 26

Scene Ray Traversal Intersection tests Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 27

Scene Ray Traversal Intersection tests Simple approach each ray tested against all triangles: Brute force m * n intersection tests (m rays, n objects) Use accelerated data structure to reduce intersection tests Application developer does not need to worry about handling this Accelerated triangle and box testing 28

Scene Ray Traversal Intersection tests Simple approach each ray tested against all triangles: Brute force m * n intersection tests (m rays, n objects) Use accelerated data structure to reduce intersection tests Fixed function hardware accelerated triangle and box testing 29

Scene Ray Traversal Ray shaders and accumulation Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy 30

Scene Ray Traversal Ray shaders and accumulation Ray Shaders: Defined for each scene component and invoked when a ray intersects a triangle Defines material properties of component (fully programmable) Can emit further rays causing additional intersection tests accumulate(0.85, 0.85, 0.75); reflect(incidentdirection, normal) 31

Types of Rays are important Rays are a communication medium making inter-object visibility possible An engine will likely use multiple types of ray Primary Rays If it hits anything shade it / emit additional rays Shadow Rays if it doesn t hit a light kill it etc. 32

Coherence-Gathering What if these rays could be automatically coalesced? 33

Pipeline Summary Scene Hierarchy Building Phase Ray Traversal Phase Vertex Processing Hierarchy Generation Primary Ray Generation Intersection Tests Ray Shaders Accumulation Memory Geometry Data Scene Hierarchy Geometry Submission Scene Components Scenes 34

Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using Ray Tracing 35

How do we use it? Hybrid Shadows, Reflections, etc. Augmented Reality Production- Order-Independent Quality Renders Transparency Ambient Occlusion Asset creation / compression Global Illumination Physics & Collision Detection Virtual Reality Lens correction, Ultra-low latency rendering, Lenticular Displays A.I. & Line of Sight Calculations Rapid photoquality output 36

Modern Raster-Based Game Engine Deferred shading used in many modern game engines Render the scene into a deep frame buffer (G-Buffer) G-Buffer Material IDs Normals Lighting Buffer(s) Compute Lighting on each G-Buffer pixel (No Overdraw) World-Space Positions or depth buffer Lighting calculations executed in screen space Assemble the final frame and perform screen-space effects Final Result Frame 37

Ray Trace Using the G-Buffer Who needs primary rays when we have rasterization G-Buffer Material IDs Normals World Space Positions or Depth values (1.0,0.0,0.0) (0.5,0.6,-0.2) (14.3,81.6,-0.4) 38

Ray Trace Using the G-Buffer Who needs primary rays when we have rasterization G-Buffer Material IDs Normals World Space Positions or Depth values (1.0,0.0,0.0) (0.5,0.6,-0.2) (14.3,81.6,-0.4) 39

Hybrid Ray Tracing Use the G-Buffer to set up your rays Render the scene into a deep frame buffer (G-Buffer) G-Buffer Material IDs Normals Lighting Buffer(s) Trace Rays to determine lighting World-Space Positions or depth buffer Assemble the final frame and perform screen-space effects Final Result Frame 40

Ray Traced Techniques Analytical 1 Ray Per Pixel Soft Shadows Ray traced Cascaded shadow maps http://cdn.imgtec.com/sdk-presentations/idc15_sf_enhancingtraditionalrasterizationgraphicswithraytracing.pdf 41

Ray Traced Techniques Low Overhead Probe based Global Illumination Direct Lighting Only Ray Traced Global Illumination http://cdn.imgtec.com/sdk-presentations/idf15_sf_lowoverheadprobebasedglobalilluminationusingraytracing.pdf 42

Summary An introduction to ray tracing The PowerVR Ray Tracing Pipeline Hybrid Ray Tracing Ray Traced Technique Teaser 43