HIGHLY PARALLEL COMPUTING IN PHYSICS-BASED RENDERING OpenCL Raytracing Based Thibaut PRADOS OPTIS Real-Time & Virtual Reality Manager
INTRODUCTION WHO WE ARE 3 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHO WE ARE OPTIS is a world leading provider of software solutions for physics based simulation of optics, light and human vision, used throughout the world s leading vehicle, aerospace, lighting and LCD manufacturers. OPTIS SPEOS solutions are unique in being fully integrated into leading CAD platforms and take into account real measured light sources, materials, surfaces, human vision and international standards. 4 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHO WE ARE Founded in 1989 OPTIS now employs over 80 people in 5 countries, with over 1600 customers and 6000 licenses in use worldwide. DETROIT TOULON STUTTGART SHANGHAI TOKYO 5 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHO WE ARE Software Standard development Software customization Hardware Development of optical surface measurement systems (OMS) Services Training Measurement (optical properties of materials, light sources) Consulting projects (> 800 Engineering studies) 6 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION REFERENCES 7 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHAT DOES PHYSICS-BASED MEAN? 8 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHAT DOES PHYSICS BASED MEAN? Classical Rendering Physical Rendering 256 contrast levels High Dynamic Range Images RGB colors Simple sources definition Simple shading models Alpha blending Pinhole camera Non exploitable image Addresses srgb screen Full spectral rendering (IR, visible, UV), CIE Standards Measured intensity diagrams, Spectra (Black bodies, Fluorescent, ), Radiometric power (Watt), LCD, Measured BRDF (spectral, polarized, ) Complex material handling (spectral refraction, dispersion, diffusion, complex material indices ) Radiance sensor models including cameras and physiological model of human eye, glare, depth of field, Physics and measurable accurate radiance simulation All output screens (HDR, High gamut, projectors, ), calibrated (ICC profiles). 9 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHAT DOES PHYSICS BASED MEAN? Used algorithms should ensure physics laws compliance : Radiometric power conservation Full spectrum (from IR to UV) Correct Light sources data (spectrum, intensity) Correct BRDF data 10 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHAT DOES PHYSICS BASED MEAN? BRDF defines the way that a surface reflects the light : Bidirectional Refectance Distribution Function Lambertian Specular Gaussian Measured To ensure BRDF correctness, OPTIS measure most of BRDF using its own measurement device (OMS). 11 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION WHAT DOES PHYSICS BASED MEAN? Rendering equation (Kajiya, Immel, 1986) Reflected luminance Emitted Luminance due to surface BRDF Incoming luminance Integral over all incoming light directions 12 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER PRINCIPLES Raytracing: principles Propagate a ray from the eye through the scene for each pixel 13 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER EXPERIENCE FEEDBACK 14 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER RAYTRACING ON GPU Raytracing is a highly parallel task that suits GPU architecture Only one propagation law (optical law) Ray emission Geometry intersection (ray hit) Single Program Surface interaction (ray reflection/refraction) Eye integration & tone mapping Huge number of pixels (~billion rays) Multiple Data Each ray propagation is independent of the others Linear algebra Homogeneous vector Vector computing Spectral colors 15 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER RAYTRACING ON GPU GPU Raytracing drawbacks : Acceleration structure traversal is hard to vectorize Use of a Kd-tree like structure (1-dimension at each node) Raytracing algorithm is very divergent Rays from second bound could be spread in all the 3D space Kd-tree traversal could differs from one interaction to the other To avoid this, one can merge coherent rays in separated pass 16 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER TECHNOLOGIES USED IN REAL-TIME We are loading most data on GPU at the beginning into Buffers and Textures GPU embedded data : Geometry BRDF Spectra Acceleration structures GPU embedded source code Propagation Surface Interaction Human vision algorithms and post process (ICC profiles) 17 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER CUDA TO OPENCL CONVERSION FEEDBACK Similar languages (~ 2 months for conversion) CUDA advantages Supports template types Good development framework Source code confidentiality OpenCL advantages: Source code portability Hardware management and scalability Improves vector operations 18 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
OPENCL RAYTRACER CUDA TO OPENCL CONVERSION FEEDBACK CUDA drawbacks: Platform dependent Proprietary language No vector types Thread distribution (grid, block, thread) OpenCL drawbacks: Confidentiality issues (needs embedded source code to be compiled before use) No global parameters for all kernels Easier to convert from CUDA to OpenCL than the opposite. 19 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
VISUAL ERGONOMICS CPU SOLUTION 20 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
INTRODUCTION UNIQUE PROCESS Human Vision Lab Human Vision Lab : Spectral luminance and perceived color computation (CIE recommendations). Simulations Spectral radiance ( W/(m².sr.nm)) Optical properties Geometry Full CAD integration -Large assemblies -Libraries and catalogs Spectral sources Natural (night and day) Artificial (LEDs, displays ) Physics Based Materials 21 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
VISUAL ERGONOMICS SOLUTION APPLICATIONS Lit and unlit appearance Human vision perception Quantify critical reflections 22 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
VISUAL ERGONOMICS SOME RESULTS 23 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
VRLAB VIDEO (LIVE DEMO IS AVAILABLE IN THE EXPERIENCE ZONE) 24 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
VISUAL ERGONOMICS INVOLVED TECHNOLOGIES C++ Multi-CPU architecture Multi-cores CPU Multi-threaded applications No critical section Only interlocked instructions 100% CPU use of each core without kernel time Cluster Distributed computing Innovative acceleration structure for intersections computing 25 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
VISUAL ERGONOMICS SOLUTION KEY BENEFITS Result analysis: light levels, contrast, uniformity, color (physics), visibility, legibility. Calibrated displays (dynamics, color gamut) Uniquely based on human vision model Immersive and interactive capabilities Product Lifecycle Management integration in CAD Now : SPEOS RTVE3 Real-time simulation technology integration 26 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
REAL-TIME WHY USE REAL-TIME? The notion of time is important for: Easily detecting hotspots (high frequency specular peaks) Understanding reflection phenomena Addressing non-specialists (non-physicists) Ensuring interaction in immersive environments (CAVE) 27 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
REAL-TIME VIDEO (LIVE DEMO IS AVAILABLE IN THE EXPERIENCE ZONE) 28 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
AMD FUSION EXPECTED BENEFITS 29 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
AMD FUSION EXPECTED BENEFITS More powerful CPU Fusion GPU Fusion Extra GPU(s) Enhanced memory access (Virtual Texturing) Specialized computing Scalable computing Hybrid computing GPU/CPU Extra graphics Shared memory DDR3 PCIe Accelerated Processor Unit CPU GPU Graphic card GPU 30 Highly Parallel Computing in Physics-based Rendering June 13th, 2011
THANK YOU FOR YOUR ATTENTION Any questions? Thibaut PRADOS tprados@optis-world.com www.optis-world.com
Disclaimer & Attribution The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. There is no obligation to update or otherwise correct or revise this information. However, we reserve the right to revise this information and to make changes from time to time to the content hereof without obligation to notify any person of such revisions or changes. NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE CONTENTS HEREOF AND NO RESPONSIBILITY IS ASSUMED FOR ANY INACCURACIES, ERRORS OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. ALL IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. IN NO EVENT WILL ANY LIABILITY TO ANY PERSON BE INCURRED FOR ANY DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. AMD, the AMD arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. All other names used in this presentation are for informational purposes only and may be trademarks of their respective owners. The contents of this presentation were provided by individual(s) and/or company listed on the title page. The information and opinions presented in this presentation may not represent AMD s positions, strategies or opinions. Unless explicitly stated, AMD is not responsible for the content herein and no endorsements are implied. 32 Highly Parallel Computing in Physics-based Rendering June 13th, 2011