Fundamentals of Computer Graphics Part 1

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

01.1 Angel: Interactive Computer Graphics Addison-Wesley 2005 Computer Graphics: Realism comes to computer graphics smooth shadingenvironment.
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
Image Formation Mohan Sridharan Based on slides created by Edward Angel CS4395: Computer Graphics 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
CSC 461: Lecture 2 1 CSC461 Lecture 2: Image Formation Objectives Fundamental imaging notions Fundamental imaging notions Physical basis for image formation.
Computer Graphics Hardware and Software Lecture Notes, CEng 477.
Computer Graphics/and Multimedia CMM472/CIT773 What is CG ?, History of CG, Course Overview.
Computer Graphics Lecture 05 Fasih ur Rehman. Last Class Overview of Graphic Systems – Vector Displays – Movie Standards – LCD’s.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
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)
B a c kn e x t h o m e CSCI 346 Chapter 1 Graphics Systems and Models.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 46 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 46 Computer Graphics Introduction II.
Chapter 1 Graphics Systems and Models. What is Computer Graphics? Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media.
Computer Graphics/and Multimedia CMM472/CIT773 What is CG ?, History of CG, Course Overview.
1Computer Graphics Lecture 3 - Image Formation John Shearer Culture Lab – space 2
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics I, Fall 2008 Image Formation.
1 Image Formation. 2 Objectives Fundamental imaging notions Physical basis for image formation ­Light ­Color ­Perception Synthetic camera model Other.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Graphics System CSC 2141 Introduction to Computer Graphics.
ISC/GAM 4322 ISC 6310 Multimedia Development and Programming Unit 1 Graphics Systems and Models.
1 Computer Graphics Week3 –Graphics & Image Processing.
Computer Graphics in Java1 Objects and Viewers Two basic entities (one object seen from two different positions) :
Computer Graphics.
1 By Dr. Hany Elsalamony. 2 3  Computer graphics generally means creation, storage and manipulation of models and images  Such models come from diverse.
Chapter 1: Graphics Systems and Models Instructor: Shih-Shinh Huang 1.
Graphics Systems and Models Chapter 1. CS 480/680 2Chapter 1 -- Graphics Systems and Models Introduction: Introduction: Computer Graphics Computer Graphics.
1 Graphics CSCI 343, Fall 2015 Lecture 1 Introduction to Graphics Read: Chapter 1 of textbook.
COMPUTER GRAPHICS Hochiminh city University of Technology Faculty of Computer Science and Engineering CHAPTER 01: Graphics System.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
CS 480/680 Computer Graphics Image Formation Dr. Frederick C Harris, Jr.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Chun-Yuan Lin Graphics Systems and Models 2015/11/12 1 CG.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
1 Angel: Interactive Computer Graphics4E © Addison-Wesley 2005 Image Formation.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
1 Angel and Shreiner: Interactive Computer Graphics6E © Addison-Wesley 2012 Image Formation 靜宜大學 資訊工程系 蔡奇偉 副教授
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)
1 Angel and Shreiner: Interactive Computer Graphics6E © Addison-Wesley 2012 Image Formation Sai-Keung Wong ( 黃世強 ) Computer Science National Chiao Tung.
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.
1 Chapter 1: Introduction to Graphics. 2 What is computer graphics.
1 Computer Graphics - Chapter 1 Graphics Systems and Models Objectives are to learn about: Applications of Computer Graphics Graphics Systems Images: Physical.
1 Computer Graphics - Chapter 1 Graphics Systems and Models Objectives are to learn about: Applications of Computer Graphics Graphics Systems Images: Physical.
Computer Graphics Overview
- Introduction - Graphics Pipeline
Graphics Systems and Models
Graphics Programming CSC
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Yuanfeng Zhou Shandong University
INTERACTIVE COMPUTER GRAPHICS
Course code: 10CS65 | Computer Graphics and Visualization
CS 4722 Computer Graphics and Multimedia Spring 2018
Image Formation Ed Angel Professor Emeritus of Computer Science,
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Isaac Gang University of Mary Hardin-Baylor
Models and Architectures
Angel: Interactive Computer Graphics4E © Addison-Wesley 2005
Image Formation Ed Angel
Models and Architectures
University of New Mexico
Presentation transcript:

Fundamentals of Computer Graphics Part 1 prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.: Interactive Computer Graphics – A Top Down Approach with OpenGL, Addison Wesley, 2001

