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



Similar documents
INTRODUCTION TO RENDERING TECHNIQUES

A Short Introduction to Computer Graphics

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

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

Realtime 3D Computer Graphics Virtual Reality

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Introduction to Computer Graphics

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.

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

Introduction Week 1, Lecture 1

Computer Graphics Hardware An Overview

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

Deferred Shading & Screen Space Effects

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Lecture Notes, CEng 477

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

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

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

CS 4204 Computer Graphics

Lezione 4: Grafica 3D*(II)

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

Teaching Introductory Computer Graphics Via Ray Tracing

How To Teach Computer Graphics

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

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

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

also describes the method used to collect the data for the faces. These techniques could be used to animate other flexible surfaces.

Rally Sport Racing Game: CodeName Space Racer

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

Two Research Schools become ONE

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

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

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

D animation. Advantages of 2-D2. Advantages of 3-D3. Related work. Key idea. Applications of Computer Graphics in Cel Animation.

w = COI EYE view direction vector u = w ( 010,, ) cross product with y-axis v = w u up vector

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

1. INTRODUCTION Graphics 2

Dhiren Bhatia Carnegie Mellon University

Computer Graphics. Anders Hast

Computer Animation: Art, Science and Criticism

Digital 3D Animation

Distributed Area of Interest Management for Large-Scale Immersive Video Conferencing

Shadows. Shadows. Thanks to: Frédo Durand and Seth Teller MIT. Realism Depth cue

Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

A Prototype For Eye-Gaze Corrected

Interactive Computer Graphics

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

Introduction to Computer Graphics

Hi everyone, my name is Michał Iwanicki. I m an engine programmer at Naughty Dog and this talk is entitled: Lighting technology of The Last of Us,

Last lecture... Computer Graphics:

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

3D Math Overview and 3D Graphics Foundations

Image Synthesis. Transparency. computer graphics & visualization

Advanced Visual Effects with Direct3D

Optimizing AAA Games for Mobile Platforms

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

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

Visibility Map for Global Illumination in Point Clouds

Introduction Week 1, Lecture 1

Consolidated Visualization of Enormous 3D Scan Point Clouds with Scanopy

Advanced Rendering for Engineering & Styling

COMPUTER GRAPHICS Computer Graphics

PRODUCT LIFECYCLE MANAGEMENT COMPETENCY CENTRE RENDERING. PLMCC, JSS Academy of Technical Education, Noida Rendering 1 of 16

Fundamentals of Computer Graphics

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

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

ICS : 435. Computer Graphics Applications. Instructor : Da'ad Albalawneh

To determine vertical angular frequency, we need to express vertical viewing angle in terms of and. 2tan. (degree). (1 pt)

Renderman on Film Combining CG & Live Action using Renderman with examples from Stuart Little 2

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

Interactive visualization of multi-dimensional data in R using OpenGL

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

Programming 3D Applications with HTML5 and WebGL

CASTING CURVED SHADOWS ON CURVED SURFACES. Lance Williams Computer Graphics Lab New York Institute of Technology Old Westbury, New York 11568

