Procedural Shaders: A Feature Animation Perspective

Similar documents
Ray Casting of Trimmed NURBS Surfaces on the GPU

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

CS 354R: Computer Game Technology

CS427 Multicore Architecture and Parallel Computing

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

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Texture mapping. Computer Graphics CSE 167 Lecture 9

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Direct Rendering of Trimmed NURBS Surfaces

Programming Graphics Hardware

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Computer Graphics. - Texturing Methods -

Graphics Hardware. Instructor Stephen J. Guy

Real-Time Hair Rendering on the GPU NVIDIA

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

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

frame buffer depth buffer stencil buffer

CHAPTER 1 Graphics Systems and Models 3

CS GPU and GPGPU Programming Lecture 12: GPU Texturing 1. Markus Hadwiger, KAUST

Comparing Reyes and OpenGL on a Stream Architecture

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

The Graphics Pipeline

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

Those Delicious Texels or Dynamic Image-Space Per-Pixel

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools

3D Computer Games Technology and History. Markus Hadwiger VRVis Research Center

CS GAME PROGRAMMING Question bank

Shading Shades. Frank Jargstorff. June 1, Abstract

Hardware Shading: State-of-the-Art and Future Challenges

Models and Architectures

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

CS GPU and GPGPU Programming Lecture 16+17: GPU Texturing 1+2. Markus Hadwiger, KAUST

critical theory Computer Science

REYES REYES REYES. Goals of REYES. REYES Design Principles

Outline of Lecture. Real-Time High Quality Rendering. Geometry or Vertex Pipeline. Basic Hardware Pipeline. Pixel or Fragment Pipeline

Shaders. Slide credit to Prof. Zwicker

Evolution of GPUs Chris Seitz

3D Rasterization II COS 426

AGDC Per-Pixel Shading. Sim Dietrich

Computergrafik. Matthias Zwicker. Herbst 2010

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

The Ultimate Developers Toolkit. Jonathan Zarge Dan Ginsburg

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

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

Graphics Processing Unit Architecture (GPU Arch)

CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

Technical Game Development II. Reference: Rost, OpenGL Shading Language, 2nd Ed., AW, 2006 The Orange Book Also take CS 4731 Computer Graphics

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

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

Computer Graphics. Shadows

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

Real-World Applications of Computer Arithmetic

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Introduction to Computer Graphics with WebGL

Visualizer An implicit surface rendering application

Information Coding / Computer Graphics, ISY, LiTH. Splines

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

03 RENDERING PART TWO

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

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies

3ds Max certification prep

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

Texture Mapping. Computer Graphics, 2015 Lecture 9. Johan Nysjö Centre for Image analysis Uppsala University

Computer Graphics CS 543 Lecture 1 (Part I) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Programmable Graphics Hardware

Practical Parallax Occlusion Mapping For Highly Detailed Surface Rendering

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

Cornell CS4620 Fall 2011!Lecture Kavita Bala (with previous instructors James/Marschner) Cornell CS4620 Fall 2011!Lecture 1.

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

A Trip Down The (2011) Rasterization Pipeline

Zeyang Li Carnegie Mellon University


The Illusion of Motion Making magic with textures in the vertex shader. Mario Palmero Lead Programmer at Tequila Works

Pipeline Operations. CS 4620 Lecture 14

Wednesday, July 24, 13

rendering rasterization based rendering pipelined architecture, parallel mostly triangles (lines and points possible too)

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

Computer Graphics Introduction. Taku Komura

Computer Graphics 10 - Shadows

Gettin Procedural. Jeremy Shopf 3D Application Research Group

Technical Game Development II. Reference: Rost, OpenGL Shading Language, 2nd Ed., AW, 2006 The Orange Book Also take CS 4731 Computer Graphics

Spring 2009 Prof. Hyesoon Kim

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

UberFlow: A GPU-Based Particle Engine

