A Short Introduction to Computer Graphics



Similar documents
Introduction to Computer Graphics

INTRODUCTION TO RENDERING TECHNIQUES

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Lezione 4: Grafica 3D*(II)

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Lecture Notes, CEng 477

Computer Animation: Art, Science and Criticism

Adding Animation With Cinema 4D XL

Computer Graphics. Introduction. Computer graphics. What is computer graphics? Yung-Yu Chuang

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science. Friday 18 th January 2008.

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

Graphical displays are generally of two types: vector displays and raster displays. Vector displays

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

GRAFICA - A COMPUTER GRAPHICS TEACHING ASSISTANT. Andreas Savva, George Ioannou, Vasso Stylianou, and George Portides, University of Nicosia Cyprus

TEXTURE AND BUMP MAPPING

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Self-Positioning Handheld 3D Scanner

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

The 3D rendering pipeline (our version for this class)

Deferred Shading & Screen Space Effects

Character Animation from 2D Pictures and 3D Motion Data ALEXANDER HORNUNG, ELLEN DEKKERS, and LEIF KOBBELT RWTH-Aachen University

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Visualization of 2D Domains

Image Synthesis. Transparency. computer graphics & visualization

Creating Your Own 3D Models

B.A IN GRAPHIC DESIGN

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Maya 2014 Basic Animation & The Graph Editor

CS 4204 Computer Graphics

Introduction Week 1, Lecture 1

Multivariate data visualization using shadow

Computer Graphics Hardware An Overview

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Rendering Microgeometry with Volumetric Precomputed Radiance Transfer

HIGH AND LOW RESOLUTION TEXTURED MODELS OF COMPLEX ARCHITECTURAL SURFACES

DIGITAL SCULPTURE TECHNIQUES

Fundamentals of Computer Graphics

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Thea Omni Light. Thea Spot Light. Light setup & Optimization

Instructor. Goals. Image Synthesis Examples. Applications. Computer Graphics. Why Study 3D Computer Graphics?

Teaching Introductory Computer Graphics Via Ray Tracing

CATIA: Navigating the CATIA V5 environment. D. CHABLAT / S. CARO Damien.Chablat@irccyn.ec-nantes.fr

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

Cork Education and Training Board. Programme Module for. 3 Dimensional Computer Graphics. Leading to. Level 5 FETAC

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Direct Volume Rendering Elvins

MassArt Studio Foundation: Visual Language Digital Media Cookbook, Fall 2013

COMP-557: Fundamentals of Computer Graphics McGill University, Fall 2010

1. INTRODUCTION Graphics 2

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Fundamentals of Computer Animation

Workstation Applications for Windows. NVIDIA MAXtreme User s Guide

AR-media TUTORIALS OCCLUDERS. (May, 2011)

So, you want to make a photo-realistic rendering of the Earth from orbit, eh? And you want it to look just like what astronauts see from the shuttle

Examples. Pac-Man, Frogger, Tempest, Joust,

ENG4BF3 Medical Image Processing. Image Visualization

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

A technical overview of the Fuel3D system.

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

Intro to 3D Animation Using Blender

A Simple Guide To Understanding 3D Scanning Technologies

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

CS 4810 Introduction to Computer Graphics

Our One-Year 3D Animation Program is a comprehensive training in 3D using Alias

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

CS 325 Computer Graphics

Abstract. These two vectors define a plane tangent to the surface at that point. Their cross product is Recent work in computer graphics has been

Blender 3D Animation

CAD and Creativity. Contents

Visibility Map for Global Illumination in Point Clouds

CS 371 Project 5: Midterm Meta-Specification

How To Draw In Autocad

IT 386: 3D Modeling and Animation. Review Sheet. Notes from Professor Nersesian s IT 386: 3D Modeling and Animation course

Dhiren Bhatia Carnegie Mellon University

The Flat Shape Everything around us is shaped

Skills Inventory: Art/Media Communications. 1. Pre-employment Training/Career Development. A. Formal; e.g., certificates. Date Description Location