How To Draw A 3D Virtual World In 3D Space (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

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

Jan Köhnlein and Helmut Weberpals

Maya 2014 Still Life Part 1 Texturing & Lighting

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

Monte Carlo Path Tracing

4BA6 - Topic 4 Dr. Steven Collins. Chap. 5 3D Viewing and Projections

2D Geometrical Transformations. Foley & Van Dam, Chapter 5

Triangle Scan Conversion using 2D Homogeneous Coordinates

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

NVIDIA IndeX Enabling Interactive and Scalable Visualization for Large Data Marc Nienhaus, NVIDIA IndeX Engineering Manager and Chief Architect

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

Cartoon-Looking Rendering of 3D-Scenes

Self-Positioning Handheld 3D Scanner

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

Color correction in 3D environments Nicholas Blackhawk

Volume Rendering on Mobile Devices. Mika Pesonen

C O M P U T E R G R A P H I C S. Computer Graphics. Introduction I. Guoying Zhao 1 / 58

BUILDING TELEPRESENCE SYSTEMS: Translating Science Fiction Ideas into Reality

The Car Tutorial Part 1 Creating a Racing Game for Unity

Affine Transformations

Production Design / Art Direction. TV Animation / Shorts

Modern Graphics Engine Design. Sim Dietrich NVIDIA Corporation

Transcription:

Introduction Computer Graphics Instructor: Yung-Yu Chuang ( 莊 永 裕 ) E-mail: c@csie.ntu.edu.tw Office: CSIE 527 Grading: a MatchMove project Computer Science ce & Information o Technolog og Yung-Yu Chuang What is computer graphics? Definition the pictorial i snthesis of real or imaginar i objects from their computer-based models Computer graphics Create a 2D image/animation of a 3D world OUTPUT descriptions images I PUT descriptions Computer Graphics images Computer Vision Image Processing

Applications Movies Interactive entertainment Industrial design Architecture Culture heritage Computer graphics modeling rendering animation Modeling A simple example (0,0) (.5,0) # vertices 00 0.0, 00 0.0, 00 0.0.5, 0.0, 0.0 00 0.0, 5.5, 00 0.0.5,.5, 0.0 (0,.5) (.5,.5) z x # triangles 0, 2,, 2, 3

The power of triangles More complex examples Ever thing can be represented b triangles to a degree of precision. 20 triangles 80 triangles 320 triangles a real buddha 4K mesh rendered 2.4M mesh Modeling Triangle meshes The position of the model can be acquired b 3D scanner or made b artists using modeling tools. There are other was for representing geometric objects, but triangles have man advantages. Copright 998, Microsoft {f } : { v, v 2, v 3 } {f 2 } : { v 3, v 2, v 4 } {v } : (x,,z) {v 2 } : (x,,z) {f } : skin material {f 2 }: brown hair {v 2,f }:(n x,n,n z )(uv) (u,v) {v 2,f 2 } : (n x,n,n z ) (u,v) connectivit geometr face attributes corner attributes

Composition of a scene Graphics pipeline z x z x Representation Transformations

Representation 2D transformations Identit Scaling

Scaling Reflection Shearing Rotation

Limitations of a 2X2 matrix Homogeneous coordinate Scaling Rotation Reflection Shearing What do we miss? Translation 3D scaling

3D translation 3D rotation 3D shearing Graphics pipeline

Imaging with the snthetic camera Projections Specifing a viewer Projections

Parallel and perspective projections Orthographic transformation orthographic perspective Perspective projection Perspective transform

Triangle meshes Graphics pipeline review Copright 998, Microsoft {f } : { v, v 2, v 3 } {f 2 } : { v 3, v 2, v 4 } {v } : (x,,z) {v 2 } : (x,,z) {f } : skin material {f 2 }: brown hair {v 2,f }:(n x,n,n z )(uv) (u,v) {v 2,f 2 } : (n x,n,n z ) (u,v) connectivit geometr face attributes corner attributes Review of graphics pipeline Transformation Review of graphics pipeline Projection & clipping

Review of graphics pipeline Rasterization Visibilit ibili Visibilit (Hidden surface removal) Hidden surface removal Determining what to render at each pixel. A point is visible ibl if there exists a direct line-ofsight to it, unobstructed b another other objects (visible iibl surface determination). ti ) Moreover, some objects ma be invisible because there are behind the camera, outside of the field-of-view, too far awa (clipping) or back faced (backface culling). Hidden surfaces: wh care? Occlusion: Closer (opaque) objects along same viewing ra obscure more distant ones Reasons for removal Efficienc: i As with clipping, avoid wasting work on invisible objects Correctness: The image will look wrong if we don t model occlusion properl

Hidden surface removal algorithms Painter s algorithm Binar space partitioning Z-buffer Ra casting And man others Painter s algorithm Draw primitives from back to front to avoid need for depth comparisons from Shirle Painter s algorithm Idea: Sort primitives b minimum depth, then rasterize from furthest to nearest When there are depth overlaps, do more tests of bounding areas, etc. to see one actuall occludes the other Cclical overlaps are a problem Z-buffer algorithm Resolve depths at the pixel level Idea: add Z to frame buffer, when a pixel is drawn, check whether it is closer than what s alread in the framebuffer Proposed b Ed Catmull in 975, widel used toda, especiall in hardware. Z-buffer, texture, subdivsion surface, RenderMan Co-founder of Pixar 3 Oscars (993, 996, 200), SIGGRAPH Steven Coons Award (993)

Z-buffer algorithm Z-buffer algorithm The z-buffer Algorithm Z-buffer: example + = + = color buffer depth buffer

Z-Buffer Clipping (view frustum culling) Benefits Eas to implement Works for an geometric primitive Parallel l operation in hardware (independent d of order of polgon drawn) Limitationsit ti Memor required for depth buffer Quantization and aliasing artifacts Overfill Transparenc does not work well Review of graphics pipeline Rasterization Visibilit ibili Review of graphics pipeline Shading

