SIGGRAPH 2013 Shaping the Future of Visual Computing

Similar documents
RAY TRACING WITH OPTIX A TUTORIAL FOR DEVELOPERS. David McAllister, James Bigler, Brandon Lloyd

ADVANCED OPTIX. David McAllister, James Bigler, Brandon Lloyd

Contents. 2 CUDA C Reference Declarations Types Functions Appendix Interop Formats...

NVIDIA OptiX. API Reference Manual. 9 May 2018 Version 5.1

NVIDIA OPTIX 5.1. API Reference Manual

OptiX Utility Library

Bounding Volume Hierarchy Optimization through Agglomerative Treelet Restructuring

NVIDIA Case Studies:

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

Siggraph Asia December 2011

NVIDIA Advanced Rendering

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Enabling immersive gaming experiences Intro to Ray Tracing

GPU Ray Tracing at the Desktop and in the Cloud. Phillip Miller, NVIDIA Ludwig von Reiche, mental images

Accelerating Realism with the (NVIDIA Scene Graph)

INTRODUCTION TO OPTIX. Martin Stich, Engineering Manager

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

03 RENDERING PART TWO

SIGGRAPH 2011 Vancouver August 8 th, 2011

Fast BVH Construction on GPUs

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

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

NVIDIA RESEARCH TALK: THE MAGIC BEHIND GAMEWORKS HYBRID FRUSTUM TRACED SHADOWS

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

CS427 Multicore Architecture and Parallel Computing

LEVERAGING NVRTC FOR BUILDING OPTIX SHADERS FROM MDL MATERIALS Detlef Röttger, NVIDIA Andreas Mank, ESI Group

CS354R: Computer Game Technology

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Classic Rendering Pipeline

Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global Illumination. Cyril Crassin NVIDIA Research

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

Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

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

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

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

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

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

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

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

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes J. Pantaleoni, L. Fascione, M. Hill, T. Aila

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

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

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

Review for Ray-tracing Algorithm and Hardware

CS8803SC Software and Hardware Cooperative Computing GPGPU. Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Intro to Ray-Tracing & Ray-Surface Acceleration

Sung-Eui Yoon ( 윤성의 )

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

Ray tracing. EECS 487 March 19,

Ray Tracing. Kjetil Babington

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

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

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

Lecture 15: Introduction to GPU programming. Lecture 15: Introduction to GPU programming p. 1

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

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

Advancements in V-Ray RT GPU GTC 2015 Vladimir Koylazov Blagovest Taskov

Octree-Based Sparse Voxelization for Real-Time Global Illumination. Cyril Crassin NVIDIA Research

Deus Ex is in the Details

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

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

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

CSCI-6962 Advanced Computer Graphics

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Advanced Rendering Solutions from NVIDIA

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

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

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]

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

Mattan Erez. The University of Texas at Austin

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

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

HLBVH: Hierarchical LBVH Construction for Real Time Ray Tracing of Dynamic Geometry. Jacopo Pantaleoni and David Luebke NVIDIA Research

Shaders. Slide credit to Prof. Zwicker

Ray tracing based fast refraction method for an object seen through a cylindrical glass

Programming projects. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer

Me Again! Peter Chapman. if it s important / time-sensitive

3D Production Pipeline

Real-time ray tracing

V-RAY 3.6 FOR RHINO KEY FEATURES. January 2018

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Abstract. Introduction. Kevin Todisco

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

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

Advancements in V-Ray RT GPU. Vlado Koylazov, CTO & Co-founder Blagovest Taskov, RT GPU Team Lead Alexander Soklev, RT GPU R&D

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

My focus will be on pointing out the patterns rather than explaining individual algorithms

OptiX: A General Purpose Ray Tracing Engine

OptiX : A General Purpose Ray Tracing Engine

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

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

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

Real Time Ray Tracing

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

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

The Traditional Graphics Pipeline

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

The Traditional Graphics Pipeline

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Transcription:

SIGGRAPH 2013 Shaping the Future of Visual Computing Building Ray Tracing Applications with OptiX David McAllister, Ph.D., OptiX R&D Manager Brandon Lloyd, Ph.D., OptiX Software Engineer

Why ray tracing? Ray tracing unifies rendering of visual phenomena fewer algorithms with fewer interactions between algorithms Easier to combine advanced visual effects robustly soft shadows indirect illumination transparency reflective & glossy surfaces subsurface scattering depth of field

Recursive Ray Tracing Whitted-style recursive Reflection and refraction per hit Beer s Law attenuation Depth cut-off Importance cut-off

Ray Tracing Algorithms Real-time Interactive Batch Computational Power today