Fundamentals of Computer Graphics Graphics Systems Five major elements - processor, memory, frame buffer, output devices, input devices Fundamentals of Computer Graphics

Pixels and Frame Buffer Most graphics systems are pixel based – need of rasterization or scan conversion; pixel = picture element 8 bits deep frame – 256 colors; 24 or 32 bits for RGB colors picture detail Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Output Devices The cathode-ray tube CRT Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Output Devices RGB – shadow mask Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Output Devices Refresh rate: 50 – 85 Hz, for stereovision 120Hz (2 x60 Hz) Mode: interlaced versus non-interlaced Masks: DELTA versus INLINE LCD Displays – raster based Raster devices sequential access - plotters etc. direct access – displays etc. mixed – inkjet printers – printed sequentially, accessed directly Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Images – Physical versus Synthetic Computer graphics generates pictures with the aim of: to create realistic images to create images very close to “traditional” imaging methods Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Objects and Viewers Two basic entities (one object seen from two different positions) : object(s) – exists in space independent of any image-formation process or viewer viewer(s) Fundamentals of Computer Graphics

Objects, Viewers & Camera Camera system object and viewer exist in E3 image is formed in the Human Visual system (HSV) – on the retina In the film plane if a camera is used Object(s) & Viewer(s) in E3 Pictures in E2 Transformation from E3 to E2 projection Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Lights & Images Others attributes: light sources position monochromatic / color if not used scene would be very dark and flat shadows and reflections - very important for realistic perception geometric optics used for light modeling Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Colours Light is a form of electromagnetic radiation Visible spectrum 350 – 780 nm Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Ray Tracing Ray tracing building an imaging model by following light from a source a ray is a semi-infinite line that emanates from a point and “travels” to infinity in a particular direction portion of these infinite rays contributes to the image on the film plane of the camera surfaces: diffusing reflecting refracting Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Ray Tracing A different approach must be used: for each pixel intensity must be computed all contributions must be taken into account a ray is “followed” in the opposite direction, when intersect a surface it is split into two rays contribution from light sources and reflection from other resources are counted Fundamentals of Computer Graphics

Human Visual System - HVS rods and cones (tyčinky a čípky) excited by electromagnetic energy in the range 350-780 nm sizes of rods and cones determines the resolution of HVS – our visual acuity the sensors in the human eye do not react uniformly to the light energy at different wavelengths Fundamentals of Computer Graphics

Human Visual System - HVS Courtesy of http://www.webvision.med.utah.edu/into.html Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Human Visual System different HVS response for single frequency light – red/green/blue relative brightness response at different frequencies this curve is known as Commision Internationale de L’Eclairage (CIE) standard observer curve the curve matches the sensitivity of the monochromatic sensors used in black&white films and video camera most sensitive to GREEN colors Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Human Visual System three different cones in HVS blue, green & yellow – often reported as red for compatibility with camera & film Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Pinhole Camera Box with a small hole film plane z = - d !!!yp,-d Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Pinhole Camera point (xp,yp,-d) – projection of the point (x,y,z) angle of view or field of the camera – angle  ideal camera – infinite depth of field Fundamentals of Computer Graphics

Synthetic Camera Model computer-generated image based on an optical system – Synthetic Camera Model viewer behind the camera can move the back of the camera – change of the distance d i.e. additional flexibility objects and viewer specifications are independent – different functions within a graphics library Imaging system Fundamentals of Computer Graphics

Synthetic Camera Model a – situation with a camera b – mathematical model – image plane moved in front of the camera center of projection – center of the lens projection plane – film plane (průmětna) Fundamentals of Computer Graphics

Synthetic Camera Model Imaging with the Synthetic Camera Model film plane position in a camera projected scene to the projection plane Fundamentals of Computer Graphics

Synthetic Camera Model Not all objects can be seen limit due to viewing angle Solution: Clipping rectangle or clipping window placed inn front of the camera ad b shows the case when the clipping rectangle is shifted aside – only part of the the scene is projected Fundamentals of Computer Graphics

Programmer’s Interface Numerous ways for user interaction with a graphics system using input devices - pads, mouse, keyboards etc. different orientation of coordinate systems canvas versus OpenGL etc. Fundamentals of Computer Graphics

Application Programmer’s Interface API functionality should match the conceptual model Synthetic Camera Model used for APIs like OpenGL, PHIGS, Direct 3D, Java3D, VRML etc. Functionality needed in the API to specify: Objects Viewers Light sources Material properties Fundamentals of Computer Graphics

