Illumination and Geometry Techniques. Karljohan Lundin Palmerius

Similar documents
Computer Graphics. Shadows

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Computergrafik. Matthias Zwicker. Herbst 2010

Rasterization Overview

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Computer Graphics 10 - Shadows

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

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

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

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Computer Graphics Shadow Algorithms

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Shadow Rendering EDA101 Advanced Shading and Rendering

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Volume Shadows Tutorial Nuclear / the Lab

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments

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

Shadows in the graphics pipeline

Models and Architectures

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

Culling. Computer Graphics CSE 167 Lecture 12

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0)

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

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Direct Rendering of Trimmed NURBS Surfaces

LOD and Occlusion Christian Miller CS Fall 2011

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

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

CS GAME PROGRAMMING Question bank

Mesh Repairing and Simplification. Gianpaolo Palma

Advanced Shading I: Shadow Rasterization Techniques

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

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

Practical Shadow Mapping

Applications. Oversampled 3D scan data. ~150k triangles ~80k triangles

Interpolation using scanline algorithm

Computer Graphics. Bing-Yu Chen National Taiwan University

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

The Traditional Graphics Pipeline

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Visibility and Occlusion Culling

Deferred Rendering Due: Wednesday November 15 at 10pm

Mesh Decimation. Mark Pauly

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Terrain rendering (part 1) Due: Monday, March 10, 10pm

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

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Shadow Mapping. Marc Stamminger, University of Erlangen-Nuremberg

High Quality Adaptive Soft Shadow Mapping

Lecture 11: Ray tracing (cont.)

Applications of Explicit Early-Z Culling

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

CPSC GLOBAL ILLUMINATION

Adaptive Point Cloud Rendering

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

Shading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Shadows. Shadows. Thanks to: Frédo Durand and Seth Teller MIT. Realism Depth cue

Progressive Mesh. Reddy Sambavaram Insomniac Games

Introduction to Computer Graphics with WebGL

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

The Traditional Graphics Pipeline

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Shadow Techniques. Sim Dietrich NVIDIA Corporation

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

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

Real Time Rendering of Expensive Small Environments Colin Branch Stetson University

Stencil Shadow Volumes

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Speeding up your game

Hardware-driven visibility culling

The Traditional Graphics Pipeline

03 RENDERING PART TWO

Shadows. Real-Time Hard Shadows. Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec

Visibility: Z Buffering

CHAPTER 3. Visualization of Vector Data. 3.1 Motivation

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Physically-Based Laser Simulation

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

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

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

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects

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

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Chapter 7 - Light, Materials, Appearance

Transcription:

Illumination and Geometry Techniques Karljohan Lundin Palmerius

Objectives Complex geometries Translucency Huge areas Really nice graphics! Shadows Graceful degradation Acceleration Optimization Straightforward rendering Real time graphics! Simplicity Automatic degradation Parallelism

Shadowing Algorithms Global illumination (radiosity) Raytracing really, really slow very slow Hardware accelerated Shadow Volume, Shadow Mapping Shadow Texture, Etc...

Global Illumination Scene Lighting Connectivity Radiosity O N2 O N 2 log N Light Maps O N Rendering

Global Illumination Hierarchical radiosity group patches far away group patches in early iterations (Quasi) Monte Carlo radiosity Trans illumination planes intermediate transspatial radiosity map can be hardware accelerated

Global Illumination Pre calculate states Turn on/off individual lights Ignore dynamic objects Use global illumination in RT rendering Apply pre calculated light as textures Turn off OpenGL lighting

Raytracing for each buffer row for each row pixel for each object check for intersection.=o W H N

Raytracing Speed up image space (trivial) parallelization collision search speed up frame to frame coherency Close to interactive with current hardware

Projected Planar Shadows Only planar surfaces =d x n Project object and colour it black d n xl '= p x L p xl p n xl

Shadow Volumes For each light source polygon shadow volume Multi pass render 1) render all in shadow 2) render shadow polygons to mask buffer 3) render lighting masked.=o N!

Shadow Volumes generate shadow polygons render scene with ambient and emission lighting for each front face shadow polygon if Z buffer test passes then increment stencil buffer value for each shadow polygon back face if Z buffer test passes then decrement stencil buffer value render lit scene with stencil buffer mask

Shadow Volumes Shadow volume estimation computationally expensive dependent on scene complexity