Real Time Path Tracing What would it take? 4 rays / sample 50 samples / pixel 2M pixels / frame 30 frames / second = 12B rays / second GeForce GTX 680: 350M rays / second Need 35X speedup Good enough for games 1 shading sample 1 AA sample 9 shading samples 1 AA sample 18 shading samples 2 AA samples 36 shading samples 4 AA samples 72 shading samples 8 AA samples 144 shading samples 16 AA samples

How to optimize ray tracing (or anything) Better hardware Better software Better middleware (GPUs) (Algorithmic improvement) (Tune for the architecture)

GPUs the processor for ray tracing Abundant parallelism, massive computational power GPUs excel at shading Opportunity for hybrid algorithms

Acceleration Structures

OptiX Execution Model Launch rtcontextlaunch Ray Generation Program Exception Program rttrace Callable Program Traverse Node Graph Traversal Shade Miss Program Selector Visit Program Acceleration Traversal Closest Hit Program Intersection Program Any Hit Program

C Host API Sample RTresult rtcontextcreate (RTcontext* context); RTresult rtcontextdestroy (RTcontext context); RTresult rtcontextdeclarevariable (RTcontext context, const char* name, RTvariable* v); RTresult rtcontextsetraygenerationprogram (RTcontext context, unsigned int entry_point_index, RTprogr RTresult rtbuffercreate (RTcontext context, unsigned int bufferdesc, RTbuffer* buffer); RTresult rtbuffersetformat (RTbuffer buffer, RTformat format); RTresult rtbuffermap (RTbuffer buffer, void** user_pointer); RTresult rtbufferunmap (RTbuffer buffer); RTresult rtprogramcreatefromptxstring (RTcontext context, const char* ptx, const char* program_name, RTresult rtprogramcreatefromptxfile (RTcontext context, const char* filename, const char* program_nam RTresult rtcontextlaunch2d (RTcontext context, unsigned int entry_point_index, RTsize image_width, RT

C++ Host API Sample Context* context = Context::create(); context["max_depth"]->setint( 5 ); context["scene_epsilon"]->setfloat( 1.e-4f ); // Ray gen program Program ray_gen_program = context->createprogramfromptxfile( myprogram.ptx,"pinhole_camera" ); context->setraygenerationprogram( 0, ray_gen_program ); BasicLight lights[] = {... }; Buffer light_buffer = context->createbuffer(rt_buffer_input); light_buffer->setformat(rt_format_user); light_buffer->setelementsize(sizeof(basiclight)); light_buffer->setsize( sizeof(lights)/sizeof(lights[0]) ); memcpy(light_buffer->map(), lights, sizeof(lights)); light_buffer->unmap(); context["lights"]->set(light_buffer);

OptiX 3.0.1 Bug fix release Available this week

OptiX Feature Sneak Peek Next release coming in a few months

Compilation Optimization rtcontextcompile() 3-7X faster Still, you should avoid recompiles if possible.

Updated Support Visual Studio 2012 support CUDA 5.5 support Quadro K6000 support

Visual Studio OptiX Wizard

Acceleration Builder Options Sbvh has world class ray tracing performance Lbvh is extremely fast and works on very large datasets Slow Build Fast Render Fast Build Slow Render Sbvh Bvh MedianBvh Lbvh

Fast Render Sbvh Acceleration Builder Options Bvh MedianBvh Slow Render Lbvh Slow Build Fast Build

Fast BVH Builds LBVH + refinement A new approach introduced in OptiX 3.0 Very fast to build Good for animation Quality does not approach optimal

TRBVH LBVH + refinement new + splits New work by NVIDIA Research VERY fast to build 40M tris / sec on a GeForce GTX Titan World s fastest high quality BVH builder Quality averages 91% of SBVH HPG 2013 paper: https://research.nvidia.com/publication/fastparallel-construction-high-quality-bounding-volume-hierarchies

Fast Render Acceleration Builder Options Sbvh Bvh Trbvh MedianBvh Slow Render Lbvh Slow Build Fast Build

OptiX Low-Level Library Specialized for ray tracing (no shading) Replaces rtutraversal Improved performance Uses latest algorithms from NVIDIA Research ray tracing kernels [Aila and Laine 2009; Aila et al. 2012] Treelet Reordering BVH (TRBVH) [Karras 2013] Can use CUDA buffers as input/output Support for asynchronous computation Distributed as DLL and static library Designed with an eye towards future features

API Overview C API with C++ wrappers API Objects Context Buffer Descriptor Model Query

Context Context tracks other API objects and encapsulates the ray tracing backend Creating a context OLLresult ollcontextcreate(ollcontexttype type, OLLcontext* context) Context types OLL_CONTEXT_TYPE_CPU OLL_CONTEXT_TYPE_CUDA Default for CUDA backend uses all available GPUs Selects Master GPU and makes it the current device Master GPU builds acceleration structure

Context Selecting devices: ollcontextsetcudadevicenumbers( OLLcontext context, int devicecount, const int* devicenumbers ) First device is used as the master GPU Destroying the context destroys objects created by the context synchronizes the CPU and GPU

Buffer Descriptor Buffers are allocated by the application Buffer descriptors encapsulate information about the buffers ollbufferdesccreate( OLLcontext context, OLLbufferformat format, OLLbuffertype void* type, buffer, OLLbufferdesc* desc ) Context BufferDesc Specify region of buffer to use (in elements) ollbufferdescsetrange( OLLbufferdesc desc, int begin, int end )

Buffer Descriptor Variable stride supported for vertex format ollbufferdescsetstride Allows for vertex attributes

Buffer Descriptor Formats OLL_BUFFER_FORMAT_INDICES_INT3 OLL_BUFFER_FORMAT_VERTEX_FLOAT3, OLL_BUFFER_FORMAT_RAY_ORIGIN_DIRECTION, OLL_BUFFER_FORMAT_RAY_ORIGIN_TMIN_DIRECTION_TMAX, OLL_BUFFER_FORMAT_HIT_T_TRIID_U_V OLL_BUFFER_FORMAT_HIT_T_TRIID Types OLL_BUFFER_TYPE_HOST OLL_BUFFER_TYPE_CUDA_LINEAR

Model A model is a set of triangles combined with an acceleration data structure ollmodelcreate Context ollmodelsettriangles ollmodelfinalize Asynchronous finalize Model indices vertices BufferDesc BufferDesc ollmodelfinalizewait ollmodelfinalizepoll

Query Queries perform the ray tracing on a model ollquerycreate Context ollquerysetrays ollquerysethits ollqueryexecute Query types OLL_QUERY_TYPE_ANY OLL_QUERY_TYPE_CLOSEST Asynchronous query ollquerywait Model Query indices vertices rays hits BufferDesc BufferDesc BufferDesc BufferDesc ollquerypoll

Speedup vs. SBVH in rtutraversal Build Performance 200 180 160 140 120 100 80 60 40 20 0

Speedup vs. SBVH in rtutraversal Ray Tracing Performance 3.0 2.5 2.0 1.5 1.0 0.5 0.0

Mrays/s Ray Tracing Performance 400.0 350.0 300.0 250.0 200.0 150.0 100.0 50.0 0.0

Future Features we want to implement Animation support (refit/refine) Instancing Large-model optimizations

Art And Animation Studio

Vertex Light Baking Working with Bungie But will be made available. Contact us if interested. Kavan, Bargteil, Sloan, Least Squares Vertex Baking, EGSR 2011 NVIDIA's Optix has been instrumental when baking Ambient Obscurance (AO) over the extremely complex geometry in the worlds of Destiny. The high performance and ability to quickly explore various formulations of AO were invaluable.

Vertex Light Baking Working with Bungie But will be made available. Contact us if interested. Kavan, Bargteil, Sloan, Least Squares Vertex Baking, EGSR 2011 Compared to textures Less memory & bandwidth No u,v parameterization Good for low-frequency effects

Typical Scene Linear interpolation Static mesh Coarse mesh

Piecewise Linear Approximation Sample illumination on surface Each sample is a hemisphere of rays Reconstruct values at vertices 0 0 x x x x 0 x x x x x x 0 x 1 x x x x x 0 0

Weighted Averaging

Least Squares Vertex Baking

Pixar Research & NVIDIA OptiX Interactive Lighting Collaboration

NVIDIA Visual Computing Theater in NVIDIA Booth Tue. 4:00 4:30 Wed. 2:00 2:30 Thur. 10:40 11:10

See OptiX at Siggraph Pixar Research Interactive Lighting NVIDIA Visual Computing Theater Tue. 4:00, Wed. 2:00, Thur. 10:40 Mental ray with OptiX-powered Final Gather NVIDIA booth Bunkspeed Shot / Move / Drive with IRay Bunkspeed booth, NVIDIA booth NVIDIA Visual Computing Theater: Thur. 1:20 Course: Physically Based Shading in Theory and Practice Thur. 9:00 10:00: Crafting a Next-Gen Material Pipeline for The Order: 1886

OptiX Resources Slides & Video GTC OptiX Introduction GTC OptiX Optimization http://www.gputechconf.com/gtcnew/ondemand-gtc.php?topic=39 This talk: http://www.nvidia.com/object/siggraph2013- tech-talks.html Download OptiX Available for free: Windows, Linux, Mac http://developer.nvidia.com OptiX forum https://devtalk.nvidia.com/default/board/90