Render all data necessary into textures Process textures to calculate final image

Similar documents
Computer Graphics (CS 563) Lecture 4: Advanced Computer Graphics Image Based Effects: Part 2. Prof Emmanuel Agu

CS354R: Computer Game Technology

Computer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping

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

Screen Space Ambient Occlusion TSBK03: Advanced Game Programming

Screen Space Ambient Occlusion. Daniel Kvarfordt & Benjamin Lillandt

Shadows. COMP 575/770 Spring 2013

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

Bringing Hollywood to Real Time. Abe Wiley 3D Artist 3-D Application Research Group

Evolution of GPUs Chris Seitz

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

CS 354R: Computer Game Technology

Mental Ray for BK5100

LEVEL 1 ANIMATION ACADEMY2010

Ambient Occlusion. Ambient Occlusion (AO) "shadowing of ambient light "darkening of the ambient shading contribution

TSBK03 Screen-Space Ambient Occlusion

Advanced Shading I: Shadow Rasterization Techniques

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

Corona Sky Corona Sun Corona Light Create Camera About

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

The Making of Seemore WebGL. Will Eastcott, CEO, PlayCanvas

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

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

Opaque. Flowmap Generator 3

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

Advanced Deferred Rendering Techniques. NCCA, Thesis Portfolio Peter Smith

3D Authoring Tool BS Content Studio supports Deferred Rendering for improved visual quality

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Perceptual Effects in Real-time Tone Mapping

Real-Time Rendering of a Scene With Many Pedestrians

Computer Graphics Lecture 11

Deferred Rendering Due: Wednesday November 15 at 10pm

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

Advanced Post Processing

VGP352 Week 8. Agenda: Post-processing effects. Filter kernels Separable filters Depth of field HDR. 2-March-2010

Interactive Methods in Scientific Visualization

Programming Graphics Hardware

A bit more Deferred - CryEngine 3. Triangle Game Conference 2009 Martin Mittring Lead Graphics Programmer

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

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

2018 Feature Comparison

Wednesday, July 24, 13

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Real-time High Dynamic Range Image-based Lighting

THEA RENDER ADAPTIVE BSD ENGINE

-=Bui Tuong Phong's Lighting=- University of Utah, but with shaders. Anton Gerdelan Trinity College Dublin

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

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

Advanced Maya Texturing and Lighting

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Computer Graphics. Shadows

Advanced Maya e Texturing. and Lighting. Second Edition WILEY PUBLISHING, INC.

3D Rasterization II COS 426

Rendering Structures Analyzing modern rendering on mobile

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

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

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

GLSL Applications: 2 of 2

03 RENDERING PART TWO

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

Course Recap + 3D Graphics on Mobile GPUs

Nonphotorealism. Christian Miller CS Fall 2011

VAO++: Practical Volumetric Ambient Occlusion for Games

28 SAMPLING. ALIASING AND ANTI-ALIASING

AECOsim Building Designer Quick Start Guide

Non-Linearly Quantized Moment Shadow Maps

Lighting and Shading

Game Graphics Programmers

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

Shadow Techniques. Sim Dietrich NVIDIA Corporation

COMP371 COMPUTER GRAPHICS

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

Pipeline Operations. CS 4620 Lecture 10

What for? Shadows tell us about the relative locations. Vienna University of Technology 2

Turn your movie file into the homework folder on the server called Lights, Camera, Action.

Mali Demos: Behind the Pixels. Stacy Smith

Professional. Technical Guide N-Log Recording

Pipeline Operations. CS 4620 Lecture 14

ART 268 3D Computer Graphics Texture Mapping and Rendering. Texture Mapping

LIGHTING - 1. Note. Lights. Ambient occlusion

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

Drawing a Crowd. David Gosselin Pedro V. Sander Jason L. Mitchell. 3D Application Research Group ATI Research

Vulkan Multipass mobile deferred done right

Beyond Programmable Shading Course ACM SIGGRAPH 2010 Bending the Graphics Pipeline

x ~ Hemispheric Lighting

There have been many debates in the past about whether eight bits of resolution

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

Edge Detection. Whitepaper

Whiz-Bang Graphics and Media Performance for Java Platform, Micro Edition (JavaME)

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

OpenGL fun in the Sponza Atrium

Creating soft shadows

Motivation. Intensity Levels

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Real Time Rendering of Expensive Small Environments Colin Branch Stetson University

Computergrafik. Matthias Zwicker. Herbst 2010

Object Space Lighting. Dan Baker Founder, Oxide Games

CocoVR - Spherical Multiprojection

Transcription:

Screenspace Effects

Introduction General idea: Render all data necessary into textures Process textures to calculate final image Achievable Effects: Glow/Bloom Depth of field Distortions High dynamic range compression (HDR) Edge detection Cartoon rendering Lots more Vienna University of Technology 2

Hardware considerations Older hardware: Multipass and Blending operators Is costly and not very flexible Newer hardware: Shaders render into up to 8 textures Second pass maps textures to a quad in screenspace Fragment shaders process textures Vienna University of Technology 3

Standard Image Filters Image is filtered with 3x3 kernel: Weighted texture lookups in adjacent texels Edge detection through laplacian: 0 1 0 1-4 1 0 1 0 Emboss filter: 2 0 0 0-1 0 0 0-1 Vienna University of Technology 4

Gaussian Filter Many effects based on gaussian filter 5x5 gaussian filter requires 25 texture lookups: 1 4 6 4 1 4 16 26 16 4 6 26 41 26 6 4 16 26 16 4 1 4 6 4 1 Too slow and too expensive * 1/256 But: Gauss is separable! Vienna University of Technology 5

