Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of
|
|
- Stewart Barrett
- 5 years ago
- Views:
Transcription
1 Discrete Techniques 11 th Week, 2010 Buffer Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of bits/pixel Pixel
2 OpenGL Frame Buffer OpenGL Buffers Color buffers can be displayed Front Back Auxiliary Overlay Depth Accumulation High resolution buffer Stencil Hold masks
3 Writing Buffers Conceptually, we can consider all of memory as a large two-dimensional array of pixels We read and write rectangular block of pixels Bit block transfer (bitblt) operations The frame buffer is part of this memory Memory Source Destination Frame buffer Writing into frame buffer Writing Model Read destination pixel before writing source
4 Bit Writing Modes Source and destination bits are combined bitwise 16 possible functions (one per column in table) Replace XOR OR XOR Mode We can use XOR by enabling logic operations and selecting the XOR write mode In OpenGL: glenable( GL _ COLOR _ LOGIC _ OP ); gllogicop( GL_XOR ); // default: GL_COPY XOR is especially useful for swapping blocks of memory such as menus that t are stored off screen Property: d = (d s ) s If S represents screen and M represents a menu, the sequence swaps the S and M S S M M S M S S M
5 The Pixel Pipeline OpenGL has a separate pipeline for pixels Writing pixels involves Moving pixels from processor memory to the frame buffer Format conversions Mapping, lookups, tests Reading pixels Format conversion Buffer Selection OpenGL can draw into or read from any of the color buffers (front, back, auxiliary) Default to the back buffer Change with gldrawbuffer and glreadbuffer functions Note that format of the pixels in the frame buffer is different from that of processor memory and these two types of memory reside in different places Need packing and unpacking Drawing and reading can be slow
6 1-bit digital images Bitmaps OpenGL treats 1-bit pixels bitmaps) (bitmaps differently from multi-bit pixels ( pixelmaps) (pixelmaps ) Bitmaps are masks that determine if the corresponding pixel in the frame buffer is drawn with the present raster color 0 color unchanged 1 color changed based on writing mode Bitmaps are useful for raster text GLUT font: GLUT_ BIT_ MAP_ 8_ BY_ 13 Drawing Bitmaps glbitmap(width, idth height, x0, y0, xi, yi, bitmap); Offset from raster position Increments in raster position after bitmap drawn First raster position Second raster position
7 Raster Position Bitmaps appear at a location determined by the raster position, which is part of the OpenGL state OpenGL function glrasterpos{234}{sidf}(type x, type y, type z, type w); glrasterpos{234}{sidf}v(type } *array); The position is transformed to window coordinates using the current model-view and projection matrices The bitmap is mask Raster Color Where is a one in the bitmap, we see a color based upon the current raster color that is part of the OpenGL state Where is a zero, the color of the bitmap does not affect the corresponding pixel in the frame buffer Same as drawing color o set by glcolor*() o Fixed by last call to glrasterpos*() Ex) glcolor3f( 1.0f, 0.0f, 0f 0.0f 0f ); glrasterpos3f( x, y, z ); glcolor3f( 0.0f, 0.0f, 1.0f ); glbitmap(... ); Ones in bitmap drawn in red glbegin( GL_LINES ); glvertex3f(... ); Geometry drawn in blue
8 Example: Checker Board GLubyte checker[512]; GLubyte wb[2] = { 0x00, 0xff }; for( int i=0; i<64; i++ ) for( int j=0; j<8; j++ ) checker[i*8+j] = wb[(i/8+j)%2]; glcolor3f( 0.0f, 0.0f, 0.0f ); glrasterpos3f( 1.0f, 1.0f, 1.0f ); glbitmap( 64, 64, 0.0, 0.0, 0.0, 0.0, checker ); Pixel Maps OpenGL works with rectangular array of pixels called pixel maps or images Pixels are in one byte (8 bit) chunks Luminance (gray scale) images 1 byte/pixel RGB 3 bytes/pixel Three functions Draw pixels: processor memory to frame buffer Read pixels: frame buffer to processor memory Copy pixels: frame buffer to frame buffer
9 OpenGL Pixel Functions glreadpixels(x, els( y, width, height, format, type, myimage); Start pixel in frame buffer Size Type of pixels Type of image Pointer to processor memory Ex) Glubyte myimage[512][512][3]; glreadpixels( 0, 0, 512, 512, GL_RGB, GL_UNSIGNED_BYTE, myimage ); gldrawpixels(width, height, format, type, myimage); Start at raster position Image Formats We often work with images in a standard format (JPEG, TIFF, GIF) How do we read/write such images with OpenGL? No support in OpenGL OpenGL knows nothing of image formats Some code available on Web Can write readers/writers for some simple formats in OpenGL
10 The Limits of Geometric Modeling Although graphics card can render over 10 million polygons per second, that number is insufficient for many phenomena Clouds, grass, terrain, skin, etc. Consider the problem of modeling an orange An orange-colored sphere too simple texture mapping More complex shape too many polygons to model all the dimples bump mapping Three Types of Mapping Texture mapping Uses images to fill inside of polygons Environment (reflection) mapping Uses a picture of the environment for texture maps Allows simulation of highly specular surfaces Bump mapping Emulates altering normal vectors during the rendering process
11 Texture Mapping Geometric Model Texture Mapped Environment Mapping
12 Bump Mapping Where Does Mapping Take Place? Mapping techniques are implemented at the end of the rendering pipeline Very efficient because a few polygons make it past clipper Vertices Geometry processing Rasterization Fragment processing Frame buffer Pixels Pixel processing
13 Is It Simple? Mapping a pattern (texture) to a surface 2D Image 3D Surface Although the idea is simple map an image to a surface there are 3 or 4 coordinate system involved Coordinate Systems Parameteric coordinates May be used to model curves and surfaces Texture coordinates Used to identify points in the image to be mapped Object or world coordinates Conceptually, where the mapping takes place Window or screen coordinates Where the final image is really produced
14 Texture Mapping Parametric Coordinates Texture Coordinates World Coordinates Screen Coordinates Terminology for Texture Mapping Texel (texture element) Textures are brought into processor memory as arrays Texture coordinates T(s, t) Continuous rectangular 2D texture t pattern Generally varying over the interval (0, 1) Texture map World coordinates texture coordinates x = x ( s, t ) y = y( s, t) s = s x, y, z, w z = z( s, t) t = t( x, y, z, w) w = w s, t ( ) ( )
15 Mapping Functions Basic problem is how to find the maps Consider mapping from texture coordinates to a point on a surface Appear to need four functions x = y = z = x ( s, t) ( s, t) ( s, t) (, t ) y z w = w s But we really want to go the other way t s (x,y,z,w) y z Backward Mapping We really want to go backward Given a texel, we want to know to which point on an object it corresponds forward Given a point on an object, we want to know to which point in the texture it corresponds backward Need a map of the form ( x, y, z w) ( x, y, z w ) s = s, t = t, Such functions are difficult to find in general
16 Two-Part Mapping One solution to the mapping problem is to first map the texture to a simple intermediate surface such as a cylinder, a sphere, a box Example: Texture Mapping with Cylinder Texture Mapping with a Box Cylindrical mapping Parametric cylinder: Spherical mapping Parametric sphere: First Mapping x = r cos 2 π u y = r sin 2πu z = v / h x = r cos 2πu y = r sin 2πu cos 2πv s=u t=v z = r sin 2πu sin 2πv Spheres are used in environmental maps Box mapping s=u t=v Easy to use with simple orthographic projection Also used in environment maps r: radius h: height
17 Second Mapping Map from intermediate object to actual object Using the normals from intermediate to actual Using the normals from actual to intermediate Using the vectors from center of the object to intermediate Actual Intermediate Aliasing Point sampling of the texture can lead to aliasing errors Miss blue stripes Point samples in u,v (or x,y,z) space Point samples in texture space
18 Area Averaging A better but slower option is to use area averaging Preimage Preimage Pixel The projection of the corners of a pixel backward into object space Preimage of the pixel is curved Magnification and Minification More than one texel can cover a pixel minification) (minification or more than one pixel can cover a texel magnification) (magnification Can use point sampling (nearest texel) or linear filtering i (2 x 2 filter) to obtain texture t values Texels used with linear filtering
19 Mipmapped Textured Mipmapping allows for prefiltered texture maps of decreasing resolutions To lessen interpolation ti errors for smaller textured object Fast and easy for hardware Example: Texture Filtering Point sampling Linear fl filtering Mipmap + Point sampling Mipmap + Linear filtering
20 Other Texture Features Environment maps Start with image of environment through wide angle lens Can be either a real scanned image or an image created in OpenGL Use this texture to generate a spherical map Use automatic texture coordinate generation Multitexturing Apply a sequence of textures through multiple texture units Bump Mapping Render objects so that they appear to have fine details (bumps) that give the surface a rough appearance affected by the light position
21 Opacity and Transparency Opaque surfaces permit no light to pass through Transparent surfaces permit all light to pass Translucent surfaces pass some light Translucency = 1 Opacity(α) Opaque Surface α =1 Physical Models Dealing with translucency in a physically correct manner is difficult due to The complexity of the internal interactions of light and matter Using a pipeline renderer Scene with translucent objects
22 Writing Model for Blending Use A component of RGBA (or RGBα) colorto store opacity During rendering we can expand our writing model to use RGBA values Source component Source blending factor Blend Destination component Destination blending factor Color Buffer Blending Fragments from multiple objects contribute to color of the same pixel Alpha blending Creating images with transparent objects Alpha channel RGBA color mode Opacity Measure of how much light penetrates through the surface 1: completely opaque, 0: transparent Transparency = 1 Opacity
23 Blending Equation We can define source and destination blending factors for each RGBA component s = [s r, s g, s b, s α ] d = [d r, d g, d b, d α ] Suppose that t the source and destination colors are b = [b r, b g g, b b b, b α α] ] c = [c r, c g, c b, c α ] Blend as c = b s + c d c = [b r s r + c r d r, b g s g + c g d g, b b s b + c b d b, b α s α + c α d α ] Example: Blending Suppose that we start with the opaque background color (R 0,G 0,B 0,1) This color becomes the initial destination color We now want to blend in a translucent polygon with color (R 1,G 1,B 1,α 1 ) Select GL_SRC_ALPHA and GL_ONE_MINUS_SRC_ALPHA as the source and destination blending factors R 1 = α 1 R 1 +(1- α 1 ) R 0 G 1 = α 1 G 1 +(1- α 1 ) G 0 B 1 = α 1 B 1 +(1- α 1 ) B 0 Note that this formula is correct if polygon is either opaque or transparent
24 Is this image correct? Probably not Order Dependency Polygons are rendered in the order they pass down the pipeline Blending functions are order dependent Opaque and Translucent Polygons Suppose that we have a group of polygons some of which are opaque and some translucent How do we use hidden-surface removal? Opaque polygons block all polygons behind them and affect the depth buffer Translucent polygons should not affect depth buffer Render with gldepthmask(gl_false) which makes depth buffer read-only Sort polygons first to remove order dependency
25 Fog We can composite with a fixed color and have the blending factors depend on depth Simulates a fog effect Blend source color C s and fog color C f by f is the fog factor Exponential Gaussian Linear (depth cueing) C s = f C s + (1 f) C f Fog Functions
26 Line Aliasing Ideal raster line is one pixel wide All line segments, other than vertical and horizontal segments, partially cover pixels Simple algorithms color only whole pixels Lead to the jaggies or aliasing Similar issue for polygons Raster Line Antialiasing Can try to color a pixel by adding a fraction of its color to the frame buffer Fraction depends on percentage of pixel covered by fragment Setting the alpha value for the corresponding pixel to be a number between 0 and 1 that is the amount of that pixel covered by the fragment Fraction depends d on whether there is overlap No Overlap Overlap
27 Area Averaging Use average area α 1 +α 2 αα 1 α 2 as blending factor Example: Antialiasing Without antialiasing Antialiasing
28 Accumulation Buffer Compositing and blending are limited by resolution of the frame buffer Typically 8 bits per color component The accumulation buffer is a high resolution buffer (16 or more bits per component) that t avoids this problem Write into it or read from it with a scale factor Slower than direct compositing into the frame buffer Compositing Applications Image filtering (convolution) Whole scene antialiasing Motion effects
Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.
INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Buffers, Textures, Compositing, and Blending David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel Compositing,
More informationBuffers. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico
Buffers Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Objectives Introduce additional OpenGL buffers Learn to read and write buffers
More informationBuffers. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015
Buffers 1 Objectives Introduce additional WebGL buffers Reading and writing buffers Buffers and Images 2 Buffer Define a buffer by its spatial resolution (n x m) and its depth (or precision) k, the number
More informationCISC 3620 Lecture 7 Lighting and shading. Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping
CISC 3620 Lecture 7 Lighting and shading Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping Exam results Grade distribution 12 Min: 26 10 Mean: 74 8 Median:
More informationTexture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science
Texture Mapping CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce Mapping Methods - Texture Mapping - Environment Mapping - Bump Mapping Consider
More informationComputer Graphics. Three-Dimensional Graphics VI. Guoying Zhao 1 / 73
Computer Graphics Three-Dimensional Graphics VI Guoying Zhao 1 / 73 Texture mapping Guoying Zhao 2 / 73 Objectives Introduce Mapping Methods Texture Mapping Environment Mapping Bump Mapping Consider basic
More informationCS 5600 Spring
Objectives From: Ed Angel University of New Mexico Introduce Mapping Methods - - Environment Mapping -Bump Mapping Consider basic strategies - Forward vs backward mapping - Point sampling vs area averaging
More informationPixels and Buffers. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science
Pixels and Buffers CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce additional OpenGL buffers Learn to read from / write to buffers Introduce
More informationIntroduction to Computer Graphics with WebGL
1 Introduction to Computer Graphics with WebGL Ed Angel Lighting in WebGL WebGL lighting Application must specify - Normals - Material properties - Lights State-based shading functions have been deprecated
More informationSurface Rendering. Surface Rendering
Surface Rendering Surface Rendering Introduce Mapping Methods - Texture Mapping - Environmental Mapping - Bump Mapping Go over strategies for - Forward vs backward mapping 2 1 The Limits of Geometric Modeling
More informationCS 432 Interactive Computer Graphics
CS 432 Interactive Computer Graphics Lecture 09 Part 1 Compositing and Anti-Aliasing Matt Burlick - Drexel University - CS432 1 Composite Techniques Compositing is the method of compositing an image from
More informationCSE528 Computer Graphics: Theory, Algorithms, and Applications
CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 11794--4400 Tel: (631)632-8450; Fax: (631)632-8334
More informationObjectives. Texture Mapping and NURBS Week 7. The Limits of Geometric Modeling. Modeling an Orange. Three Types of Mapping. Modeling an Orange (2)
CS 480/680 INTERACTIVE COMPUTER GRAPHICS Texture Mapping and NURBS Week 7 David Breen Department of Computer Science Drexel University Objectives Introduce Mapping Methods Texture Mapping Environmental
More informationLecture 07: Buffers and Textures
Lecture 07: Buffers and Textures CSE 40166 Computer Graphics Peter Bui University of Notre Dame, IN, USA October 26, 2010 OpenGL Pipeline Today s Focus Pixel Buffers: read and write image data to and from
More informationCHAPTER 1 Graphics Systems and Models 3
?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........
More informationDefinition. Blending & Compositing. Front & Back Buffers. Left & Right Buffers. Blending combines geometric objects. e.g.
Blending & Compositing COMP 3003 Autumn 2005 Definition Blending combines geometric objects e.g. transparency Compositing combines entire images multi-pass textures accumulating results Both depend on
More informationGraphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.
Graphics Texture Mapping 고려대학교컴퓨터그래픽스연구실 3D Rendering Pipeline 3D Primitives 3D Modeling Coordinates Model Transformation 3D World Coordinates Lighting 3D World Coordinates Viewing Transformation 3D Viewing
More informationTextures. Texture coordinates. Introduce one more component to geometry
Texturing & Blending Prof. Aaron Lanterman (Based on slides by Prof. Hsien-Hsin Sean Lee) School of Electrical and Computer Engineering Georgia Institute of Technology Textures Rendering tiny triangles
More informationWorld Coordinate System
World Coordinate System Application Model Application Program Graphics System Workstation Normally, the User or Object Coordinate System. World Coordinate Window: A subset of the world coordinate system,
More informationNormalized Device Coordinate System (NDC) World Coordinate System. Example Coordinate Systems. Device Coordinate System
World Coordinate System Normalized Device Coordinate System (NDC) Model Program Graphics System Workstation Model Program Graphics System Workstation Normally, the User or Object Coordinate System. World
More informationScan line algorithm. Jacobs University Visualization and Computer Graphics Lab : Graphics and Visualization 272
Scan line algorithm The scan line algorithm is an alternative to the seed fill algorithm. It does not require scan conversion of the edges before filling the polygons It can be applied simultaneously to
More informationTexturas. Objectives. ! Introduce Mapping Methods. ! Consider two basic strategies. Computação Gráfica
Texturas Computação Gráfica Objectives! Introduce Mapping Methods! Texture Mapping! Environmental Mapping! Bump Mapping! Light Mapping! Consider two basic strategies! Manual coordinate specification! Two-stage
More informationChapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming
Chapter IV Fragment Processing and Output Merging Fragment Processing The per-fragment attributes may include a normal vector, a set of texture coordinates, a set of color values, a depth, etc. Using these
More informationOpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL
OpenGL: Open Graphics Library Introduction to OpenGL Part II CS 351-50 Graphics API ( Application Programming Interface) Software library Layer between programmer and graphics hardware (and other software
More informationGraphics Hardware and Display Devices
Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive
More informationOpenGL Texture Mapping. Objectives Introduce the OpenGL texture functions and options
OpenGL Texture Mapping Objectives Introduce the OpenGL texture functions and options 1 Basic Strategy Three steps to applying a texture 1. 2. 3. specify the texture read or generate image assign to texture
More informationCT5510: Computer Graphics. Texture Mapping
CT5510: Computer Graphics Texture Mapping BOCHANG MOON Texture Mapping Simulate spatially varying surface properties Phong illumination model is coupled with a material (e.g., color) Add small polygons
More informationFog example. Fog is atmospheric effect. Better realism, helps determine distances
Fog example Fog is atmospheric effect Better realism, helps determine distances Fog Fog was part of OpenGL fixed function pipeline Programming fixed function fog Parameters: Choose fog color, fog model
More informationE.Order of Operations
Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged
More informationCS 130 Final. Fall 2015
CS 130 Final Fall 2015 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. Bing-Yu Chen National Taiwan University
Computer Graphics Bing-Yu Chen National Taiwan University Introduction to OpenGL General OpenGL Introduction An Example OpenGL Program Drawing with OpenGL Transformations Animation and Depth Buffering
More informationChapter 3. Texture mapping. Learning Goals: Assignment Lab 3: Implement a single program, which fulfills the requirements:
Chapter 3 Texture mapping Learning Goals: 1. To understand texture mapping mechanisms in VRT 2. To import external textures and to create new textures 3. To manipulate and interact with textures 4. To
More informationEECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing
EECE 478 Rasterization & Scenes Rasterization Learning Objectives Be able to describe the complete graphics pipeline. Describe the process of rasterization for triangles and lines. Compositing Manipulate
More informationRasterization Computer Graphics I Lecture 14. Scan Conversion Antialiasing Compositing [Angel, Ch , ]
15-462 Computer Graphics I Lecture 14 Rasterization March 13, 2003 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Scan Conversion Antialiasing Compositing [Angel,
More informationTexture Mapping and Special Effects
Texture Mapping and Special Effects February 23 rd 26 th 2007 MAE 410-574, Virtual Reality Applications and Research Instructor: Govindarajan Srimathveeravalli HW#5 Due March 2 nd Implement the complete
More informationReal-Time Rendering (Echtzeitgraphik) Michael Wimmer
Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key
More informationINF3320 Computer Graphics and Discrete Geometry
INF3320 Computer Graphics and Discrete Geometry The OpenGL pipeline Christopher Dyken and Martin Reimers 12.10.2011 Page 1 Pipeline operations Page 2 OpenGL fixed-function pipeline: Implements a fixed
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 informationComputergrafik. Matthias Zwicker Universität Bern Herbst 2016
Computergrafik Matthias Zwicker Universität Bern Herbst 2016 2 Today Basic shader for texture mapping Texture coordinate assignment Antialiasing Fancy textures 3 Texture mapping Glue textures (images)
More informationComputer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1
Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes Line Attributes Fill-Area Attributes Scan-Line
More informationCap. 3 Textures. Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre
Cap. 3 Textures Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre Overview Objectives Notion of texture Motivation Texture mapping, texture patterns, and texels Mapping textures to polygons,
More informationLectures OpenGL Introduction
Lectures OpenGL Introduction By Tom Duff Pixar Animation Studios Emeryville, California and George Ledin Jr Sonoma State University Rohnert Park, California 2004, Tom Duff and George Ledin Jr 1 What is
More informationToday s Agenda. Basic design of a graphics system. Introduction to OpenGL
Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic
More informationModule 13C: Using The 3D Graphics APIs OpenGL ES
Module 13C: Using The 3D Graphics APIs OpenGL ES BREW TM Developer Training Module Objectives See the steps involved in 3D rendering View the 3D graphics capabilities 2 1 3D Overview The 3D graphics library
More informationINF3320 Computer Graphics and Discrete Geometry
INF3320 Computer Graphics and Discrete Geometry The OpenGL pipeline Christopher Dyken and Martin Reimers 07.10.2009 Page 1 The OpenGL pipeline Real Time Rendering: The Graphics Processing Unit (GPU) (Chapter
More informationImage Processing. CSCI 420 Computer Graphics Lecture 22
CSCI 42 Computer Graphics Lecture 22 Image Processing Blending Display Color Models Filters Dithering [Ch 7.13, 8.11-8.12] Jernej Barbic University of Southern California 1 Alpha Channel Frame buffer Simple
More informationImage Processing. Alpha Channel. Blending. Image Compositing. Blending Errors. Blending in OpenGL
CSCI 42 Computer Graphics Lecture 22 Image Processing Blending Display Color Models Filters Dithering [Ch 6, 7] Jernej Barbic University of Southern California Alpha Channel Frame buffer Simple color model:
More informationTexture Mapping 1/34
Texture Mapping 1/34 Texture Mapping Offsets the modeling assumption that the BRDF doesn t change in u and v coordinates along the object s surface Store a reflectance as an image called a texture Map
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 informationTexture Mapping 1/34
Texture Mapping 1/34 Texture Mapping Offsets the modeling assumption that the BRDF doesn t change in u and v coordinates along the object s surface Store a reflectance as an image called a texture Map
More informationToday. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik
Computergrafik Today Basic shader for texture mapping Texture coordinate assignment Antialiasing Fancy textures Matthias Zwicker Universität Bern Herbst 2009 Texture mapping Glue textures (images) onto
More informationCSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016
CSE 167: Introduction to Computer Graphics Lecture #8: Textures Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 2 due this Friday Midterm next Tuesday
More informationC P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev
C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image
More informationCS212. OpenGL Texture Mapping and Related
CS212 OpenGL Texture Mapping and Related Basic Strategy Three steps to applying a texture 1. specify the texture read or generate image assign to texture enable texturing 2. assign texture coordinates
More informationINF3320 Computer Graphics and Discrete Geometry
INF3320 Computer Graphics and Discrete Geometry Texturing Christopher Dyken Martin Reimers 06.10.2010 Page 1 Texturing Linear interpolation Real Time Rendering: Chapter 5: Visual Appearance Chapter 6:
More informationOpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University
OpenGL Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University Background Software interface to graphics hardware 250+ commands Objects (models) are built from geometric primitives
More informationCS Computer Graphics: Raster Graphics, Part 3
CS 543 - Computer Graphics: Raster Graphics, Part 3 by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Manipulating Pixmaps Pixmap = rectangular array of numerical values Pixmap copied
More informationComputer Graphics - Week 7
Computer Graphics - Week 7 Bengt-Olaf Schneider IBM T.J. Watson Research Center Questions about Last Week? Comments about the Assignment Specific comments The clip volume does not need to be closed Rotate
More informationGraphics Pipeline & APIs
Graphics Pipeline & APIs CPU Vertex Processing Rasterization Fragment Processing glclear (GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT); glpushmatrix (); gltranslatef (-0.15, -0.15, solidz); glmaterialfv(gl_front,
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 informationCSCI 4620/8626. Primitives and Attributes
CSCI 4620/8626 Computer Graphics Attributes of Graphics Primitives (Chapter 5) Last update: 2016-02-23 Primitives and Attributes The graphics primitives we ve seen so far are fundamental shapes, like lines,
More informationComputer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing
Computer Graphics Texture Filtering & Sampling Theory Hendrik Lensch Overview Last time Texture Parameterization Procedural Shading Today Texturing Filtering 2D Texture Mapping Forward mapping Object surface
More informationGraphics Programming
Graphics Programming 3 rd Week, 2011 OpenGL API (1) API (application programming interface) Interface between an application program and a graphics system Application Program OpenGL API Graphics Library
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 informationTexture Mapping. Michael Kazhdan ( /467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, , 16.6
Texture Mapping Michael Kazhdan (61.457/467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, 16.4.5, 16.6 Textures We know how to go from this to this J. Birn Textures But what about this to this? J. Birn Textures How
More informationComputer Graphics: Programming, Problem Solving, and Visual Communication
Computer Graphics: Programming, Problem Solving, and Visual Communication Dr. Steve Cunningham Computer Science Department California State University Stanislaus Turlock, CA 95382 copyright 2002, Steve
More informationFROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU
FROM VERTICES TO FRAGMENTS Lecture 5 Comp3080 Computer Graphics HKBU OBJECTIVES Introduce basic implementation strategies Clipping Scan conversion OCTOBER 9, 2011 2 OVERVIEW At end of the geometric pipeline,
More informationComputer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1
Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes t Line Attributes Fill-Area Attributes Scan-Line
More informationCSE528 Computer Graphics: Theory, Algorithms, and Applications
CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 11794--4400 Tel: (631)632-8450; Fax: (631)632-8334
More informationImage Processing Computer Graphics I Lecture 15
15-462 Computer Graphics I Lecture 15 Image Processing Blending Display Color Models Filters Dithering Image Compression March 18, 23 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/
More informationImage Processing. Blending. Blending in OpenGL. Image Compositing. Blending Errors. Antialiasing Revisited Computer Graphics I Lecture 15
15-462 Computer Graphics I Lecture 15 Image Processing Blending Display Color Models Filters Dithering Image Compression March 18, 23 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/
More informationComputer Graphics. Bing-Yu Chen National Taiwan University
Computer Graphics Bing-Yu Chen National Taiwan University Introduction to OpenGL General OpenGL Introduction An Example OpenGL Program Drawing with OpenGL Transformations Animation and Depth Buffering
More informationLets assume each object has a defined colour. Hence our illumination model is looks unrealistic.
Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary
More informationTexture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture
Texture CS 475 / CS 675 Computer Graphics Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. Lecture 11 : Texture http://en.wikipedia.org/wiki/uv_mapping
More informationMore Visible Surface Detection. CS116B Chris Pollett Mar. 16, 2005.
More Visible Surface Detection CS116B Chris Pollett Mar. 16, 2005. Outline The A-Buffer Method The Scan-Line Method The Depth Sorting Method BSP Trees, Area Subdivision, and Octrees Wire-frame Visibility
More informationCS 475 / CS 675 Computer Graphics. Lecture 11 : Texture
CS 475 / CS 675 Computer Graphics Lecture 11 : Texture Texture Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. http://en.wikipedia.org/wiki/uv_mapping
More informationTexturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018
References: Real-Time Rendering 3 rd Edition Chapter 6 Texturing Theory All it takes is for the rendered image to look right. -Jim Blinn Overview Introduction The Texturing Pipeline Example The Projector
More information3D Rasterization II COS 426
3D Rasterization II COS 426 3D Rendering Pipeline (for direct illumination) 3D Primitives Modeling Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation
More informationCMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013
CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013 Reading: See any standard reference on OpenGL or GLUT. Basic Drawing: In the previous lecture, we showed how to create a window in GLUT,
More informationReal-Time Rendering. Tomas Möller Eric Haines. A K Peters Natick, Massachusetts
Real-Time Rendering Tomas Möller Eric Haines n A K Peters Natick, Massachusetts Contents Preface 1 Introduction 1 1.1 Contents Overview 2 1.2 Notation and Definitions 3 1.2.1 Mathematical Notation 3 1.2.2
More informationComputer Graphics. Lecture 8 Antialiasing, Texture Mapping
Computer Graphics Lecture 8 Antialiasing, Texture Mapping Today Texture mapping Antialiasing Antialiasing-textures Texture Mapping : Why needed? Adding details using high resolution polygon meshes is costly
More informationScalar Field Visualization I
Scalar Field Visualization I What is a Scalar Field? The approximation of certain scalar function in space f(x,y,z). Image source: blimpyb.com f What is a Scalar Field? The approximation of certain scalar
More informationRenderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005
INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Renderer Implementation: Basics and Clipping David Carr Virtual Environments, Fundamentals Spring 2005 Feb-28-05 SMM009, Basics and Clipping 1
More informationShadow Algorithms. CSE 781 Winter Han-Wei Shen
Shadow Algorithms CSE 781 Winter 2010 Han-Wei Shen Why Shadows? Makes 3D Graphics more believable Provides additional cues for the shapes and relative positions of objects in 3D What is shadow? Shadow:
More informationAnnouncements. Written Assignment 2 is out see the web page. Computer Graphics
Announcements Written Assignment 2 is out see the web page 1 Texture and other Mappings Shadows Texture Mapping Bump Mapping Displacement Mapping Environment Mapping Watt Chapter 8 COMPUTER GRAPHICS 15-462
More informationGraphics Pipeline & APIs
3 2 4 Graphics Pipeline & APIs CPU Vertex Processing Rasterization Processing glclear (GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT); glpushmatrix (); gltranslatef (-0.15, -0.15, solidz); glmaterialfv(gl_front,
More information0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves
CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~elf Instructor: Eugene Fiume Office: BA 5266 Phone: 416 978 5472 (not a reliable way) Email:
More informationCSE4030 Introduction to Computer Graphics
CSE4030 Introduction to Computer Graphics Dongguk University Jeong-Mo Hong Timetable 00:00~00:10 Introduction (English) 00:10~00:50 Topic 1 (English) 00:50~00:60 Q&A (English, Korean) 01:00~01:40 Topic
More informationGraphics and Interaction Rendering pipeline & object modelling
433-324 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Lecture outline Introduction to Modelling Polygonal geometry The rendering
More informationModels and Architectures
Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation
More informationSpring 2009 Prof. Hyesoon Kim
Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on
More informationGRAFIKA KOMPUTER. ~ M. Ali Fauzi
GRAFIKA KOMPUTER ~ M. Ali Fauzi Texture Mapping WHY TEXTURE? Imagine a Chess Floor Or a Brick Wall How to Draw? If you want to draw a chess floor, each tile must be drawn as a separate quad. A large flat
More informationgraphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1
graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time
More informationCPSC / Texture Mapping
CPSC 599.64 / 601.64 Introduction and Motivation so far: detail through polygons & materials example: brick wall problem: many polygons & materials needed for detailed structures inefficient for memory
More informationComputer Graphics. Shadows
Computer Graphics Lecture 10 Shadows Taku Komura Today Shadows Overview Projective shadows Shadow texture Shadow volume Shadow map Soft shadows Why Shadows? Shadows tell us about the relative locations
More informationgraphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1
graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time
More informationThe simplest and most obvious method to go from a continuous to a discrete image is by point sampling,
Sampling our scenes are described with triangles giving a continuous 2d color field our images are digital/discrete made up of a grid of dots need to make a bridge between these two worlds else we will
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 informationTexture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism.
lecture 16 Texture mapping Aliasing (and anti-aliasing) Texture (images) Texture Mapping Q: Why do we need texture mapping? A: Because objects look fake and boring without it. Adding texture improves realism.
More informationlecture 16 Texture mapping Aliasing (and anti-aliasing)
lecture 16 Texture mapping Aliasing (and anti-aliasing) Texture (images) Texture Mapping Q: Why do we need texture mapping? A: Because objects look fake and boring without it. Adding texture improves realism.
More information