Lecture 13: Reyes Architecture and Implementation. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Similar documents
A Real-time Micropolygon Rendering Pipeline. Kayvon Fatahalian Stanford University

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

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

REYES REYES REYES. Goals of REYES. REYES Design Principles

The Rasterization Pipeline

Real-Time Reyes Programmable Pipelines and Research Challenges

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Lecture 12: Advanced Rendering

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

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Chapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

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

Parallel Triangle Rendering on a Modern GPU

Scheduling the Graphics Pipeline on a GPU

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

Pipeline Operations. CS 4620 Lecture 14

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Comparing Reyes and OpenGL on a Stream Architecture

! Pixar RenderMan / REYES. ! Software shaders. ! Pixar Photorealistic RenderMan (PRMan) ! Basically a sophisticated scanline renderer

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

The Design of RenderMan

CS4620/5620: Lecture 14 Pipeline

TSBK03 Screen-Space Ambient Occlusion

VU Rendering SS Unit 9: Renderman

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Pipeline Operations. CS 4620 Lecture 10

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

Course Recap + 3D Graphics on Mobile GPUs

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

CS427 Multicore Architecture and Parallel Computing

Graphics and Imaging Architectures

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

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

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

Lecture 15: Image-Based Rendering and the Light Field. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

OpenGL and RenderMan Rendering Architectures

Hidden surface removal. Computer Graphics

Lecture 16 of 41. Transparency, Painter s Algorithm, & Z-Buffer Lab 3a: Shading & Transparency

PowerVR Hardware. Architecture Overview for Developers

Reyes Rendering on the GPU

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

Lecture 6: Texture. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

3D Rasterization II COS 426

Sung-Eui Yoon ( 윤성의 )

A Trip Down The (2011) Rasterization Pipeline

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

Direct Rendering of Trimmed NURBS Surfaces

Chapter 7 - Light, Materials, Appearance

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

Graphics and Interaction Rendering pipeline & object modelling

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

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

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

Rendering Grass with Instancing in DirectX* 10

The Traditional Graphics Pipeline

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

CS451Real-time Rendering Pipeline

Data-Parallel Rasterization of Micropolygons with Defocus and Motion Blur

DiFi: Distance Fields - Fast Computation Using Graphics Hardware

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

CS 130 Exam I. Fall 2015

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Performance OpenGL Programming (for whatever reason)

Data-Parallel Rasterization of Micropolygons with Defocus and Motion Blur

Real-Time Graphics Architecture

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

Advanced RenderMan 2: To RI INFINITY and Beyond

Scanline Rendering 2 1/42

Rasterization Computer Graphics I Lecture 14. Scan Conversion Antialiasing Compositing [Angel, Ch , ]

CS 130 Final. Fall 2015

Deferred Rendering Due: Wednesday November 15 at 10pm

The Light Field and Image-Based Rendering

LOD and Occlusion Christian Miller CS Fall 2011

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

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

CHAPTER 1 Graphics Systems and Models 3

COMP 175: Computer Graphics April 11, 2018

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

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Irradiance Caching in Pixar s RenderMan

Perspective Projection and Texture Mapping

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

Mattan Erez. The University of Texas at Austin

CSCI 420 Computer Graphics Lecture 14. Rasterization. Scan Conversion Antialiasing [Angel Ch. 6] Jernej Barbic University of Southern California

Drawing Fast The Graphics Pipeline

The Traditional Graphics Pipeline

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

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

The Traditional Graphics Pipeline

CS 464 Review. Review of Computer Graphics for Final Exam

MSAA- Based Coarse Shading

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.

Rasterization. Rasterization (scan conversion) Digital Differential Analyzer (DDA) Rasterizing a line. Digital Differential Analyzer (DDA)

Computer Graphics I Lecture 11

Bringing AAA graphics to mobile platforms. Niklas Smedberg Senior Engine Programmer, Epic Games

Transcription:

Lecture 13: Reyes Architecture and Implementation Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011)

A gallery of images rendered using Reyes

Image credit: Lucasfilm (Adventures of Andre and Walle B, 1984)

Image credit: Pixar (Luxo Jr., 1986)

Image credit: Pixar (Toy Story 2, 1999)