Gaussian Filter Separate 5x5 filter into 2 passes Perform 5x1 filter in u Followed by 1x5 filter in v * 1 4 6 4 1 4 1 = 6 * = 4 1 Lookups can be formulated to use linear filtering 5x1 filter with 3 lookups Vienna University of Technology 6

Bloom Modify rendered texture intensities before gaussian filtering Clamp or glowing object only pass Exponential weight Add filtered image to original image + = < 0.9 Vienna University of Technology 7 Pictures: Philip Rideout

Bloom Bloom usually applied to downsampled render textures 2x or 4x downsampled Effectively increases kernel size But: Sharp highlights are lost Combination of differently downsampled and filtered render textures possible Allows high controllability of bloom Filter in u and v and separate addition leads to star effect Vienna University of Technology 8

Bloom Picture: Oblivion Vienna University of Technology 9

Bloom remarks Disguises aliasing artifacts Works best for shiny materials and sun/sky Only render sun and sky to blur pass Only render specular term to blur pass A little bit overused these days Use sparsely for most effect Can smudge out a scene too much Contrast and sharp features are lost (fairytale look) Vienna University of Technology 10

Bloom remarks Extreme example Picture: Zelda Twilight Princess Vienna University of Technology 11

Motion Blur Keep previous frames as textures Blend weighted frames to final result Calculate camera space speed of each pixel or object in texture Blur along motion vector Harder to implement, but looks very good Faster than blending Vienna University of Technology 12

Motion Blur Example Picture: Crysis (Object Based Motion Blur) Vienna University of Technology 13

Other filters Use precomputed noise maps Modulate Color with noise: TV snow emulation Modulate texture coordinates: glass refractions TV distortions Warping Remap intensity: Heat vision Eye adaptation Vienna University of Technology 14

Demo OGRE Demo Vienna University of Technology 15

HDR Rendering Up to now, parameters are chosen so that the result is [0..1] Real world: Dynamic Range is about 1:100 000 1: dark at night 100 000: direct sunlight Eye adapts to light intensities Current hardware allows to calculate everything in floating point precision and range Use lights/environment maps with intensities of high dynamic range Vienna University of Technology 16

HDR rendering But: we cannot display a HDR image! Solution: Remap HDR intensities to low dynamic range: Tone mapping Imitates human perception Can mimic time delayed eye adaptation Can mimic color desaturation Can imitate photographic effects Over exposure Glares Vienna University of Technology 17

HDR Rendering Tone mapping requires information about the intensities of the HDR image Extract average/maximum luminance through downsampling Hardware MIPmap generation Or through a series of fragment shaders Naturally combines with bloom filter Vienna University of Technology 18

HDR Processing Overview Vienna University of Technology 19

Tone mapping Operators (1) Reinhard s operator Key Average luminance Pixel luminace Original Modified Key a is set by user or some predefined curve a(l a ) dependent on average luminance l a Calculations need to be done in linear color space! (floating point buffers, see perception issues) Vienna University of Technology 20

Tone mapping Operators (2) Reinhard s operator Vienna University of Technology 21

Tone mapping Operators (3) Logarithmic mapping Improvement: Adaptive logarithmic mapping causes heavy changes of the output color when moving through the scene Modifications necessary Vienna University of Technology 22

Tone mapping Operators (4) Adaptive logarithmic mapping: [Drago 03] Vienna University of Technology 23

Comparison Vienna University of Technology 24

HDR Rendering OGRE Beach Demo (this time HDR part) Author: Christian Luksch http://www.ogre3d.org/wiki/index.php/hdrlib Vienna University of Technology 25

Deferred Shading General Idea: Treat lighting as a 2D postprocess Deferred Shading rendered textures: Normals Position Diffuse color Material parameters Execute lighting calculations using the textures as input Picture: NVIDIA Vienna University of Technology 26

Deferred Shading Vienna University of Technology 27 Picture: Leadwerks

Deferred Shading Picture: S.T.A.L.K.E.R. Vienna University of Technology 28

Deferred Shading Pros: Cons: Perfect batching (no object dependence) Many small lights are just as cheap a a few big ones (32 lights and up are no problem) Combines well with screenspace effects High bandwidth required Not applicable on older hardware Alpha blending hard to achieve Hardware multisampling not available Vienna University of Technology 29

Deferred Shading Cons are diminishing on current hardware Hardware features assist deferred shading (sample buffers) High bandwidth and lots of RAM available Many state-of-the-art engines feature deferred shading Allows to approximate GI with high number of lights (including negative lights). Vienna University of Technology 30

Ambient Occlusion (AO) Calculates the occlusion of each surface point to the surrounding. No information of the surrounding is used Vienna University of Technology 31

Screen Space Ambient Occlusion (SSAO) Newest hype in real-time graphics Popularized by Crysis (Crytek) Render textures needed: Depth (as linear z-buffer) or world space position Normals Approach: Fragment analyzes its surrounding Fragment samples z-buffer around screen position to find occluders in surrounding Simplest approach: depth difference of fragment and sample Vienna University of Technology 32

Screen Space Ambient Occlusion (SSAO) Pros: Cons: Independent from scene complexity No preprocessing Dynamic scenes Not correct Only evaluates what is seen Only close range shadowing Sampling artifacts (needs additional smoothing/blur) But noone cares about correctness in realtime graphics Very powerful method! Vienna University of Technology 33

OGRE SSAO Demo Vienna University of Technology 34

Screen Space Ambient Occlusion (SSAO) Many variations are available, differing in correctness/speed/filtering. Can be extended to include approximations of global illumination or image based lighting (Ritschel et al. 2009) Vienna University of Technology 35