Introduction to Computer Graphics

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

3D Graphics Rendering and Terrain Modeling
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
CS 4363/6353 INTRODUCTION TO COMPUTER GRAPHICS. WHAT YOU’LL SEE Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t.
HCI 530 : Seminar (HCI) Damian Schofield.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
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.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
2 COEN Computer Graphics I Evening’s Goals n Discuss the mathematical transformations that are utilized for computer graphics projection viewing.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CS-378: Game Technology Lecture #2.1: Projection Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lecture 6: 3D graphics Concepts 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Programming 3D Applications CE Displaying Computer Graphics Week 3 Lecture 5 Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
CS 450: COMPUTER GRAPHICS PROJECTIONS SPRING 2015 DR. MICHAEL J. REALE.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
Mark Nelson 3d projections Fall 2013
Basic 3D Concepts. Overview 1.Coordinate systems 2.Transformations 3.Projection 4.Rasterization.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
University of North Carolina at Greensboro
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Emeritus of Computer Science University of New Mexico.
Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Emeritus of Computer Science University of New Mexico.
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
1 PTT 105/3: Engineering Graphics. TAXONOMY OF PLANAR GEOMETRIC PROJECTIONS PTT 105/3: Engineering Graphics 2 Planar Geometric Projections Parallel Multiview.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
Revision Sheet Computer Graphics and Human Interaction By Dr. HANY ELSALAMONY1.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Applications and Rendering pipeline
Visible Surface Detection
3D on the Web : Understanding the basics
- Introduction - Graphics Pipeline
Rasterizer Overview References:
Computer Graphics Implementation II
University of North Carolina at Greensboro
Intro to 3D Graphics.
Graphics Fundamentals
CSCE 441 Computer Graphics 3-D Viewing
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.
Graphics Processing Unit
3D Graphics Rendering PPT By Ricardo Veguilla.
CENG 477 Introduction to Computer Graphics
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Models and Architectures
Three-Dimensional Concepts. Three Dimensional Graphics  It is the field of computer graphics that deals with generating and displaying three dimensional.
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Digital Media Dr. Jim Rowan ITEC 2110.
Graphics Processing Unit
Projection in 3-D Glenn G. Chappell
Chapter V Vertex Processing
Last Time Canonical view pipeline Projection Local Coordinate Space
Introduction to Computer Graphics with WebGL
Game Programming Algorithms and Techniques
Presentation transcript:

Introduction to Computer Graphics

What You’ll see Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t know them) The math behind the scenes Shaders Simple and not-so-simple 3D file formats (OBJ and FBX)

What you Won’t See Applications (though they are useful) Photoshop/Gimp/Paint.NET Maya Web graphics Art Character animations Very complex Usually require 3rd party software

WhY? Senior Graphics Engineer at Autodesk

Why? C/C++ Game Programmer at Addmired

Why? Graphics Engineer at LucasArts

Early Graphics Das Blinkenlights Dot matrix printers Shortly after printers came the CRT… http://james.seng.sg/files/public/starwar-ascii-art.jpg

Early Graphics The CRT was able to draw more than ASCII characters. It could draw dots! http://www.gamasutra.com/view/feature/3900/the_history_of_pong_avoid_missing_.php

Early Graphics If you can draw a dot, you can draw a line! Bresenham’s Line Drawing algorithm http://kobi.nat.uni-magdeburg.de/patrick/uploads/BEng/bresenham_line.png http://i18.photobucket.com/albums/b106/mspeir/Grid.jpg

Things to Note… Everything at this time was 2D Looked really bad, but was playable! was in real time How did the “animation” work?

Into the 3rd Dimension Add depth dimension How do you perceive depth everyday? You have two eyes The image for your left eye is different than the right Brain extracts the differences to understand depth 3DTVs – how do they work? Passive and active http://static3.businessinsider.com/image/4b45f3b20000000000533ed7/3d-tv.jpg

But Wait! Monitors are one “flat image on a flat surface” How do we perceive depth now? Farther objects are smaller (foreshortening) Subtle lighting changes We’ll use mathematics to do this for us http://www.oceansbridge.com/paintings/artists/c/canaletto/oil-big/perspective_1765_XX_venice.jpg

Common TErminology Rendering: the entire process of drawing an image to the screen Vertex: a single 3D point (x, y, z) Edge: a line between two vertices Face: Most often 3 vertices and their edges Transformations: moving one or more vertices Translate: pushing vertices along the x, y or z axis Rotate: revolving vertices around some 3D point Scale: increasing or decreasing the distance of vertices from their center Model matrix – a mathematical structure for holding transformations (later) View matrix – another used for holding the viewpoint (camera) Projection matrix – another, used to get images on the screen (later) Rasterization – putting the actual pixels on the screen (final phase of rendering)

Transformations Translate Rotate Scale

Terminology (IMAGE From the OpenGL SuperBible) Wireframe – rendering only the edges of the model (old games)

Terminology (IMAGE From the OpenGL SuperBible) Hidden Surface Removal (HSR) – occluded objects can’t be seen Backface culling - drawing only the triangles that are facing the camera

Terminology (IMAGE From the OpenGL SuperBible) Solid shading (this isn’t a definition) – note that everything’s hard-coded red!

Terminology (IMAGE From the OpenGL SuperBible) Flat Shading – simulate lighting

Terminology (IMAGE From the OpenGL SuperBible) Texture mapping – using an image during the rasterization process

Terminology (IMAGE From the OpenGL SuperBible) Blending – mixing colors by rendering more than one thing in one spot The floor is rendered semi-transparent (yes, there are two cubes)

What about this? (non-Real-time)

Coordinate Systems We have several spaces: Local/Object – the coordinate system the mesh was modeled in World – the coordinate system of the virtual environment View/Camera – the coordinate system relative to the camera Clip – windowing system We use mathematics to transform vertices from one space to another

Coordinate Systems (for Windowing Systems) Because your screen is flat, we must work with 2D Cartesian Coordinates x = horizontal, y = vertical (0, 0) is origin +y -x +x -y

Coordinate CLipping +75 -100 +100 -75 When creating a window, we must define where we are in the Cartesian system The window header doesn’t count in this equation Middle of screen is (0, 0) +75 -100 +100 -75

Another Example Middle of screen is (75, 100) +150 +200

Setting A Window’s Viewport Window size usually doesn’t match clipping size The viewport maps the clipping area to part (or all) of the window Most often, the viewport fills the entire window Sometimes, you want a “Picture in Picture” (PIP) rendering

Example – Entire Window (150, 200) 1900x1200 Window

PIP Example (150, 200) 1900x1200 Window

3D Coordinate Systems +y -z -x +x +z -y We live (and think) in 3 dimensions x = horizontal, y = vertical, z = depth (can be RHS or LHS) (0, 0, 0) is origin +y -z -x +x +z -y http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2010/ky237_zy49/ky237_zy49/index.html

Basic Problem We need to convert our 3D models and display them on a 2D screen To do this, we use projections by defining a viewing volume These “flatten” the 3D world There are two kinds: Orthographic (aka “parallel”) All objects that have the same dimension are the same size, regardless of distance Viewing volume is rectangular Perspective Objects shrink with distance Viewing volume is shaped like a pyramid

Example (Upper-right is a Perspective View)

Orthographic View Volume (you can see the parallel now…) Far clipping plane Near clipping plane

Perspective View Volume Far clipping plane Near clipping plane