Image credit: Pixar (Wall-E, 2008)

Image credit: Pixar (Ratatouille, 2007)

Image credit: Pixar (UP, 2009)

Image credit: Pixar (UP, 2009)

Image credit: Pixar (UP, 2009)

Image credit: Pixar (UP, 2009)

Image credit: Pixar (UP, 2009)

Image credit: Pixar (Toy Story 3, 2010)

The Reyes image rendering architecture Reyes: acronym for Renders Everything You Ever Saw - Also reference to Pt. Reyes, CA (just north of San Francisco) - Disagreement in graphics community about whether it is written Reyes or REYES. (Rob Cook says it s Reyes ) Developed at Lucasfilm (graphics group later became Pixar) Pixar s implementation is called Photorealistic Renderman (prman) - Renderman name was a take off on Sony Discman Rendering system for every Pixar film - And vast majority of film special effects

Reyes goals High image quality: no faceting, no visible aliasing Handle massive scene complexity Support large diversity in models, shading, etc. High performance: achieve all of the above in reasonable rendering time (minutes/hours frame)

Canonical Reyes pipeline Primitives (e.g., parametric patch, sphere) Primitive Bound Primitive Split Primitive Dice Micropolygon Grid Hider Vertex Shade Rasterization Frame-Buffer Ops Shaded Micropolygon Grid (vertices displaced) Visible points Frame Buffer

Definitions Micropolygon = canonical intermediate representation in the Reyes pipeline. Expectation is that projected area <= 1 pixel Grid = micropolygon mesh corresponding to contiguous surface region Reyes pipeline configuration defines - Target micropolygon area (typically 1/4 to 1 pixels) - Maximum number of micropolygons in a grid (typically ~256)

(one pixel) Micropolygons (note: here I m showing triangle micropolygons, but for this lecture I usually refer to micropolygons as quads)

Today Tessellation - Lane-carpenter algorithm Shading Hiding - Stochastic rasterization Transparency - A-buffer algorithm

Tessellation

Tessellating primitives into micropolygon grids Goals - Want micropolygons all about the same size - Want projected micropolygon areas to closely match target - Ideally, grids should be reasonably large (close to max grid size) Reyes tessellation - Lane-carpenter algorithm (often referred to as split-dice )

Uniform patch tessellation is insufficient v Too many polygons: poor performance Polygons too large: poor quality u Uniform partitioning of patch Patch viewed from camera (parametric domain)

Split-dice adaptive tessellation [Lane 80] v Patch parametric domain u Patch viewed from camera

Split-dice adaptive tessellation [Lane 80] v Patch parametric domain u Patch viewed from camera

Split-dice adaptive tessellation [Lane 80] v Patch parametric domain u Patch viewed from camera

Reyes primitive interface class Primitive { BBox3D bbox(); bool candice(); List<Primitive> split(); Grid dice(); }; Split partitions primitive into 1 or more child primitives Split may generate child primitives of a different type Note: bbox is expanded by renderer to account for primitive motion over the frame (motion blur), surface displacement, etc.