Shadow Mapping Completely image space algorithm!.=o N 1) Render scene from light source > depth map 2) Render scene from viewpoint (use map) check each fragment against depth buffer from light

Shadow Mapping for each light render scene to light's depth buffer for each fragment transform fragment into each light's buffer space if fragment depth < light buffer depth then render fragment lit by light else render fragment shadowed

Shadow Mapping Precision limit artifacts depth buffer precision is limited => self shadowing solution substract bias from Z value glpolygonoffset

Shadow Mapping Resolution mismatch artefacts depth fragment size in image space r s cos d=d s r i cos solutions rs shadow bluring percentage closer filtering perspective shadow maps ri

Shadow Mapping

Shadow Texture Hack! texture shadow onto object gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE);

Cheating Object impact speed, contrast, projected size use bounding volume projected size analyze pre rendered image of object Simplifications polygonal resolution texturing shaders

Object Resolution Level of detail (LoD) use as low resolution as possible select resolution at render time

Textures Replace geometrical details with texture clothes, faces and ground

Textures Image based rendering Use photographs of things Lighting Material and colours Textures (microstructure)

Fragment Shaders Hardware accelerated details each fragment individually estimated real time updated texturing bumpiness, details, etc. relief texturing

Sprites and Impostors Sprite often billboard polygon facing the camera image/photograph/video instead of object commonly plants, grass, people Impostors replace geometry with image pre rendered / dynamically generated

Level of Details Adaptive cheating select model resolution at run time usually distance specific Issues generating detail levels error estimation / level selection pop / pop up artifacts resolution mis match

Pop Artifacts Too large of a change object morphing change in shape creeping texture popping attracts eye Remidy gradual change is invisible change at sub visible size (resolution)

Resolution Mis match Part of different resolution don't match Texture resolution change Polygon patches

MIP map Texture resolution issues Aliasing at distance moiré patterns Unnecessarily high resolution Too low resolution Solution Multum In Parvo (MIP map) Multiple texture resolutions Hardware support in OpenGL

MIP map

MIP map

Clip map Clipped MIP map (SGI) Full texture at low resolution Only partial texture at high resolution

LoD Polygonal Objects Multiple resolution versions Generate multiple resolutions Select right resolution Switch Decimation Decimation Decimation

Decimation

Decimation Vertex clustering Cluster vertices using regular grid Replace cluster with single vertex Update faces accordingly Poor result low quality no triangle count specification no error measure

Decimation Remove vertices to simplify model Vertex removal, edge contraction 7 5 ~28% Remove vertex/edge until exceeding error threshold reaching triangle count 10 8 ~20 %

Quadric Error Metric Quadric Decimation Edge / non edge contraction Associate vertex with error quadric Q T v = v Q v Q1,2=Q1 Q2 1 1,2 '=Q v 0,0,0, 1 T T ' cost =v ' Q1 Q2 v Use heap with vertices and costs

Quadric Error Metric Initial Quadric Error approximate plane distance square error = v 2 p v v T p p T v p T v T p v T p planes v = p planes v = p planes v T =v p planes v T pp v Q= p planes v T pp

Adaptive Decimation What if different parts are at different distance? Parts of same object requires different resolution MIP mapping for textures Adaptive decimation for polygonal data e.g. ground meshes

Adaptive Decimation Alternatives Patches Adaptive decimation ROAM SOAR etc, etc. Criteria distance, frustum culling, decimation error, line of sight

ROAM Real time Optimally Adapting Meshes Triangle bin tree Time dependent priority Priority queues Incremental changes Split Merge

ROAM Forced split

ROAM

ROAM Error Metrics Nested wedges hierarchical error bound Screen distortions project wedge on screen Check line of sight intersection with wedge modify triangle priority View frustum, backface detail reduction, specular highlights, silhouette edges, atmospheric effects, object positioning

SOAR Stateless, One pass Adaptive Refinement Longest edge intersection, 4 k mesh,... Multiresolution mesh forms DAG of vertices children belong to higher resolution level nested error terms ensure active parent of active vertex

SOAR Pros Simple to implement No forced split High memory coherency Cons Does not use frame to frame coherency

Adjusting Degradation at Run time Pre determine degradation time buffer priority queue depending on distance, size, velocity buy quality for each object Dynamic degradation adjust quality if frame rate is high or low hysteresis

The end