Rendering in games. Rendering. Video Game Dev 2017/2018 Univ. Insubria. rendering. Video Game Dev - Univ Insubria 2017/ /12/2017.
|
|
- Victoria Russell
- 5 years ago
- Views:
Transcription
1 Video Game Dev Univ. Insubria Rendering in games Rendering 3D scene rendering Image screen buffer ( array 2D di pixel ) Marco Tarini 1
2 Rendering in games Real time (20 o) 30 o 60 FPS Hardware based Pipelined, stream processing therefore: class of algorithms: rasterization based Complexity: Linear with # of primitives Linear with # of pixels This lecture: a bird-eye view on Graphic Hardware & HW based rendering a brief summary Lighting Local Lighting Lighting equations notes Lighting environments Materials Strategies to approximate Global Lighting Ad-hoc rendering techniques used in games Multi-pass techniques in general Screen space techniques in general A summary of a few common game rendering techniques Marco Tarini 2
3 Reminder Scheda video GPU RAM (sch. video) CPU ALU (central) RAM bus interno (scheda video) Disk BUS 5 A triangle x v0 =( x0, y0, z0 ) y v1 =( x1, y1, z1 ) v2 =( x2, y2, z2 ) z Marco Tarini 3
4 GPU pipeline GPU pipeline simplified Marco Tarini 4
5 GPU pipeline simplified more GPU pipeline simplified even more y v0 v1 transform v0 v1 rasterizer fragment process pixels finali z v2 3D vertex (e.g. of a mesh) x v2 2D screen triangle fragments ( wanna be pixel ) 10 Marco Tarini 5
6 Rasterization based rendering: base schema Per vertex: (vertex shader) skinning (from rest pose to current pose) transform (from object space to screen space) Per triangle: (rasterizer) rasterization interpolation of per-vertex data Per fragment: (fragment shader) lighting (from normal + lights + material to RGB) texturing alpha kill Per pixel: (after the fragment shader) depth test alpha blend Rasterization-Based Rendering y v0 v1 per vertex v0 v1 per triangle per fragment final pixels z v2 3D vertices x v2 2D triangle on screen "fragments" PROGRAMMABLE! 12 Marco Tarini 6
7 Rasterization-Based Rendering y v0 v1 per vertex v0 v1 per triangle per fragment final pixels z v2 3D vertices x v2 2D triangle on screen "fragments" The user-defined "Vertex Shader" (or vertex program) 13 The user-defined "Fragment Shader" (or pixel program) Shading languages High level: HLSL (High Level Shader Language, Direct3D, Microsoft) GLSL (OpenGL Shading Language) CG (C for Graphics, Nvidia) Low lever: ARB Shader Program (the assembler of GPU now deprecated) Marco Tarini 7
8 Local lighting Local lighting LIGHT reflection (BRDF) EYE OBJECT Marco Tarini 8
9 Local lighting Material parameters (data modelling the «material») Illuminant (data modelling the Lighting Environment) Geometric data (e.g. normal, tangent dirs, pos viewer) LOCAL LIGHTING ( the lighting equation ) final R, G, B Lighting equations Different equations can be employed Lambertian basic Blinn-Phong Beckmann Heidrich Seidel Cook Torrance Ward (anisotropic) + additional Fresnel effect Varying levels of complexity realism (some are physically based, some are just tricks) material parameters allowed richness of effects to learn more, see Computer Graphics course! Marco Tarini 9
10 Lighting equations: basics Diffuse factor (aka Lambertian) physically based only dull materials only material parameter: base color (aka albedo, aka diffuse color) Specular factor (aka Blinn-Phong) just a trick add simulated reflections (highlights) additional material parameters: specular intensity (or, color) specular exponent (aka glossiness) Lighting equations: basics Ambient factor: assumption: a bit of light reaches the object from every dir and is bounced by it in every dir Pro: simple to compute: just an additive constant the ambient light factor, a global Con: terribly crude approx Marco Tarini 10
11 Lighting equations: basics Used together: ambient + diffuse + specular = (or Labertian) (or Phong) final Local lighting Material parameters (data modelling the «material») Illuminant (data modelling the lighting Lighting Environment) environment) Geometric data (e.g. normal, tangent dirs, pos viewer) LOCAL LIGHTING ( the lighting equation ) final R, G, B Marco Tarini 11
12 Illumination environments: types Discrete a finite set of individual light sources (plus a global ambient factor) Densely sampled environment maps: textures sampling incoming light Basis functions a spherical function stored as spherical harmonics coefficients Also used jointly! Illumination environments: discrete a finite set of individual light sources few of them (usually 1-16) each one sitting in a node of the scene-graph each of a type: point light sources have: position spot-lights have: position, orientation, wideness (angle) directional light sources have: orientation only extra per light attributes: color / intensity fall-off function (with distance) max range, and more Marco Tarini 12
13 Illumination environments: discrete a finite set of light sources...plus, one global ambient light factor models other minor light sources + bounces light incoming from every direction at every position multiplier of the ambient term of the lighting equation examples: in a overcast outdoor scene: high (dim shadows, flat looking lighting: every photographs favorite for portraits!) in realistic outer space: zero in any other scenes : something in between (e.g. sunny day, or torch lit cave) Illumination environments: discrete Pros: simple to position / reorient individual light sources both at design phase, or dynamically (at game exec) as they just sit in nodes of the scene-graph! quite faithfully model of certain illuminants, e.g. explosions (positional lights) car lights (spot-lights lights) sun direction (directional light) relatively easy to compute (hard, soft) shadows for them (see shadow-map, later) Cons: each discrete light requires extra processing for each pixel! this is why there s a hard limit on their number! this is why they are often given a (physically unjustified) radius of effect the don t model well: area light sources (e.g. from back-lit clouds) subtler illumination effects environment to be seen mirrored in (e.g. metal) objects Often good for the main illuminants of the scene! Marco Tarini 13
14 Illumination environments: densely sampled A light intensity / color from each direction Asset to store that: Environment map texture Illumination environments: densely sampled Also sky-map texture when it s only / predominantly the sky to be featured doubles as textures for sky boxes Marco Tarini 14
15 Illumination environments: densely sampled Environment map: (asset) a texture with a texel t for each direction d texel t stores the light coming from direction d Q: how to find u,v position of t for a given d? i.e. how to parametrize (flatten) the unit sphere Different answers are possible unit vector latitude/longitude format mirror sphere format cube-map format (ad hoc HW support!) Illumination environments: densely sampled Latitude/longitude format 90 φ θ -90 Marco Tarini 15
16 Illumination environments: densely sampled Environment map: (asset) a texture with a texel t for each direction d texel t stores the light coming from direction d Pro: realistic, complex, detailed, hi-freq, light environments best result for mirroring (e.g. shiny metal, glass, water) materials can be captured from reality Con: expensive (storage cost, lighting computation cost) not ideal for a few predominant light sources hard for artist to control hard for the engine to dynamically change easy, for static environments only Illumination environments: with basis functions Lighting environment: a continuous function Where f(v) = amount of light coming from direction v Store f through basis functions set of all unit vectors (i.e. surface of the unit sphere) or R 3 if rgb colors fixed spherical basis functions (always the same ones) f v = a, f, v + a, f, v + a, f, v + a, f, v + a few scalar values to be stored, in order to model f Marco Tarini 16
17 Illumination environments: with basis functions a f, v b Illumination environments: with basis functions Spherical Harmonics (SH) in brief: Pros: Cons: store Illumination Env as a small number (1,4,9,16 ) of scalar weights of as many fixed spherical basis functions. very compact models well continuous function: smooth environm. allows for efficient computation of in Lighting eq continuous functions ONLY no hi-freq details, no hard lights not much variations (unless very many coefficient used) Often good for the background lighting! Marco Tarini 17
18 Local lighting Material parameters (data modelling the «material») Illuminant (data modelling the Lighting Environment) Geometric data (e.g. normal, tangent dirs, pos viewer) LOCAL LIGHTING ( the lighting equation ) final R, G, B Terminology: «material» has two meanings Material Parameters parameters modelling the local optical behavior of physical object part of the arguments of the (local) lighting equation Material Asset a common abstraction used by game engines consisting of a set of textures (e.g. diffuse + specular + normal map) a set of shaders (e.g. vertex + fragment) a set of global parameters (e.g. global glossiness) rendering settings (e.g. back-face culling ON/OFF) corresponds to the status of the rendering engines Marco Tarini 18
19 Material Asset: remember how a mesh is rendered (hi-level) Load make sure all data is stored in GPU RAM Geometry + Attributes Connectivity Textures Shaders Material Glob. Param. Rendering Settings and Fire! send the command: do it! THE MESH ASSET THE MATERIAL ASSET Material parameters Marco Tarini 19
20 Material parameters: Which ones? Q: which set of parameters is a «material»? A: depends on the chosen lighting equation meterial = the arguments of the lighting equation accounting for the physical substance that the surface is made of remember: regardless of the answer, each parameter can be stored: per Material Assets, as a global parameter, or per Vertex of a Mesh, as attributes, or per Texel of a texture sheet (for maximal freedom) Choice of material parameters: Chapter 1 ( 90s) 4 terms (aka OpenGL material, OBJ material) The Lighting Equation is 4 simple terms: Ambient + Diffuse + Specular (+ Emission) The material is multipliers for each term, therefore: Ambient factor (RGB) Diffuse factor (aka Base Color, aka Albedo ) Specular factor (RGB) (plus one Specular Exponent, aka glossiness ) (a scalar param used in the formula for the specular term) Emission factor (RGB) (only for stuff emitting light otherwise 0,0,0 ) see earlier usually, separate multiplier for R, G and B Marco Tarini 20
21 Choice of material parameters: Chapter 1 ( 90s) not too expressive Still used (sometimes). MTL files (OBJ file format) is basically this. Choice of material parameters: Chapter 2 ( 00s) The Lighting Equation becomes more complex in several different ways It feeds on more and more parameters Such as: Fresnel factor, Anisotropy factors, Reflectivity for environment maps, Authoring materials (task of the material artist): increasingly complex, and ad-hoc task Difficult to port one material... from one engine to another, from one game to another, from one asset to another Difficult to guess right parameters for a given object especially if it has to look good under widely different lighting conditions! Marco Tarini 21
22 Material qualities: improving indie 2006 indie 2010 Material qualities: improving Triple A 2015 (PBM!) Marco Tarini 22
23 Choice of material parameters: Chapter 3 ( 10s) Physically Based Materials (PBM) an ongoing trend! General characteristics and objectives: increased intuitiveness: provide Material Artist w. an higher-level material description eases the Material Authoring task! increased standardization: makes materials more cross-engine / portable! (almost) increased generality: accommodates for most established, modern lighting eq. terms, and lighting environment description (e.g. env maps) increased realism / quality: more faithful, physically justified model of real-world materials result: can even be captured from real-world samples! result: good-looking results under widely different lighting env! «Physically Based Materials» (PBM) Current popular choice of parameters: Base color (rgb or diffuse, same as old school) Specularity (scalar) Metallicity (scalar) Roughness (scalar) METAL=1 METAL= images: unreal engine 4 Marco Tarini 23
24 «Physically Based Lighting» (PBL) A lighting model accepting, as input, a PBM note: this can be achieved with different equations Also, a lighting model taking fewer shortcuts than otherwise typical e.g. using: diffuse color: one texture baked AO: another texture instead of: base color baked AO : one texture Ambient Occlusion Texture: see later Objectives: same as PBM (exp. under realism ) Warning: PBM & PBL are, basically, buzzwords Much wider expressiveness Marco Tarini 24
25 Local lighting in brief Material properties (data modelling the «material») Illuminant (data modelling the Lighting Environment) Geometric data (e.g. normal, tangent dirs, pos viewer) LOCAL LIGHTING ( the lighting equation ) final R, G, B Reminder: normals Per vertex attribute of meshes, or stored in normal maps Marco Tarini 25
26 Reminder: (per vertex) Tangent directions normal mapping (tangent space): requires tangent dirs «anisotropic» BRDF: requires tantent dir Local lighting in brief Material properties (data modelling the «material») Illuminant (data modelling the Lighting Environment) Geometric data (e.g. normal, tangent dirs, pos viewer) LOCAL LIGHTING ( the lighting equation ) final R, G, B Marco Tarini 26
27 Lighting equation: how Computed in the fragment shader most game engine support a subset as default ones any custom one can be programmed in shaders! Material + geometry parameters stored : in textures (for highest-frequency variations inside 1 obj) in vertex attributes (smooth variations inside 1 obj) as material asset parameters (no variation for 1 obj) for example, where are diffuse color specular color normals tangent dirs typically stored? How to feed parameters to the lighting equation Hard wired choice of the game engine but sometimes, a complex set of choices in the hand of the dev Specialized WYSIWYG game-tools not uncommon E.g. in Unreal Engine 4: Marco Tarini 27
28 Beyond local lighting Local lighting = only 3 things count: light emitter(s) the infinitesimal part of surface hit by light, i.e.: its local material (i.e. how does it bounces light) (aka: the BRDF) its local shape observer position Anything else is part of Global lighting The rest of the scene also affects the results Global effects are considerably HARDER global variables / env textures sampled from textures interpolated from vertices global variables global variables Global lighting: two classes of approaches Strategy 1: use local lighting, but feed it a position dependent light environment precomputed ones, i.e. baked in preprocessing (once or, every so often) Strategy 2: a few ad-hoc rendering techniques basically, rendering algorithms that map well to existing HW pipeline often, multi-pass techniques see later for a summarized list (to be used jointly) Marco Tarini 28
29 Global lighting: two classes of approaches Strategy 1: use local lighting, but feed it a position dependent light environment Let s see three examples: Precomputed Object-Space Ambient Occlusion Virtual lights Light probes Position dependent light environment 1/3 Partial occlusion of the ambient light term by some scalar factor in [0,1]: known as the Ambien Occlusion value (AO) For a point on the mesh, the AO value depends on the parts of the mesh around that point Can be precomputed! (for a given static object) AO is, approximatively, independent on position/orientation of object in the scene because it is precomputed for the object in its own space, this is termed Object Space AO Often, stored in a texture: the AO-map (or AO-texture) as part of the preprocessing note: this requires a 1:1 UV mapping all standard modelling tool can bake it! Marco Tarini 29
30 Position dependent light environment 2/3 Virtual lights additional discrete light sources (e.g. point lights) that model reflected (bounced) lights (and not actual light emitters!) Pro: it s easy to create / reposition them dynamically (i.e. at rendering time) Pro: the lighting equation itself is not affected Con: remember the total number of lights is limited Con: not very general it s only adequate in a small set of cases Not very much used in games (more, in CGI movies) Position dependent light environment 3/3 Light probes A light probe is: a (precomputed) lighting environment to be used around a given (xyz) position of the scene it s a continuous lighting environment i.e. one incoming light from every possible incoming direction Idea: preprocessing: disseminate the scene with light probes at rendering time, for a object currenly in (xyz), use an interpolation of near-by light probes Widespread: standard in AAA games Marco Tarini 30
31 Position dependent light environment 3/3 Light probes mathematically, a light probe is: a (continuous) function from Omega (set of unit directions) to R (scalars), or RGB (colors) problem: how to represent (store) them? most common answer: Spherical Harmonics (SH)! compact in RAM, possible/quick to interpolate between N light probes efficient in lighting computations or: small (lower res) env maps strong individual lights done with discrete light sources Ad-hoc rendering techniques popular in games: a summary Shadowing shadow mapping Screen Space Ambient Occlusion Camera lens effects Flares limited Depth Of Field Motion blur High Dynamic Range Non Photorealistic Rendering contours lighting quantization Texture-for-geometry Bumpmapping Parallax mapping with PCF SSAO DoF HDR NPR Marco Tarini 31
32 Multipass rendering techniques in general Many of the techniques above are multiple passes Direct rendering (single-pass) each frame : The rendering pipeline fills a 2D buffer of pixels The 2D buffer is sent to the screen Multi-pass techniques: 1 st pass (or, a few) : an internal 2D buffer(s) is filled, but kept in GPU ram, and never shown to the user final pass: the internal buffer is used as one texture; the resulting buffer is sent to the screen) Screen-space techniques one type of multi-pass techniques in the final pass, only one big textured quad is rendered, which covers the entire screen Multipass rendering techniques in general Internal buffers 2D array of pixels / texels the output of one rendering pass (see pipeline, above) the texture of a subsequent pass (note: read only in that pass!) each pixel / texel is rgb values (color buffer / map) they can be: depth values (depth buffer / map) (or other things ) Marco Tarini 32
33 Shadow mapping Shadow mapping Marco Tarini 33
34 Shadow mapping in a nutshell Two passes. 1st rendering: camera in light position produces: depth buffer called: the shadowmap 2nd renedring: camera in final position for each fragment access the shadowmap once to determine if fragment is reached by light or not Shadow mapping in a nutshell LUCE OCCHIO SHADOW MAP final SCREEN BUFFER Marco Tarini 34
35 Shadow Mapping: issues Rendering shadomap: redo every time object move can bake once and for all for static objects (jet another reason to tag them) Shadowmap resolution: it matters! aliasing effects remedies: PCF, multi-res shadow-map optional topics (no exam) Screen Space AO Marco Tarini 35
36 Screen Space AO OFF Screen Space AO ON Marco Tarini 36
37 Screen Space AO in a nutshell First pass: standard rendering produces: rgb image produces: depth image Second pass: screen space technique for each pixel, look at depth VS its neighbors: neighbors in front? difficult to reach pixel: darken ambient neighbors behind? pixel exposed to ambient light: keep it lit (limited) Depth of Field depth out of focus range: blurred depth in focus range: sharp Marco Tarini 37
38 (limited) Depth of Field in a nutshell First pass: standard rendering rgb image depth image Second pass: screen space technique: pixel inside of focus range? keep pixel outside of focus range? blur (blur = average with neighbors pixels kernel size ~= amount of blur) HDR - High Dynamic Range (limited Dynamic Range) Marco Tarini 38
39 HDR - High Dynamic Range in a nutshell First pass: normal rendering, BUT use lighting / materials with HDR pixel values not in [0..1] e.g. sun emits light with = RGB [500,500,500]: >1 = overexposed! whiter than white Second pass: screen space technique: blur image, then clamp in [0,1] i.e.: overexposed pixels lighten neighbors i.e.: they will be max white (1,1,1), and their light bleeds into neighbors Parallax Mapping Normal map only Marco Tarini 39
40 Parallax Mapping Normal map + Parallax map Parallax mapping: in a nutshell Texture-for-geometry technique Texture used: displacement maps color / rgb map Marco Tarini 40
41 Motion Blur Non-PhotoRealistic Rendering (NPR) Any rendering technique not aimed at realism Instead, the objective can be: imitating a given style (imitative rendering), such as: cartoons ( toon shading ) most popular! pen-and-ink drawings pencil sketches pixel art popular in nostalgic retro games (niche) manga, or, western comics not uncommon pastels, oil paintings, crayons clarity/readability (illustrative rendering) usually not for games Marco Tarini 41
42 Toon shading / Cel Shading Toon shading / Cel Shading Marco Tarini 42
43 Toon shading / Cell Shading in a nutshell Simulating toons Two effects: add contour lines lines appearing at discontinuities of: 1. depth, 2. normals, 3. materials quantize lighting: e.g. 2 or 3 tones: light, medium, dark instead of continuous simple variation of lighting equation NPR rendering: e.g.: simulated pixel art img by Howard Day (2015) Marco Tarini 43
44 NPR rendering: simulated pixel art img by Dukope NPR rendering: simulated pixel art img by Dukope Marco Tarini 44
rendering rasterization based rendering pipelined architecture, parallel mostly triangles (lines and points possible too)
Rendering Scena 3D rendering Immagine screen buffer ( array 2D di pixel ) Rendering in games Real-time (20 or) 30 or 60 FPS Algorithm: rasterization based rendering Hardware based pipelined architecture,
More informationCMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker
CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection
More informationToday. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models
Computergrafik Thomas Buchberger, Matthias Zwicker Universität Bern Herbst 2008 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation
More informationDeferred Rendering Due: Wednesday November 15 at 10pm
CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture
More informationOpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.
OpenGl Pipeline Individual Vertices Transformed Vertices Commands Processor Per-vertex ops Primitive assembly triangles, lines, points, images Primitives Fragments Rasterization Texturing Per-fragment
More informationToday. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models
Computergrafik Matthias Zwicker Universität Bern Herbst 2009 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation of physics Global
More informationIntroduction to Visualization and Computer Graphics
Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective
More informationw Foley, Section16.1 Reading
Shading w Foley, Section16.1 Reading Introduction So far, we ve talked exclusively about geometry. w What is the shape of an object? w How do I place it in a virtual 3D space? w How do I know which pixels
More informationIllumination & Shading: Part 1
Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the
More informationPipeline Operations. CS 4620 Lecture 14
Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives
More informationECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014
ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating
More informationPipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11
Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION
More informationThe Rasterization Pipeline
Lecture 5: The Rasterization Pipeline Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 What We ve Covered So Far z x y z x y (0, 0) (w, h) Position objects and the camera in the world
More informationGUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON
Deferred Rendering in Killzone 2 Michal Valient Senior Programmer, Guerrilla Talk Outline Forward & Deferred Rendering Overview G-Buffer Layout Shader Creation Deferred Rendering in Detail Rendering Passes
More informationCMSC427 Shading Intro. Credit: slides from Dr. Zwicker
CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces
More informationLEVEL 1 ANIMATION ACADEMY2010
1 Textures add more realism to an environment and characters. There are many 2D painting programs that can be used to create textures, such as Adobe Photoshop and Corel Painter. Many artists use photographs
More informationPipeline Operations. CS 4620 Lecture 10
Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination
More informationComputergrafik. Matthias Zwicker Universität Bern Herbst 2016
Computergrafik Matthias Zwicker Universität Bern Herbst 2016 Today More shading Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection and refraction Toon shading
More informationRender all data necessary into textures Process textures to calculate final image
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
More informationCS 354R: Computer Game Technology
CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring
More informationVisualisatie BMT. Rendering. Arjan Kok
Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract
More informationCSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016
CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material
More informationAmbien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary
Summary Ambien Occlusion Kadi Bouatouch IRISA Email: kadi@irisa.fr 1. Lighting 2. Definition 3. Computing the ambient occlusion 4. Ambient occlusion fields 5. Dynamic ambient occlusion 1 2 Lighting: Ambient
More informationChapter 7 - Light, Materials, Appearance
Chapter 7 - Light, Materials, Appearance Types of light in nature and in CG Shadows Using lights in CG Illumination models Textures and maps Procedural surface descriptions Literature: E. Angel/D. Shreiner,
More informationCPSC 314 LIGHTING AND SHADING
CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1 THE RENDERING PIPELINE Vertices and attributes Vertex Shader Modelview transform Per-vertex attributes Vertex
More informationPhysically Based Shading in Unity. Aras Pranckevičius Rendering Dude
Physically Based Shading in Unity Aras Pranckevičius Rendering Dude Outline New built-in shaders in Unity 5 What, how and why And all related things Shaders in Unity 4.x A lot of good things are available
More informationRecollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows
Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface
More informationCS5620 Intro to Computer Graphics
So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading
More informationShading. Brian Curless CSE 557 Autumn 2017
Shading Brian Curless CSE 557 Autumn 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics
More informationCSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014
CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014 Announcements Project 2 due Friday, Oct. 24 th Midterm Exam
More informationCSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011
CSE 167: Introduction to Computer Graphics Lecture #7: Color and Shading Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #3 due this Friday,
More informationTopic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component
Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport
More informationReading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.
Reading Required: Angel 6.1-6.3, 6.5, 6.7-6.8 Optional: Shading Angel 6.4 OpenGL red book, chapter 5. 1 2 Introduction An abundance of photons So far, we ve talked exclusively about geometry. Properly
More informationLighting and Shading
Lighting and Shading Today: Local Illumination Solving the rendering equation is too expensive First do local illumination Then hack in reflections and shadows Local Shading: Notation light intensity in,
More informationCOMP environment mapping Mar. 12, r = 2n(n v) v
Rendering mirror surfaces The next texture mapping method assumes we have a mirror surface, or at least a reflectance function that contains a mirror component. Examples might be a car window or hood,
More informationShading. Brian Curless CSE 457 Spring 2017
Shading Brian Curless CSE 457 Spring 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics
More informationComplex Shading Algorithms
Complex Shading Algorithms CPSC 414 Overview So far Rendering Pipeline including recent developments Today Shading algorithms based on the Rendering Pipeline Arbitrary reflection models (BRDFs) Bump mapping
More informationComputer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping
Computer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Normal Mapping Store normals in texture
More informationS U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T
S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render
More informationComputer Graphics. Illumination and Shading
Rendering Pipeline modelling of geometry transformation into world coordinates placement of cameras and light sources transformation into camera coordinates backface culling projection clipping w.r.t.
More informationRendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker
Rendering Algorithms: Real-time indirect illumination Spring 2010 Matthias Zwicker Today Real-time indirect illumination Ray tracing vs. Rasterization Screen space techniques Visibility & shadows Instant
More informationCS 130 Exam I. Fall 2015
S 3 Exam I Fall 25 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying
More informationComputer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model
Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting
More informationTSBK03 Screen-Space Ambient Occlusion
TSBK03 Screen-Space Ambient Occlusion Joakim Gebart, Jimmy Liikala December 15, 2013 Contents 1 Abstract 1 2 History 2 2.1 Crysis method..................................... 2 3 Chosen method 2 3.1 Algorithm
More informationTopic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source
Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport
More informationCSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012
CSE 167: Introduction to Computer Graphics Lecture #8: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #4 due Friday, November 2 nd Introduction:
More informationTopic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping
Topic 12: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures
More informationGame Technology. Lecture Physically Based Rendering. Dipl-Inform. Robert Konrad Polona Caserman, M.Sc.
Game Technology Lecture 7 4.12.2017 Physically Based Rendering Dipl-Inform. Robert Konrad Polona Caserman, M.Sc. Prof. Dr.-Ing. Ralf Steinmetz KOM - Multimedia Communications Lab PPT-for-all v.3.4_office2010
More informationLighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project
To do Continue to work on ray programming assignment Start thinking about final project Lighting Course Outline 3D Graphics Pipeline Modeling (Creating 3D Geometry) Mesh; modeling; sampling; Interaction
More informationComputer Graphics. Illumination and Shading
() Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic
More informationLecture 15: Shading-I. CITS3003 Graphics & Animation
Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional
More informationTopic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized
Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures
More informationCS452/552; EE465/505. Intro to Lighting
CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections
More informationVirtual Reality for Human Computer Interaction
Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color
More informationIllumination Models & Shading
Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));
More informationTopic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural
Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Topic 11: Photographs Texture Mapping Motivation Sources of texture Texture coordinates
More informationGlobal Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch
CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] 1 Global Illumination
More informationComputer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)
Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere
More informationCPSC / Illumination and Shading
CPSC 599.64 / 601.64 Rendering Pipeline usually in one step modelling of geometry transformation into world coordinate system placement of cameras and light sources transformation into camera coordinate
More informationPhotorealism: Ray Tracing
Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any
More informationShading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10
Reading Required: Shirley, Chapter 10 Shading Brian Curless CSE 557 Fall 2014 1 2 Basic 3D graphics With affine matrices, we can now transform virtual 3D objects in their local coordinate systems into
More informationThe Rasterization Pipeline
Lecture 5: The Rasterization Pipeline (and its implementation on GPUs) Computer Graphics CMU 15-462/15-662, Fall 2015 What you know how to do (at this point in the course) y y z x (w, h) z x Position objects
More informationChapter 4- Blender Render Engines
Chapter 4- Render Engines What is a Render Engine? As you make your 3D models in, your goal will probably be to generate (render) an image or a movie as a final result. The software that determines how
More informationLighting and Materials
http://graphics.ucsd.edu/~henrik/images/global.html Lighting and Materials Introduction The goal of any graphics rendering app is to simulate light Trying to convince the viewer they are seeing the real
More informationSimple Lighting/Illumination Models
Simple Lighting/Illumination Models Scene rendered using direct lighting only Photograph Scene rendered using a physically-based global illumination model with manual tuning of colors (Frederic Drago and
More informationHomework #2. Shading, Ray Tracing, and Texture Mapping
Computer Graphics Prof. Brian Curless CSE 457 Spring 2000 Homework #2 Shading, Ray Tracing, and Texture Mapping Prepared by: Doug Johnson, Maya Widyasari, and Brian Curless Assigned: Monday, May 8, 2000
More informationEnhancing Traditional Rasterization Graphics with Ray Tracing. March 2015
Enhancing Traditional Rasterization Graphics with Ray Tracing March 2015 Introductions James Rumble Developer Technology Engineer Ray Tracing Support Justin DeCell Software Design Engineer Ray Tracing
More informationCS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside
CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color
More informationGlobal Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University
Global Illumination CS334 Daniel G. Aliaga Department of Computer Science Purdue University Recall: Lighting and Shading Light sources Point light Models an omnidirectional light source (e.g., a bulb)
More informationCS 4620 Program 3: Pipeline
CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.
More informationWednesday, July 24, 13
The Chase Pushing the Limits of Modern Mobile GPU Renaldas Zioma, Unity Technologies Ole Ciliox, Unity Technologies The Chase High-End Mobile Demo Built with off-the-shelf Unity 4.2 The Chase Goals Impressive
More informationGlobal Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.
CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Angel Ch. 11] 1 Global Illumination
More informationIntroduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)
Lecture 9 Graphics pipeline (rasterization and shading) Graphics pipeline - part 1 (recap) Perspective projection by matrix multiplication: x pixel y pixel z canonical 1 x = M vpm per M cam y z 1 This
More informationMattan Erez. The University of Texas at Austin
EE382V: Principles in Computer Architecture Parallelism and Locality Fall 2008 Lecture 10 The Graphics Processing Unit Mattan Erez The University of Texas at Austin Outline What is a GPU? Why should we
More informationAdaptive Point Cloud Rendering
1 Adaptive Point Cloud Rendering Project Plan Final Group: May13-11 Christopher Jeffers Eric Jensen Joel Rausch Client: Siemens PLM Software Client Contact: Michael Carter Adviser: Simanta Mitra 4/29/13
More informationShading, lighting, & BRDF Theory. Cliff Lindsay, PHD
Shading, lighting, & BRDF Theory Cliff Lindsay, PHD Overview of today s lecture BRDF Characteristics Lights in terms of BRDFs Classes of BRDFs Ambient light & Shadows in terms of BRDFs Decomposing Reflection
More informationInteractive Methods in Scientific Visualization
Interactive Methods in Scientific Visualization GPU Volume Raycasting Christof Rezk-Salama University of Siegen, Germany Volume Rendering in a Nutshell Image Plane Eye Data Set Back-to-front iteration
More informationConsider 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
Ray Tracing What was the rendering equation? Motivate & list the terms. Relate the rendering equation to forward ray tracing. Why is forward ray tracing not good for image formation? What is the difference
More informationIntroduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF
Shading Introduction Affine transformations help us to place objects into a scene. Before creating images of these objects, we ll look at models for how light interacts with their surfaces. Such a model
More informationGlobal Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.
CSCI 480 Computer Graphics Lecture 18 Global Illumination BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] March 28, 2012 Jernej Barbic University of Southern California
More information03 RENDERING PART TWO
03 RENDERING PART TWO WHAT WE HAVE SO FAR: GEOMETRY AFTER TRANSFORMATION AND SOME BASIC CLIPPING / CULLING TEXTURES AND MAPPING MATERIAL VISUALLY DISTINGUISHES 2 OBJECTS WITH IDENTICAL GEOMETRY FOR NOW,
More informationTexture mapping. Computer Graphics CSE 167 Lecture 9
Texture mapping Computer Graphics CSE 167 Lecture 9 CSE 167: Computer Graphics Texture Mapping Overview Interpolation Wrapping Texture coordinates Anti aliasing Mipmaps Other mappings Including bump mapping
More informationOutline of Lecture. Real-Time High Quality Rendering. Geometry or Vertex Pipeline. Basic Hardware Pipeline. Pixel or Fragment Pipeline
Real-Time High Quality Rendering CSE 274 [Fall 2015], Lecture 2 Graphics Hardware Pipeline, Reflection and Rendering Equations, Taonomy of Methods http://www.cs.ucsd.edu/~ravir Outline of Lecture Taonomy
More informationShading 1: basics Christian Miller CS Fall 2011
Shading 1: basics Christian Miller CS 354 - Fall 2011 Picking colors Shading is finding the right color for a pixel This color depends on several factors: The material of the surface itself The color and
More informationLevel of Details in Computer Rendering
Level of Details in Computer Rendering Ariel Shamir Overview 1. Photo realism vs. Non photo realism (NPR) 2. Objects representations 3. Level of details Photo Realism Vs. Non Pixar Demonstrations Sketching,
More informationShading / Light. Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham
Shading / Light Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham Phong Illumination Model See Shirley, Ch 10 and http://en.wikipedia.org/wiki/phong_shading
More informationCS451Real-time Rendering Pipeline
1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does
More informationComputergrafik. Matthias Zwicker. Herbst 2010
Computergrafik Matthias Zwicker Universität Bern Herbst 2010 Today Bump mapping Shadows Shadow mapping Shadow mapping in OpenGL Bump mapping Surface detail is often the result of small perturbations in
More informationBlue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers
Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Question 1. a) (5 marks) Explain the OpenGL synthetic camera model,
More informationOrthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015
Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather
More informationSurface Reflection Models
Surface Reflection Models Frank Losasso (flosasso@nvidia.com) Introduction One of the fundamental topics in lighting is how the light interacts with the environment. The academic community has researched
More informationLocal Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller
Local Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Graphics Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism
More informationShading. Shading = find color values at pixels of screen (when rendering a virtual 3D scene).
Light Shading Shading Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Shading Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Same
More informationAfter the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve
After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve lighting in games. While that is certainly true, it doesn t
More informationIllumination and Shading
Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture
More informationProperty of: Entrada Interactive. PBR Workflow. Working within a PBR-based environment
Property of: Entrada Interactive PBR Workflow Working within a PBR-based environment Ryan Manning 8/24/2014 MISCREATED PBR WORKFLOW CryDocs on Physically Based Shading/Rendering: http://docs.cryengine.com/display/sdkdoc4/physically+based+rendering
More informationLab 9 - Metal and Glass
Lab 9 - Metal and Glass Let the form of an object be what it may, light, shade, and perspective will always make it beautiful. -John Constable Prologue Support code: /course/cs1230/src/labs/lab09 This
More informationShading and Illumination
Shading and Illumination OpenGL Shading Without Shading With Shading Physics Bidirectional Reflectance Distribution Function (BRDF) f r (ω i,ω ) = dl(ω ) L(ω i )cosθ i dω i = dl(ω ) L(ω i )( ω i n)dω
More informationOso Toon Shader. Step 1: Flat Color
Oso Toon Shader By default the Oso Toon Shader has most of the same elements of standard Iray Uber Shader, that it is based on. However, there are some additional functions that allow OTS to do some dramatic
More informationRender methods, Compositing, Post-process and NPR in NX Render
Render methods, Compositing, Post-process and NPR in NX Render Overview What makes a good rendered image Render methods in NX Render Foregrounds and backgrounds Post-processing effects Compositing models
More information