TEXTURE MAPPING. DVA338 Computer Graphics Thomas Larsson, Afshin Ameri

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

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Advanced Shading and Texturing

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

Deus Ex is in the Details

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

Texture Mapping and Sampling

CS 464 Review. Review of Computer Graphics for Final Exam

Transcription:

Procedural Shaders: A Feature Animation Perspective Hector Yee, Rendering Specialist, PDI/DreamWorks David Hart, Senior FX Developer, PDI/DreamWorks Arcot Preetham, Engineer, ATI Research Motivation Movies still look better Up visual bar with programmable graphics hardware Borrow techniques from Feature Animation for use in Real Time 1

Motivation get from here Jak 2 (2003) PS 2 Naughty Dog to here Shrek 4D (2003) Film PDI/ DreamWorks 2

Talk Outline Technological similarities & differences Techniques from feature animation Techniques from real-time rendering Where we are Typical values for Shrek Typical frame Pentium 4 @ 2.8 GHz Typical values for DX 9 part Assuming 30 FPS Based on Radeon 9800 Some values based on theoretical max 3

Typical Shrek frame Similarities Technology Resolution Anti-Aliasing Feature Animation 720 x 486 (NTSC) 1828 x 1102 (Academy 1.66) 8 x 8 Realtime Rendering 640 x 480 1024 x 768 1280 x 1024 4 x 4 Bits per channel 32 (internal float) 4-8 (YUV 4:2:2) 32 (internal float) 8 (RGB 8:8:8) 4

Differences (Geometry) Technology Feature Animation Realtime Rendering Order of Magnitude Time per frame 8000 secs 0.015 secs 6 Polys / frame 100 M 0.1M - 1M 2 Bones & Skinning 350 CPU proc. 32 4 mat/bone 1 Geometric Resolution Feature Animation Mostly procedural geometry NURBS, NUBS or subdivision surfaces Realtime Usually triangles and quads Recently N-patches or RT-patches 5

Differences (Rendering) Technology Feature Animation Realtime Rendering Order of Magnitude Time per frame 7000 secs 0.015 secs 6 Number of Lights 100 5-10 2 Shadow samples 1000 (soft shadows) 1 (depth map) 3 Differences (Shading) Shader network for Shrek s body 6

Differences (Shading) Technology Feature Animation Realtime Rendering Order of Magnitude Shader ops per pixel 1 M 100 4 Shader Parameters ~100 (chained) ~10 2 Texture RAM 1545 MB 64 MB 1.5 Other Differences Texture Filtering Analytic vs Trilinear Mipmap (Dave) Shader Environment P, dpduv, N vs streams (Dave) Shading Language C/C++ vs Cg/HLSL/GLSL (Preetham) Color Calibration 7

Color Calibration Consistent view for Artists, content provider, consumers Feature Animation Artists calibrate, Theatres calibrate Realtime Rendering Artists calibrate (sometimes) Gamers turn up the gamma! Shader Environment By shader I mean plugin Compiled.dso (.dll) written in C Materials, maps, lights, geometry, etc.. Shaders are (ideally) stream filters / DG nodes Look at inputs and outputs only But we (PDI) always cheat Traversing scene, loading files, ray tracing, etc.. Full access to all app. libraries 8

Shader Environment P, N, Ng, UV, dpd[uv], ref[pn], etc... These data come in both singles & tuples Singles = data at the poly center Tuples = data at poly vertices (e.g. vertex normals, vertex UVs, etc...) Polygon Texture 9

Anti-aliasing No-one wants aliasing, but in reality Hardware support Performance features / quality / speed no aliasing allowed (noise is not OK) Fortunately, we (FA) have lots of time Image mapping for RT Input UV is a single Tri-linear MIPMAP interpolation MIPMAP is point-sampled using single (face) UV 10