Application Programmer’s Interface Objects are defined by points or vertices, line segments, polygons etc. to represent complex objects API primitives are displayed rapidly on the hardware usual API primitives: points line segments polygons text Fundamentals of Computer Graphics

Application Programmer’s Interface OpenGL defines primitives through list of vertices – triangular polygon is drawn by: glBegin(GL_POLYGON); glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd( ); attribute GL_POLYGON actually defines the primitive to be drawn – others GL_LINE_STRIP - draws a strip – n+1 points define n triangles GL_POINTS – draws only points Fundamentals of Computer Graphics

Application Programmer’s Interface Some APIs : work with frame buffer – read/write pixel level provides curves & surfaces / approximated by a series of simpler primitives OpenGL provides frame buffer, curves and surfaces Fundamentals of Computer Graphics

Application Programmer’s Interface Camera specification in APIs: position – usually center of lens orientation – camera coordinate system in center of lens camera can rotate around those three axis focal length of lens determines the size of the image on the film actually viewing angle film plane - camera has a height and a width Fundamentals of Computer Graphics

Application Programmer’s Interface Two coordinate systems are used: world coordinates, where the object is defined camera coordinates, where the image is to be produced Transformation for conversion between coordinate systems or gluLookAt(cam_x, cam_y,cam_z, look_at_x, look_at_y, look_at_z,…) glPerspective( field_of_view) Lights – location, strength, color, directionality Material – properties are attributes of objects Observed visual properties of objects are given by material and light properties Fundamentals of Computer Graphics

Modeling - Rendering Paradigm In many applications the modeling is separated from production of an image – rendering (CAD systems, animations etc.) In this case the modeling SW/HW might be different from the renderer the connection between both parts can be simple or highly complex using distributed environments Fundamentals of Computer Graphics

Graphics Architectures Early graphics systems – CRT had just basic capability to generate line segments connecting two points vector based with refreshing – length of line segments limited light pen often used for manipulation systems with memory CRT – the whole picture redrawn if changed Fundamentals of Computer Graphics

Graphics Architectures Display processors standard architecture with capabilities to display primitives composition made at the host memory – display list – contains primitives to be displayed. Fundamentals of Computer Graphics

Pipeline Architectures VLSI circuits enabled major advances in graphics architectures simple arithmetic pipeline a + b * c when addition of (b * c) and a is performing new b * c is computed in parallel – pipelining enabled significant speed up similar approach can be used for processing of geometric primitives as well Fundamentals of Computer Graphics

Pipeline Architectures There are 4 major steps in the geometric pipeline: transformations – like scaling, rotations, translation, mirroring, sheering etc. clipping – removal of those parts that are out of the viewing field projection rasterization homogeneous coordinates and matrix operations geometric transformations are used Fundamentals of Computer Graphics

Clipping, Projection & Rasterization Clipping is used to remove those parts of the world that cannot be seen. Objects representation is “kept” in 3D as long as possible. After transformation and clipping must be projected to 2D somehow projected objects or their parts must be displayed – and therefore rasterized. All those steps are performed on your graphics cards in haerware nowadays. Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Conclusion Consider a standard camera with 36x24 mm film and having a zoom 26 – 140mm. How the viewing angle or viewing field is defined. what is the difference in viewing between cases a) and b)? answer question from Chapter 1 Fundamentals of Computer Graphics

Fundamentals of Computer Graphics Exercise No.1 The aim of the first experiment is: to read data of a complex geometric model defined by the TRI format (routine for reading will be given) to store it in the data structure to display the model as a set of triangles as wire-model (without shading, visibility) to explore other possibilities of drawing visible parts only by with constant shading by setting some attributes to explore a possibility to create your own data model Fundamentals of Computer Graphics

Exercise No.1 – TRI format # (data originally from powerflip, not avalon) # Object name : --- The canonical cow --- # Number of triangles : 5804 # Number of vertices : 2905 [Vertices] 0.0 0.0 0.0 0.151632 -0.043319 -0.08824 x,y,z coordinates of the j-th vertex 0.163424 -0.033934 -0.08411 0.163118 -0.053632 -0.080509 Fundamentals of Computer Graphics

Exercise No.1 – TRI format [Triangles] 1 2 3 vertex indices forming the i-th triangle 2 4 5 5 4 6 ……….. [Triangles' Normals] 0.442 -0.167 -0.881 i-th normal vector for the i-th triangle 0.595 -0.088 -0.798 0.735 -0.093 -0.671 ………………………………………….. Fundamentals of Computer Graphics