Specular reflection. Dielectrics and Distribution in Ray Tracing. Snell s Law. Ray tracing dielectrics

BUILDING TELEPRESENCE SYSTEMS: Translating Science Fiction Ideas into Reality

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

The Car Tutorial Part 1 Creating a Racing Game for Unity

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

ABS 731 Lighting Design & Technology. Spring 2006

The Limits of Human Vision

Computer Graphics Global Illumination (2): Monte-Carlo Ray Tracing and Photon Mapping. Lecture 15 Taku Komura

How To Create Superpath In Gta (Gta 3) And Gta 4.5 (Gts) (Gt3.5) (Geo 3.3) (Html) (Sv

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

CSE 167: Lecture 13: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Maya 2014 Still Life Part 1 Texturing & Lighting

REAL-TIME IMAGE BASED LIGHTING FOR OUTDOOR AUGMENTED REALITY UNDER DYNAMICALLY CHANGING ILLUMINATION CONDITIONS

SOEM 024: Computer Aided Design. E. Rozos

Transcription:

A Short Introduction to Computer Graphics Frédo Durand MIT Laboratory for Computer Science

1 Introduction Chapter I: Basics Although computer graphics is a vast field that encompasses almost any graphical aspect, we are mainly interested in the generation of images of 3-dimensional scenes. Computer imagery has applications for film special effects, simulation and training, games, medical imagery, flying logos, etc. Computer graphics relies on an internal model of the scene, that is, a mathematical representation suitable for graphical computations (see Chapter II). The model describes the 3D shapes, layout and materials of the scene. This 3D representation then has to be projected to compute a 2D image from a given viewpoint, this is the rendering step (see Chapter III). Rendering involves projecting the objects (perspective), handling visibility (which parts of objects are hidden) and computing their appearance and lighting interactions. Finally, for animated sequence, the motion of objects has to be specified. We will not discuss animation in this document. 2 Pixels A computer image is usually represented as a discrete grid of picture elements a.k.a. pixels. The number of pixels determines the resolution of the image. Typical resolutions range from 320*200 to 2000*1500. For a black and white image, a number describes the intensity of each pixel. It can be expressed between 0.0 (black) and 1.0 (white). However, for internal binary representation reasons, it is usually stored as an integer between 0 (black) and 255 (white) A low-resolution digital image. Left: Black and white. Right: Color. (Image Pixar). For a color image, each pixel is described by a triple of numbers representing the intensity of red, green and blue. For example, pure red is (255, 0, 0) and purple is (255, 0, 255). Because the image is represented by a discrete array of pixels, aliasing problems may occur. The most classical form of aliasing is the jaggy aspect of lines (see figure below). Antialiasing techniques are thus required. In the case of the line, it consists in using intermediate gray levels to smooth the appearance of the line. Another form of aliasing can be observed on television when people wear shirts with a fine stripped texture. A flickering pattern is observed because the size of the pattern is on the same order of magnitude as the pixel size. A line without and with antialiasing.

Chapter II: Geometric Model We introduce how the geometry of the scene is represented in the memory of the computer. 1 Polygons The most classical method for modeling 3D geometry is the use of polygons. An object is approximated by a polygonal mesh, that is a set of connected polygons (see below). Most of the time, triangles are used for simplicity and generality. 4 3 y 2 1 x Left: A cow modeled as a mesh of triangles. Right: This triangle can be stored using the coordinates of its vertices as [(2,4,2), (3,1,0), (1,1,2)]. Each polygon or triangle can be described by the 3D coordinates of its list of vertices (see figure above). The obvious limitation of triangles is that they produce a flat and geometric appearance. However, techniques called smoothing or interpolation can greatly improve this. 2 Primitives The most classical geometric entities can be directly used as primitives, e.g. cubes, cylinders, spheres and cones. A sphere for example can be simply described by the coordinates of its center and its radius. 3 Smooth patches More complex mathematical entities permit the representation of complex smooth objects. Spline patches and NURBS are the most popular. They are however harder to manipulate since one does not directly control the surface but so called control points that are only indirectly related to the final shape. Moreover, obtaining smooth junctions between different patches can be problematic. However, the recently popular subdivision surfaces overcome this limitation. They offer the best of both worlds and provide the simplicity of polygons and the smoothness of patches.

Chapter III: Rendering 1 Projection and rasterization The image projection of the 3D objects is computed using linear perspective. Given the position of the viewpoint and some camera parameters (e.g. field of view), it is very easy to compute the projection of a 3D point onto the 2D image. For mathematics enthusiasts, this can be simply expressed using a 4*4 matrix. In most methods, the geometric entities are then rasterized. It consists in drawing all the pixels covered by the entity. In the example below, the projections of the 3 red points have been computed using linear perspective, and the triangle has then been rasterized by filling the pixels in black. For richer rendering, the color of each rasterized pixel must take into account the optical properties of the object, as we will discuss below. 3D Triangle Image Projected (2D) Triangle 2 Visibility Projection (left) and rasterization (right) of a triangle. If the scene contains more than one object, occlusions may occur. That is, some objects may be hidden by others. Only visible objects should be represented. Visibility techniques deal with this issue. One classical algorithm that solves the visibility problem is the so-called painter s algorithm. It consists in sorting the objects or polygons from back to front and rasterizing them in this order. This way, frontmost polygons cover the more distant polygons that they hide. 1 Image 2 The Painter s algorithm. Triangle 1 is drawn first because it is more distant. Triangle 2 is drawn next and covers Triangle 1, which yields correct occlusion.

The ray-tracing algorithm does not use a rasterization phase. It sends one ray from the eye and through each pixel of the image. The intersection between this ray and the objects of the scene is computed, and only the closest intersection is considered. 2 1 Pixel Ray-tracing. A ray is sent from the eye and through the pixel. Since the intersection with 2 is closer than the intersection with 1, the pixel is black. The z-buffer method is the most common nowadays (e.g. for computer graphics cards). It stores the depth (z) of each pixel. When a new polygon is rasterized, for each pixel, the algorithm compares the depth of the current polygon and the depth of the pixel. If the new polygon has a closer depth, the color and depth of the pixel are updated. Otherwise, it means that for this pixel, a formerly drawn polygon hides the current polygon. 3 Shading and materials Augmenting the scene with light sources allows for better rendering. The objects can be shaded according to their interaction with light. Various shading models have been proposed in the literature. They describe how light is reflected by object, depending on the relative orientation of the surface, light source and viewpoint (see figure below). incoming light outgoing light? 1? 2 Light reflection model. The ratio of light bouncing off the surface in the direction of the eye depends on the two angles.

Sphere rendered using various material models. Note in particular the different highlights. Image from the Columbia-Utrecht Reflectance and Texture Database. Texture mapping uses 2D images that are mapped on the 3D models to improve their appearance (see examples in section 5). 4 Shadows and lighting simulation Shading and material models only take into account the local interaction of surfaces and light. They doe not simulate shadows that are harder to handle because they imply long-range interactions. A shadow is caused by the occlusion of light by one object. Ray-tracing, for example, can handle shadows, but requires a shadow computation for each pixel and each light source. A shadow ray is sent from the visible point to the light source. If the ray intersects an object, then the visible point is in shadow. shadow ray Visible point Pixel Shadow computation using ray-tracing. The visible point is in shadow because the black triangle occludes the light source. More complex lighting interactions can then be simulated. In particular, objects that are illuminated by a primary light source reflect light and produce indirect lighting. This is particularly important for inddor scenes. Global lighting methods take into account all light inter-reflections within the scene.

5 Example Polygonal model rendered in wire-frame (no vis ibility) With visibility. Shaded rendering. Note how the faces of the cube and cone have different intensities depending on their orientation relative to the light source. Smooth patches and shading including highlights. Texture-Mapping improves the appearance of surfaces (a better lighting is used too). Shadows. Various rendering qualities (Images Pixar)