Interesting implications of split Encapsulates adaptivity (keep dice simple, regular, and fast) Divide and conquer: - Micropolygons generation order exhibits high spatial locality - Provides temporal stability Splitting implicitly creates a hierarchy of grids - Very useful for frustum/depth culling at largest possible granularity - Use bbox to cull primitives prior to dicing (or prior to unnecessary splitt Splitting enables a clipless rasterization (see Reyes paper)

Shading

Reyes shades micropolygon grid vertices Reyes invokes the shading function once for each grid vertex - Shading function defined using Renderman Shading Language (RSL) *** - Shading function computes surface appearance at vertex - Shading function may also reposition vertex (displacement) *** See shading languages lecture

Micropolygon mesh: before displacement

Micropolygon mesh: after displacement

Why grids? Execution coherence - All vertices on grid shaded with same shader - Permits SIMD implementation Locality - Grid is contiguous region of surface: shading points together increases texture locality Compact representation - For regular (tensor product) grid, topology is implicit - Quad micropolygon grid: each interior vertex shared by four micropolygons Connectivity leveraged to compute derivatives in shaders - Can compute higher order derivatives Preserve hierarchy - Allows per-grid operations, in addition to per micropolygon or per-vertex - Useful for culling, etc.

Hiding

Hiding micropolygons (rasterization + occlusion) Option 1: micropolygon is flat shaded (apply color from one vertex to sample) Note: many visibility samples per pixel to eliminate aliasing

Hiding micropolygons (rasterization + occlusion) Option 2: interpolate per-vertex colors Note: many visibility samples per pixel to eliminate aliasing

Aside: interesting sampling question Reyes samples surface appearance uniformly in parametric space (within in grid) - Uniform in parametric space uniform in object space, but not uniform in screen space due to projection - Textures filtered using object-space surface derivatives Surface is projected, and then appearance is resampled uniformly in screen space at visibility sample points OpenGL/Direct3D pipeline samples surface appearance uniformly in screen space - Textures filtered using screen-space surface derivatives Question: is there a preferred solution? Consider: High frequency surface appearance: due to bumpy geometry, due to high frequency texture Surfaces at grazing angles to camera (near silhouettes) What is lost in resampling step?

Moving micropolygon t Common simplification: linear motion for duration of virtual camera exposure x y

X,T plane (visibility samples distributes in space and time) t 1 pixel x

X,T plane t Motion blur + defocus: 5D point-in-polygon tests (XY, T, lens UV) x

Candidate visibility samples t x

Tighter bounds (4 time intervals) t x

Tighter bounds (4 time intervals) t B 3 B 2 B 1 B 0 x

Slow motion = tight bounds t B 0 x

Fast motion = loose bounds t B 0 x

Stochastic rasterization results White ball moving rapidly across screen (movies shown in class)

Stochastic rasterization results White ball moving rapidly across screen (movies shown in class: see web site)

Stochastic sampling for motion blur (and defocus blur) Need high visibility sampling rates to remove noise in renderings with large motion blur, or camera defocus 64-128 visibility samples per pixel common in film rendering - Large frame-buffer!

Transparent surfaces 100% opaque, red 75% opaque, blue 25% opaque, green composited result = 0.25 * green +.75 * (.75 * blue +.25 * red) OpenGL/Direct3D solution relies on pipeline ordering semantics: Application sorts surfaces, renders surfaces back-to-front *** Set frame-buffer blend mode: frag.alpha * frag.color + (1- frag.alpha) * fb_color *** front-to-back rendering solution exists as well

Transparency when using Z-buffer for occlusion Application sorting is a pain Depth sort order not well defined with triangles (interpenetration), let alone complex Reyes primitives Further complicated by motion blur

A-buffer [Carpenter 84] Store list of visible points at each visibility sample - visible point = {rgb, alpha, z} When frame rendering is complete: For each sample: Sort visible points in list by Z Blend front- to- back (or back- to- front) Provides primitive order-independent solution for rendering transparency Cost: variable storage per visibility sample Many optimizations to prune list as rendering proceeds - e.g., don t need to add visible points behind an opaque point in the list

Reyes A-buffer Many visibility samples per pixel (recall: 64-128) Many visible points per sample (under conditions of significant transparency) 1920x1080 rendering (1080p) 64 visibility samples per pixel 4 visible points per sample (rgb,a,z) ~10 GB A-buffer!!!

Reyes implementations use bucketing Recall sort middle tiled chunked Motivation here is to keep the A-buffer for a bucket in memory (previously we discussed how some implementations of OpenGL use a similar sorting scheme to: gain parallelism, keep a tile of frame-buffer on chip) for each primitive, place in screen bucket for each bucket allocate G- buffer for bucket for each primitive split- dice to create grids // each split, cull primitives falling outside of bucket shade + hide grids for each bucket g- buffer sample composite visible points

Reyes summary Key algorithms - High quality, split-dice tessellation - Shades per-vertex, prior to rasterization - Visibility via stochastic point sampling to simulate motion blur, camera defocus - Correct rendering of transparent surfaces via the A-buffer Key system concepts - Micropolygons: common intermediate representation for all primitive types - Micropolygon grids for locality and SIMD shading - Bucketed rendering to fit tiles of A-buffer in memory (high depth complexity due to transparency and high visibility sampling rates) (not discussed today: lots of smarts in a performant Reyes implementation to keep working set in memory)