Chapter 6. Blending, Antialiasing, Fog, and Polygon Offset Computer Graphics (spring, 2009) School of Computer Science University of Seoul.

Slides:



Advertisements
Similar presentations
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Advertisements

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.
OpenGL Fragment Operations
Graphics Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphics(Fall 2003) COMS 4160, Lecture 7: OpenGL 3 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
CS 4363/6353 BASIC RENDERING. THE GRAPHICS PIPELINE OVERVIEW Vertex Processing Coordinate transformations Compute color for each vertex Clipping and Primitive.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
GAM532 DPS932 – Week 7 Introduction to shadows. Shadow Effects Light Surface No Shadows Shadows.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
1. 2 Blending: tells you how to specify a blending function that combines color values from a source and a destination. The final effect is that parts.
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Blending MAE152 Computer Graphics for Engineers and Scientists Fall 03.
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 10 Alpha Blending and Fog © 2008 Cengage Learning EMEA.
Objectives Introduce OpenGL buffers and read/write Introduce OpenGL buffers and read/write Introduce texture mapping Introduce texture mapping Introduce.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Chapter 6. More on Color and Material Presented by Garrett Yeh.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
7/2/2006Based on: Angel (4th Edition) & Akeine-Möller & Haines (2nd Edition)1 CSC345: Advanced Graphics & Virtual Environments Lecture 4: Visual Appearance.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Other Rendering Techniques Types of rendering – Wireframe techniques – Scan-line conversion – Reyes.
Computer Graphics Shadows
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.
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
MAE152 Computer Graphics for Scientists and Engineers Antialiasing Fall 2003.
Tools for Raster Displays CVGLab Goals of the Chapter To describe pixmaps and useful operations on them. To develop tools for copying, scaling, and rotating.
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.
Lecture 12 Blending, Anti-aliasing, Fog, Display Lists.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
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.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
1 Chapter 6 Blending, Antialiasing, Fog, and Polygon Offset Guihua Yang Jan 14, 2004.
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
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.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Compositing and Blending
UniS CS297 Graphics with Java and OpenGL Blending.
OpenGL Special Effects Jian-Liang Lin 2002 Blending: Alpha Channel Alpha value can be specify by glColor* When blending is enabled, the alpha value is.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
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.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
Chapter 13 Special Visual Techniques. Blending ◦ Without blending, a source fragment’s color values are supposed to overwrite those of its destination.
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
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.
CS 4722 Made by Dr. Jeffrey Chastine Modified by Dr. Chao Mei
Attributes of Graphics Primitives Hearn & Baker Chapter 4
Week 7 - Monday CS361.
Introduction to Computer Graphics with WebGL
School of Computer Science
Deferred Lighting.
The Graphics Rendering Pipeline
Understanding Theory and application of 3D
Antialiasing Dr. Scott Schaefer.
I = a I + ( ) 1 – a I BLENDING, ANTIALIASING, AND FOG l l 1 l 2 Earth
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Fog and Transparency.
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
blending blending textures reflection fog
Chapter X Output Merger.
blending blending textures reflection fog
Presentation transcript:

Chapter 6. Blending, Antialiasing, Fog, and Polygon Offset Computer Graphics (spring, 2009) School of Computer Science University of Seoul

Topics ● Blending ● Antialiasing ● Fog ● Point Parameters ● Polygon Offset

Blending

● Final color = blend_eq ( C s S, C d D ) ● C s & C d : source & destination colors, resp. ● S & D are set by glBlendFunc*(). – GL_SRC_ALPHA, GL_DST_ALPHA,... ● blend_eq is set by glBlendEquation*(). – Supported by OpenGL ver 1.2 or higher. – GL_FUNC_ADD, GL_LOGIC_OP, … ● In most cases... ● S := GL_SRC_ALPHA, D := GL_ONE_MINUS_SRC_ALPHA ● blend_eq := GL_FUNC_ADD

Examples ● Transparent objects ● Modulating colors ● Matting / compositing Matting / compositing ● Billboarding Billboarding ● Antialiasing

3D Blending ● The “order” of rendering matters! ● Example: alpha3D.calpha3D.c ● How to render both opaque and transparent objects in a scene at the same time?

Antialiasing

● Aliasing = “jaggedness” ● Why? Since we're approximating the ideal line by a series of discrete pixels. ● Antialiasing: to use the “coverage fraction” as the alpha value. (Fig. 6-3)Fig. 6-3 ● The way to compute “coverage” depends on the platform. ● glHint() : controls quality vs. speed.

Antialiasing ● Example: aargb.caargb.c ● GL_ALIASED ( SMOOTH ) _LINE_WIDTH_RANGE, GL_SMOOTH_LINE_WIDTH_GRANULARITY : supported line width & size difference between supported widths. ( glLineWidth() ) glLineWidth()

Multisampling ● OpenGL ver 1.3 or higher ● Antialiasing technique for points, lines, polygons, bitmaps, and images. ● Each fragment with multiple colors, depths, and texcoords. ● No alpha blending (no sorting needed) ● Works well for the cases of intersecting or adjacent polygons. ● GL_POINT ( LINE, POLYGON ) _SMOOTH are ignored. ● Example: multisamp.c

Antialiasing Polygons ● How to handle overlapping edges of different polygons? ● Using accumulation buffer(Ch.10) is expensive! ● Example: aapoly.c

Fog

● To render objects fade depending on the distance from the viewpoint. ● Applied after matrix transformations, lighting, and texturing are performed. ● Can improve performance in large simulation...why? ● “depth-cuing”: for points & lines ● Fog color & (density) equation can be set. ● Example: fog.cfog.c

Fog Density Functions ● Fog density functions ● GL_EXP : f=e^(-density*z) ● GL_EXP2 : f=e^-(density*z)^2 ● GL_LINEAR : f=(end-z)/(end-start) ● Fig 6-4 Fig 6-4 ● Final fogged color: C = fC i +(1-f)C f ● Explicit per-vertex fog coordinates (ver 1.4) ● ex) “ground-based” fog ● Example: fogcoord.c

Point Parameters

● OpenGL ver 1.4 or higher ● Useful for rendering particle systems without polygons. ● To change the size & brightness of points depending on the distance from the viewpoint. ● Example: pointp.c

Polygon Offset

● To avoid “stitching” artifact when rendering a solid object both in GL_FILL and GL_LINE modes. ● Depth value for a fragment is modified before depth test. ● Also can be done using stencil buffer, but it's more expensive. ● Fig 6-5 Fig 6-5 ● Example: polyoff.cpolyoff.c