Lecture 7 Midterm Review. OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

OpenGL CMSC340 3D Character Design & Animation. What is OpenGL? A low-level graphics library specification designed for use with the C and C++ provides…
School of Computer Science University of Seoul. How can we create a window? How can we handle the events? What kind of objects can we render? How can.
COMPUTER GRAPHICS SOFTWARE.
Chapter 2: Graphics Programming
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
Graphics Pipeline.
Computer Graphics(Fall 2003) COMS 4160, Lecture 7: OpenGL 3 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
OpenGL and Projections
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner OpenGL, GLUT, Transformations.
3.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 3 Viewing Transformation Getting Started with OpenGL Introduction to Projections.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Introduction to OpenGL Jian Huang This set of slides are extracted from the Interactive OpenGL Programming course given by Dave Shreine, Ed Angel and Vicki.
Computer Graphics Bing-Yu Chen National Taiwan University.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
1 Computer Graphics Week3 –Graphics & Image Processing.
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
Graphics Programming using OpenGL. OpenGL is a software interface that allows the programmer to create 2D and 3D graphics images. This interface consists.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
OpenGL and Parametric Curves Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2005/12/21 with slides by Brian Curless, Zoran Popovic, Robin.
Lecture 3 OpenGL.
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 13,14: Reviews Transforms, OpenGL
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
The Rendering Pipeline CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Computer Graphics Bing-Yu Chen National Taiwan University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
OpenGL: Introduction Yanci Zhang Game Programming Practice.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Review of OpenGL Basics
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
Draw a Simple Object. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture blending.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
1 Welcome Alireza Moghaddam Humber College Lecture 1 Game 540 Alireza Moghaddam
Viewing and Transformation. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
OpenGL: The Open Graphics Language Introduction By Ricardo Veguilla.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
Chap 3 Viewing and Transformation
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.
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
CS559: Computer Graphics Lecture 12: OpenGL - Transformation Li Zhang Spring 2008.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
OpenGL LAB III.
CS380 LAB II OpenGL Donghyuk Kim Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
1 Chapter 1: Introduction to Graphics. 2 What is computer graphics.
OpenGL: The Open Graphics Language Technology and Historical Overview By Ricardo Veguilla.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
CS 480/680 Computer Graphics Programming with Open GL Part 2: Complete Programs Dr. Frederick C Harris, Jr. Fall 2011.
School of Computer Science
Draw a Simple Object.
Programmable Pipelines
Computer Graphics Lecture 33
School of Computer Science
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Lecture 18 Fasih ur Rehman
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Projection in 3-D Glenn G. Chappell
Introduction to OpenGL
Presentation transcript:

Lecture 7 Midterm Review

OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture mipmaps from a base image, draw quadric surfaces and NURBS. glut: OpenGL Utility Toolkit library. A system independent windowing system. Hierarchical view of libraries:

Mesa 3D Mesa 3D is a free/open source implementation of OpenGL. Mesa 3D This is a good source if you plan to see the implementation details of a function.

Rendering Pipeline

Evaluators Deriving vertices from basis functions Vertices can be used to represent a surface Per-Vertex Operations Converts vertices into primitives i.e. line, polygon, etc. Does mathematical operations, i.e. transformation, rotation, projection, etc.

Rendering Pipeline Rasterization: Conversion of geometric and pixel data into fragments. Each fragment corresponds to a pixel in frame buffer. When creating models, many parameters have to be considered, e.g. shading model, color, point size, etc.

Fragment Operations Before a fragment be placed in frame buffer, the following can be controlled: Texture Mapping Fog calculations Alpha Test, depth buffer test Blending, masking, etc.

GLUT Window Initialization What is Buffer? Clearing the Window glClearColor(R, G, B, A) glClearColor(GL_COLOR_BUFFER_BIT) glClearDepth() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)

OpenGL Buffers

Event Driven Programming Definition. A programming where the primary activity is reaction to the receipt of event. Applications: GUI, HCI Ingredients: Events: Can be from any source, human input, e.g. mouse or other sensors. Event Dispatcher: Assigns events to event handlers. Event Handler

Event Processing in GLUT Initial Setup: Initializing Display Modes, e.g. Color mode, Single/Double Buffer, etc. Entering GLUT event processing loop void glutMainLoop (void)

Display Function The display function of current window When is it called? If the normal plane of a window needs to be redisplayed as a result of window damage. GLUT determines this based on redisplay state of a window. When a user requests. How is it called? Implicitly: By GLUT, e.g. when the window system reports a region of the window's normal plane is undefined (for example, damaged by another window moving or being initially shown) Explicitly: Using glutPostRedisplay function.

Double Buffering Using Two buffers Front Buffer Back Buffer Is specified in initialization step glutInitDisplayMode (GLUT_DOUBLE) Replace glFlush() with glSwapBuffers() Increases the performance It’s NOT free, you have to pay: memory

Rotation and Translation

Camera Rotation Example: If we want to move a camera along a circular path and about any one of axes, we use rotation matrix corresponding to that axis. Then, by increasing the angle from [0…360], we calculate the new location of the camera.

ModelView,Projection,Viewport ModelView: Rotation, Translation, Scale. Projection: glFrustum, glOrtho, glPerspective Viewport glViewport

Perspective Projection

Viewport Defines how a rendered image should be displayed on a window.

Sequence of Matrices

Camera Properties: Position, Direction, UpVector Attention: Using gluLookAt affects the ModelView Matrix It is usually placed at the beginning of the display function It is usually placed after glLoadIdentity(GL_MODELVIEW) Be careful when placing it in a loop.

Matrix Stack Pushing matrices into the stack Poping matrices from the stack Example: