COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.

Slides:



Advertisements
Similar presentations
Real-Time Rendering 靜宜大學資工研究所 蔡奇偉副教授 2010©.
Advertisements

COMPUTER GRAPHICS SOFTWARE.
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.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
3D Graphics Rendering and Terrain Modeling
HCI 530 : Seminar (HCI) Damian Schofield.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Computer Graphics CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Game Engine Design ITCS 4010/5010 Spring 2006 Kalpathi Subramanian Department of Computer Science UNC Charlotte.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
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.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
Basic Graphics Concepts Day One CSCI 440. Terminology object - the thing being modeled image - view of object(s) on the screen frame buffer - memory that.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
CSE 381 – Advanced Game Programming Basic 3D Graphics
Week 2 - Wednesday CS361.
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.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
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.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
CSE Real Time Rendering Week 2. Graphics Processing 2.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
MIT EECS 6.837, Durand and Cutler The Graphics Pipeline: Projective Transformations.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
1 Chapter 1: Graphics Systems and Models. 2 Applications of C. G. – 1/4 Display of information Maps GIS (geographic information system) CT (computer tomography)
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.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
Chapter 1 Graphics Systems and Models Models and Architectures.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
- Introduction - Graphics Pipeline
Chapter 1 An overview on Computer Graphics
Computer Graphics.
Week 2 - Friday CS361.
Chapter 1 An overview on Computer Graphics
Introduction to OpenGL
3D Graphics Rendering PPT By Ricardo Veguilla.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
Real-time Computer Graphics Overview
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Models and Architectures
Models and Architectures
Introduction to OpenGL
OpenGL-Rendering Pipeline
Presentation transcript:

COMPUTER GRAPHICS CSCI 375

What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP

Computer Graphics (& Related Areas)  Graphics  3D model => 2D image  Image processing  Computer vision  2D image => 3D model

Applications  Movies  Video games  Visualization  Simulation

Image Processing  Manipulate 2D bitmaps  Applies directly to pixel grid  Color correction  Scaling  Blurring  Sharpening

Image Synthesis  Graphics deals with image synthesis  Synthesis of 2D image from 3D scene description is called rendering

Photorealistic Rendering  Indistinguishable from reality  Ray tracing

Photoreal Rendering CG Choice Award Gallery: splay.php?f=121

Non-Photorealistic Rendering  Non-photoreal rendering  artificial water colors  pencil sketches  paint brushstrokes  Scientific and medical visualization

Computer Vision  2D images => 3D model  Aspects of AI

Animation  Sequence of images  May be generated by physical simulation  Rigid bodies  Deformable objects  Gasses, liquids  Particle effects  Character animation

Modeling  Creating 3D geometric data  3ds Max, Maya  Procedural modeling algorithms  Digitizers and computer vision  Mesh simplification

Raster Graphics  Modern displays are raster based  Pixels and subpixels  Old style vector displays

Framebuffer  Framebuffer  Space for final image  Grid of pixels  Colors are usu. 24 bits  Depth (z)  Usu. on GPU

Primitives  Complex scenes built from simpler objects  Objects built from primitives  Point  Line  Triangle

3D Models  Collection of triangles  Each triangle stores 3 vertices  Vertex  position  color  normal

3D Models struct Vector3 { float x, y, z; }; struct Vertex { Vector3 position; }; struct Triangle { Vertex vertices[3]; }; class Model { std::vector triangles; };

Traditional Graphics Pipeline  Primitives processed in stages  Transformation  Lighting  Clipping  Scan conversion  Fragment processing

The Graphics Pipeline Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display

The Graphics Pipeline  Primitives are processed in stages  Each stage forwards result to next stage Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display

Transformation  Transformations  Rotation  Translation  Scales  Projection  Matrices

Modeling Transformations  3D models defined in own coordinate system (object/local space)  Modeling transforms orient models within a common coordinate frame (world space) Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display Object spaceWorld space

Viewing Transformation  Maps world space to eye space  Viewing position is transformed to origin & direction is oriented along some axis (usually z) Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display Eye space World space

Projection  Objects are projected to 2D image place (screen space) Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display NDC Screen Space

Lighting  Vertex or fragment color  Different light types  Shadows, reflections, and translucency

Lighting  Vertices lit according to material properties, surface properties (normal) and light sources  Local lighting model (diffuse, ambient, Phong, etc.) Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display

Clipping  Camera and view volume  Culling  Clipping  Outputs visible primitives

Clipping  Transform to Normalized Device Coordinates (NDC)  Remove portions of object outside view volume Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display Eye spaceNDC

Scan Conversion  Scan conversion or rasterization  2D primitives => pixels  Per-vertex data is interpolated across the triangle

Scan Conversion (Rasterization)  Rasterizes primitives into pixels  Interpolate values as we go (color, depth, etc.) Modeling Transformations Illumination (Lighting) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility / Display

Fragment Processing  Output of rasterization  Set of fragments  Z-values  …  Z-buffer algorithm  Texturing and transparency operations

OpenGL  Open Graphics Library (OpenGL)  Standard specification defining a cross-platform API for writing 2D and 3D graphics apps  Cell phones to supercomputers  Developed by SGI in 1992  Current version 4.4  Managed by non-profit Khronos Group Consortium focused on open, royalty-free standards for authoring and acceleration of parallel computing, graphics, and dynamic media (OpenCL, OpenGL, OpenGL ES, WebGL, COLLADA)

Supporting Infrastructure OpenGL Application GLEW GLUTGLX, WGL Windowing System (X, Windows) GPUGraphics Drivers GL

OpenGL Example  Drawing a colored triangle  glBegin (GL_TRIANGLES);  glColor3f (1.0f, 0.0f, 0.0f);  glVertex3f (-1.0f, -1.0f, 0.0f);  glColor3f (0.0f, 1.0f, 0.0f);  glVertex3f (+1.0f, -1.0f, 0.0f);  glColor3f (0.0f, 0.0f, 1.0f);  glVertex3f (0.0f, +1.0f, 0.0f);  glEnd ();  Inefficient; we’ll improve upon this

OpenGL Program Organization  main () {  // Initialize and create window  // Set up key and mouse event handlers  // Initialize OpenGL  // Set up lighting  // Load assets

OpenGL Program Organization (Cont’d)  // Update and render loop  while (userWantsToContinue) {  // Clear screen  // Specify camera position & orientation (pose)  for (Model model : scene) {  // Specify object pose  // Draw model  // Frame completion code (buffer swap)  }  // Cleanup code  }