Z-buffer algorithm Shading What is normal? ormal for a triangle n plane n (p - v 0 ) = 0 v 2 n = (v 2 - v 0 ) (v( - v 0 ) normalize n n/ n v 0 p v ote that tright-hand h rule determines outward dface

Using average normals Using average normals = true (geometric) normal 2 Using average normals 2 2 2 Using average normals 2 3 4 2 3 4 More generall, n i i 2 n 4 i i 3 It can also be area-weighted.

Triangle meshes Copright 998, Microsoft {f } : { v, v 2, v 3 } {f 2 } : { v 3, v 2, v 4 } {v } : (x,,z) {v 2 } : (x,,z) {f } : skin material {f 2 }: brown hair {v 2,f }:(n x,n,n z )(uv) (u,v) {v 2,f 2 } : (n x,n,n z ) (u,v) connectivit geometr face attributes corner attributes Illumination (shading) models Interaction between light sources and objects in scene that results in perception of intensit and color at ee Local vs. global models Local: perception of a particular primitive onl depends on light sources directl affecting that one primitive Geometr Material properties Shadows cast (global?) Global: also take into account indirect effects on light of other objects in the scene Light reflected/refracted Indirect lighting Local vs. global models Setup vl ve Direct lighting Indirect lighting Point P on a surface through a pixel p ormal at P Lighting direction vll Viewing direction ve Compute color L for pixel p

Surface tpes The smoother a surface, the more reflected light is concentrated in the direction a perfect mirror would reflected the light A ver rough surface scatters light in all directions Basics of local shading Diffuse reflection light goes everwhere; colored b object color Specular reflection happens onl near mirror configuration; usuall white Ambient reflection constant accounted for other source of illumination smooth surface rough surface Ambient shading add constant color to account for disregarded illumination and fill in black shadows; a cheap hack. ambient light Diffuse shading Assume light reflects equall in all directions Therefore surface looks same color from all views; view independent

Diffuse shading Illumination on an oblique surface is less than on a normal one (Lambertian cosine law) Diffuse shading (Gouraud 97) Applies to diffuse, Lambertian or matte surfaces Generall, illumination falls off as cosθ (albedo) Diffuse shading Diffuse shading For color objects, appl the formula for each color channel separatel 0.4 0.55 0.7 0.85.0 diffuse-reflection model with different k d 0.0 0.5 0.3 0.45 0.6 ambient and diffuse-reflection model with different and Ia Ip.0, kd 0. 4 k a

Specular shading Some surfaces have highlights, mirror like reflection; view direction dependent; especiall for smooth shinn surfaces Specular shading (Phong 975) Also known as gloss, rough specular and directional diffuse reflection Specular shading Fall off graduall from the perfect reflection direction Specular shading Increasing n narrows the lobe n cos 90 n=0 n=3 n= n=2 0 90

Specular shading Specular shading k s 0. 0.25 0.5 n 3.0 n 5. 0 n 0. 0 n 27. 0 n 200. 0 diffuse diffuse + specular Put it all together Choosing the parameters Include ambient, diffuse and specular Sum over man lights

Computing lighting at each pixel Most accurate approach: Compute component illumination at each pixel with individual positions, light directions, and viewing directions But this could be expensive... s I p Scan line Shading models for polgons Flat Shading Faceted Shading Constant Shading Gouraud Shading Intensit Interpolation Shading Color Interpolation Shading Phong Shading ormal-vector Interpolation Shading 2 3 Flat Shading Intensit Interpolation (Gouraud) Compute constant shading function, over each polgon Same normal and light vector across whole polgon Constant shading for polgon I p I I s I I a b I I s 2 2 I I 2 s s 3 s 3 3 3 2 I a I I b s I 2 I p I 3 I p x x x b p p a Ia Ib 2 xb xa xb xa x I I p I 3

ormal Interpolation (Phong) 2 s s 2 2 2 2 s s a a b s 3 3 3 3 s s b 2 s 3 3 2 3 p ormal Interpolation (Phong) a p b p b x x x x ~ a b a p b b a b p b a a p x x x x ~ p p ~ ormalizing makes thi it t p this a unit vector Gouraud v.s. Phong Shading Gouraud Phong Gouraud Phong Flat shading

Gouraud shading Phong shading Triangle meshes Graphics Pipeline Copright 998, Microsoft {f } : { v, v 2, v 3 } {f 2 } : { v 3, v 2, v 4 } {v } : (x,,z) {v 2 } : (x,,z) {f } : skin material {f 2 }: brown hair {v 2,f }:(n x,n,n z )(uv) (u,v) {v 2,f 2 } : (n x,n,n z ) (u,v) connectivit geometr face attributes corner attributes

Review of graphics pipeline Transformation Review of graphics pipeline Projection & clipping Review of graphics pipeline Rasterization Visibilit ibili Review of graphics pipeline Shading

Hierarchical modeling: a robot arm Animation Hierarchical modeling Animator demos

Videos TigerWang Racing Advanced topics Global illumination Complex materials

Realistic motion Graphics hardware vidia GT200 GPU 200 cores Animation production pipeline Animation production stor text t treatmentt t storboard voice storreal look and feel

Animation production pipeline modeling/articulation l laout animation What s next? shading/lighting rendering final touch Related courses Related courses