Image mapping for FA Input UV is tuple Integrate filtered texels in tuple Quality knob chooses MIPMAP level (e.g. GL_TEXTURE_LOD_BIAS_EXT in opengl) Brick Shader Use uv tuple polygon Find fully & partly enclosed bricks Fully enclosed = average color Partly enclosed = clip & evaluate 11

Brick Shader Env mapping Function maps (I,N) to UV Using reflection vector R Builds on Image mapping Tuple UVs computed with tuple N & P UV tuple is passed on to image map 12

Env mapping Tuple UVs might cross seams, so subdivide tuple UV polygon Each tuple polygon is evaluated by image map shader. Env mapping Singles eval Tuples eval 13

Env mapping Procedural noise We use noise heavily Many different types gradient, cell, convolution, turbulence, marble, worley 1d,2d,3d,4d Fractal noise anti-aliasing Evaluate frequency in octaves Only evaluate the frequencies that are below Nyquist limit 14

Shading Models Wide range of complex models Default material has standard terms: Ambient, Diffuse, Specular And some non-standard terms: Shadowing, Directional ambient, Directional diffuse, Retro-reflection, Fresnel reflectivity, transparency Not just surface materials: Maps, Fabric, Fur, Particles, Volumes, Fur Shader Shading model for curves [Kajiya 89] 15

Shrek 4D Shrek 4D 16

Shrek 4D Shrek 4D 17

Shrek 4D Shrek 4D 18

Shrek 4D Shrek 4D 19

Shrek 4D Shading Languages CPU GPU RenderMan C Libraries HLSL, GLSL, Cg. Assembly. 20

Shading Blocks On CPU Light, Surface, Volume shaders. On GPU Vertex & Pixel shaders. Shading on graphics hardware Instruction set Limited Control Flow No Bitwise operators Resources Limited Registers (Temp, Interpolators, Constants) No Global Memory 21

Shading on graphics hardware (cont d) Finite number of instructions PS Shader Model vs Instructions 100000 Instruction Slots 10000 1000 100 10 1 PS 1.1 PS 1.2,1.3 PS 1.4 PS 2.0 PS 2.X PS 3.0 Multipassing Interactive multi-pass programmable shading, Siggraph 2000 - Peercy et al Efficient partitioning of fragment shaders for multi-pass rendering on programmable graphics hardware, Siggraph 2002 Chan et al. Peercy et al, 2000. Chan et al, 2002. 22

CPU vs GPU Shading Shading CPU Quality GPU Speed CPU Quality & GPU speed Use GPU for offline shaders. Procedural Lights. Complex Surfaces. Noise. 23

Lights Fixed Function 8 lights Dir, Point, Spot Programmable Any number of lights Custom light shaders Eg. Windowlight Windowlight Light through a window. Parameters: # horiz panes, vert panes from, to, up frame width & height fuzz. 24

Surface Models Fixed Function Diffuse, Phone, Multi-texture Programmable Custom surface models. Eg. OrenNayar, Anisotropic, Fur. Fur Fur geometry rendered as triangles. Shading uses fur tangent direction 25

Noise Widely used in studios. GLSL & HLSL shading languages have noise functions. Popular implementation Perlin noise Eg: Ocean waves Texture Noise Noise based demos used textures. Advantages: Fast. Disadvantages: Repeat, memory expensive, linear filtering 26

Procedural Noise Advantages: No filtering artifacts. Disadvantages: Computationally expensive. Perlin noise implementation on GPU. float noise3d(): 56 alu, 16 tex. float3 noise3d(): 172 alu, 48 tex. Conclusion Cinematic quality in real time? Still a long way to go. 27

Acknowledgements PDI: Jonathan Gibbs, Jerry Hebert, Harry Max, Paul Rademacher, Dan Yu, Taylor Shaw, Andy Hendrickson, Rachel Falk, lighting, char TDs, FX, R&D ATI: Avi Bleiweiss, Dominik Behr, Seth Sowerby, Pierre Boudier, Axel Mamode, Mike Huber, Raja Koduri. 28