Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.

Slides:



Advertisements
Similar presentations
POST-PROCESSING SET09115 Intro Graphics Programming.
Advertisements

Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Graphics Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
Part I: Basics of Computer Graphics
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Compositing and Blending - Chapter 8 modified by Ray Wisman Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Image Compositing Angel 8.11 Angel: Interactive Computer Graphics5E © Addison-Wesley
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Basic Rendering Techniques V Recognizing basic rendering techniques.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Hidden Surface Removal
Guilford County Sci Vis V204.01
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.
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Graphics Texture Mapping
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
Texture Mapping. Scope Buffers Buffers Various of graphics image Various of graphics image Texture mapping Texture mapping.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Textures.
Shading & Texture. Shading Flat Shading The process of assigning colors to pixels. Smooth Shading Gouraud ShadingPhong Shading Shading.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
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.
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Implementation II.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Compositing and Blending
Computer Graphics Blending CO2409 Computer Graphics Week 14.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Visual Appearance Chapter 4 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
Computer Graphics I, Fall 2010 Implementation II.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Compositing and Blending Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Computer Graphics I, Fall 2008 Compositing and Blending.
Week 7 - Wednesday CS361.
Week 7 - Monday CS361.
Week 2 - Friday CS361.
Visual Appearance Chapter 4
Deferred Lighting.
The Graphics Rendering Pipeline
Basic Rendering Techniques
UMBC Graphics for Games
Presentation transcript:

Week 7 - Monday

 What did we talk about last time?  Specular shading  Aliasing and antialiasing

 Partially transparent objects significantly increase the difficulty of rendering a scene  We will talk about really difficult effects like frosted glass or light bending later  Just rendering transparent objects at all is a huge pain because the Z-buffer doesn't work anymore  Workarounds:  Screen door transparency  Sorting  Depth peeling

 We render an object with a checkerboard pattern of holes in it, leaving whatever is beneath the object showing through  Problems:  It really only works for 50% transparent objects  Only one overlapping transparent object really works  But it is simple and inexpensive

 Most transparency methods use the over operator, which combines two colors using the alpha of the one you're putting on top  c 0 = α s c s + (1 - α s )c d  c s is the new (source) color  c d is the old (destination) color  c o is the resulting (over) color  α s is the opacity (alpha) of the object

 The over operator is order dependent  To render correctly we can do the following:  Render all the opaque objects  Sort the centroids of the transparent objects in distance from the viewer  Render the transparent objects in back to front order  To make sure that you don't draw on top of an opaque object, you test against the Z-buffer but don't update it

 It is not always possible to sort polygons  They can interpenetrate  Hacks:  At the very least, use a Z-buffer test but not replacement  Turning off culling can help  Or render transparent polygons twice: once for each face

 It is possible to use two depth buffers to render transparency correctly  First render all the opaque objects updating the first depth buffer  Make second depth buffer maximally close  On the second (and future) rendering passes, render those fragments that are closer than the z values in the first depth buffer but further than the value in the second depth buffer  Update the second depth buffer  Repeat the process until no pixels are updated

1 layer2 layers 3 layers4 layers

 Alpha values can be used for antialiasing, by lowering the opacity of edges that partially cover pixels  Additive blending is an alternative to the over operator  c 0 = α s c s + c d  This is only useful for effects like glows where the new color never makes the original darker  Unlike transparency, it can be applied in any order

 I don't want to go deeply into gamma  The trouble is that real light has a wide range of color values that we need to store in some limited range (such as 0 – 255)  Then, we have to display these values, moving back from the limited range to the "real world" range

 Physical computations should be performed in the linear (real) space  To convert that linear space into nonlinear frame buffer space, we have to raise values by a power, typically 0.45 for PCs and 0.55 for Macs  Each component of physical color (0.3, 0.5, 0.6) is raised to 0.45 giving (0.582, 0.732, 0.794) then scaled to the range, giving (148, 187, 203)

 Usually, gamma correction is taken care of for you  If you are writing something where you need to do computations in the "real life" color space (such as a raytracer), you may have to worry about it  Calculations in the wrong space can have visually unrealistic effects

 We've got polygons, but they are all one color  At most, we could have different colors at each vertex  We want to "paint" a picture on the polygon  Because the surface is supposed to be colorful  To appear as if there is greater complexity than there is (a texture of bricks rather than a complex geometry of bricks)  To apply other effects to the surface such as changes in material or normal

 We never get tired of pipelines  Go from object space to parameter space  Go from parameter space to texture space  Get the texture value  Transform the texture value Projector function Object space Corresponder function Parameter space Obtain value Texture space Value transform function Texture value Transformed value

 The projector function goes from the model space (a 3D location on a surface) to a 2D (u,v) coordinate on a texture  Usually, this is based on a map from the model to the texture, made by an artist  Tools exist to help artists "unwrap" the model  Different kinds of mapping make this easier  In other scenarios, a mapping could be determined at run time

 From (u,v) coordinates we have to find a corresponding texture pixel (or texel)  Often this just maps directly from u,v  [0,1] to a pixel in the full width, height range  But matrix transformations can be applied  Also, values outside of [0,1] can be given, with different choices of interpretation

 Usually the texture value is just an RGB triple (or an RGBα value)  But, it could be procedurally generated  It could be a bump mapping or other surface data  It might need some transformation after retrieval

 Image texturing techniques  Procedural texturing

 Keep working on Project 2  Keep reading Chapter 6  Mipmapping  Anisotropic filtering