UMBC Graphics for Games

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
CS 4363/6353 BASIC RENDERING. THE GRAPHICS PIPELINE OVERVIEW Vertex Processing Coordinate transformations Compute color for each vertex Clipping and Primitive.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Advanced Effects CMSC 435/634. General Approach Ray Tracing – Shoot more rays Rasterization – Render more images.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
(conventional Cartesian reference system)
Skin Rendering GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from David Gosselin’s Power Point and article, Real-time skin rendering,
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
02/04/03 Page 1 Rendering Visibility Lighting Texturing.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
9/20/2001CS 638, Fall 2001 Today Finishing Up Reflections More Multi-Pass Algorithms Shadows.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
CSE 681 DISTRIBUTED RAY TRACING some implementation notes.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Distributed Ray Tracing. Can you get this with ray tracing?
Compositing and Rendering
Basic Ray Tracing CMSC 435/634.
- Introduction - Graphics Pipeline
Computer Graphics Implementation II
Discrete Techniques.
Week 7 - Monday CS361.
Photorealistic Rendering vs. Interactive 3D Graphics
Chapter X Advanced Texturing
Week 2 - Friday CS361.
Patrick Cozzi University of Pennsylvania CIS Fall 2013
Deferred Lighting.
3D Graphics Rendering PPT By Ricardo Veguilla.
Sampling and Antialiasing
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
GPU Graphics Gary J. Katz University of Pennsylvania CIS 665
(c) 2002 University of Wisconsin
Lighting.
UMBC Graphics for Games
(c) 2002 University of Wisconsin
CS5500 Computer Graphics May 29, 2006
CS-378: Game Technology Lecture #4: Texture and Other Maps
Introduction to Computer Graphics with WebGL
Game Programming Algorithms and Techniques
Frame Buffer Applications
Introduction to Ray Tracing
Real-time Global Illumination with precomputed probe
Presentation transcript:

UMBC Graphics for Games Multipass Rendering UMBC Graphics for Games

Multiple passes Render geometry Render again Different geometry Same geometry over again

Reasons for multiple passes Non-local in space Information from other pixels Information from other views Non-local in time Information that otherwise would not be computed yet Information from previous frames Changes in representation Higher or lower resolution rendering Algorithmically convenient

Forward Rendering

One triangle at a time Transform Rasterize Shade Visibility Blend Where do the vertices land on the screen Rasterize Which pixels are in the triangle Shade What color is it Visibility Z value per pixel, is this pixel closer? Blend Replace color or blend with existing color

Early Z Optimization Keep farthest Z in each 2x2, 4x4, 16x16, etc. block of pixels Update as you go If all 3 vertices are further than that, don’t even rasterize aa Have to draw Don’t have to draw Have to draw Change View Mode from Lit to Buffer Visualizations > Scene Depth to see the depths (can’t directly see the hierarchical depths, since they’re in the GPU) View direction Don’t have to draw

Z pre-pass Worst case, rendering back to front, get no benefit from early Z For best early Z performance, sort opaque stuff front to back O(n log n) Instead, render just depths of opaque stuff first Two O(n) passes Perfect early Z

Shadow Map Is the point I’m shading closer to the light than anything else? Render depths as seen from the light, keep the closest Image with closest depths = shadow map Non-local information from another view View Light See representation of UE4’s shadow maps with console command “vis ShadowDepthAtlas uv1”, ”vis 0” to turn off.

Reflection Map What color would I see for a reflection in this direction If far away, only the direction matters, not the reflection Render views from a representative location Use in final render There’s a reflection capture node in the default level. Change view mode from “Lit” to “Reflections” to see.

Deferred Rendering

Shade once Transform / Render / Visibility Render shading parameters to G-Buffers Sometimes called the base pass Can do as part of Z pre-pass But also useful to do after to limit G-buffer write bandwidth Result = depth and shading parameters at each pixel Depth and pixel X/Y enough to reconstruct 3D position Classic deferred shading: G-buffer for albedo, normal, texture coordinates, … Can also do triangle ID and location in triangle

Shading pass Draw a full-screen quad Shader uses pixel location, Z buffer, in G buffers Can be more efficient to draw a single triangle instead Or just use a compute shader

Partial updates : point & spot lights Render only light extents Check z-buffer, but don’t write it Pixels not covered can’t see the light Also, tiles, depth culling Avoid computing lights in open space When a light is selected in UE4, you see the influence shape. Drop a Point Light or Spot Light into a scene, then select it to see. Panagiotis Christopoulos Charitos, AnKi 3D Engine

Other pixel’s data : Motion blur Per-pixel velocity Record object velocity during base pass Remember frame-to-frame view changes Blur along a path backwards in that direction Look up other pixels data Show > Visualize > Motion Blur to see a grid of motion vectors. Shows camera motion. Can also add a Rotating Motion component to a shape, set the Pivot Translation for X to about 100 or so.

Chained passes: Blur, bloom, lens flare Need data from too many other pixels? Compute hierarchically Pass: full to 1/4 resolution (1/2 in each dimension) Each pixel only looks at a local neighborhood Pass: 1/4 to 1/16 resolution Pass: 1/16 to 1/64 resolution … Use one or more of these to compute final result Or compute hierarchically on the way up: 1/64 → 1/16 → 1/4 → full In console, do “vis BloomDownsample1 uv1” through ”vis BloomDownsample5 uv1” for computation pass For reconstruction using it, “vis BloomBlurX@1 uv1” through “vis BloomBlurX@5 uv1” and “vis BloomBlurY@1 uv1” through “vis BloomBlurY@5 uv1” The uv1 stretches to full screen, use uv2 to see the actual size of the buffer.

Transparency pass Forward rendering pass for transparent objects Use deferred depth: don’t draw behind already rendered opaque stuff Sort back-to-front Blend over whatever is already there Drop at least one object in the scene and put a translucent material on it like “M_SimpleTranslucent” In console: ”vis SceneColor uv1” to see the opaque stuff, “vis SeparateTranslucency uv1” to see just transparent stuff. “vis 0” to turn off Also change view mode from Lit to Buffer Visualization > Separate Translucency RGB or Separate Translucency Alpha

Temporal Antialiasing Aliasing = jaggy artifacts Fix with multiple samples per pixel Expensive! Do some each frame, blend together Show > Antialiasing to turn on and off to see with and without aliasing In console, “vis SceneColor uv1” will show jittering of un-blended samples each frame

Skin Subsurface scattering Approximate with blur Photons bounce around under skin surface Approximate with blur Render once, then blur Non-local information Use engine material M_SkinBall. Switch View Mode from Lit to Buffer Visualizations > Subsurface Color

Screen Space Reflection (SSR) Reflections off of shiny surfaces require global knowledge Approximate with pixel values already rendered Depth + color approximates scene Trace rays through this data Ray spread driven by gloss Blend with TAA Make a material with Specular = 1 and Roughness = about 0.2. Turn Show > Lighting Features > Screen Space Reflection on and off

Screen Space Ambient Occlusion (SSAO) Approximation for bounce light What can the local surface see? Use per-pixel depths of nearby pixels to approximate Blend with TAA Drop a couple of cubes into a scene so you’re looking at an inside corner like you’d see in the corner of a room. Make sure they’re positioned so the corner is lit (not shadowed). Turn Show > Lighting Features > Screen Space Ambient Occlusion on and off