24
CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

Embed Size (px)

Citation preview

Page 1: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

CSU0021 Computer Graphics

September 10, 2014

Page 2: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

What is Computer Graphics?

Page 3: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Computer Games

• Real-time, at least 10 FPS (frames/second)

• Also stimulated the graphics hardware industry– such as NVIDIA and ATI, – Game consoles (Xbox 360, PS3…etc.)

Page 4: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

Computer Games

• State-of-the-Art lighting and shader effects

Page 5: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Computer Animations• Offline, photorealistic rendering based

on accurate lighting simulation.

Page 6: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

• The Cars, by Pixar

Page 7: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

Graphics Hardware

• GPUs are hundreds-core processors.– nVidia GTX 780 has 2304 CUDA cores

CSU0021 Computer Graphics

Image source: NVIDIA

Page 8: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

What is 3D Graphics?

(Note: No 3D glasses required)

Page 9: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

What is Computer Graphics?

• More specifically, what is 3D graphics?

• We call this 2D graphics:

Page 10: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

What is 3D?

• Is this 3D graphics?

Page 11: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

• And this?

Page 12: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Computer Graphics: 1960-1970

• Wireframe graphics

• Project Sketchpad

• Display Processors

• Storage tube

Page 13: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Raster Graphics

• Allow us to go from lines and wireframes to filled polygons

Page 14: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Computer Graphics: 1980s & 1990s

Realism comes to computer graphics

smooth shading environmental mapping

bump mapping

Page 15: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Computer Graphics: 2000-

• Photorealism

• Graphics cards for PCs dominate market– Nvidia, ATI, 3DLabs

• Game boxes and game players determine direction of market

• Computer graphics work flow in movie industry: Maya, 3D Studio, Lightwave

Page 16: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

New Trend

• High Performance 3D Graphics– Global illumination and ray tracing– Heterogeneous computing with CPU+GPU

(OpenCL)

• Parallel computing for the masses.

• 3D Graphics on Mobile Platforms– OpenGL ES shaders on Android or iOS– WebGL and HTML5

CSU0021 Computer Graphics

Page 17: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

Programmer’s View: 1990s

CSU0021 Computer Graphics

Workstation:Silicon Graphics,HP, SUN, IBM

X Windows

OpenGL

PC w/Intel CPU

MS Windows

Apple Macintosh

Mac OS

DirectX ??

Page 18: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

Programmer’s View: 2000s

CSU0021 Computer Graphics

Workstation:Silicon Graphics,HP, SUN, IBM

X Windows

OpenGL

PC w/Intel CPU + NV or ATI GPU

MS Windows

MBP, MBA

Mac OS

DirectX, OpenGLOpenGL

iPhone

iOS

OpenGL ES

ARM

Android

OpenGL ES

Page 19: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

Programmer’s View: 2010s

CSU0021 Computer Graphics

PC w/Intel CPU + NV or ATI GPU

MS Windows

MBP, MBA

Mac OS

DirectX, OpenGL OpenGL

iPhone,iPad

iOS

OpenGL ES

ARM, Intel

Android

OpenGL ES

Game Engines: Unity, Unreal, CryEngine, Snowdop…etc.

Page 20: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

What to Teach in a Computer Graphics

Course?• “I want to write a game ASAP!” – Unity– Pros: quick, cross platform (PC & mobile)– Cons: less flexibility, limited future

• WebGL Our future choice

• OpenGL Our choice now!

• Raster graphics – line drawing, polygon rasterization

CSU0021 Computer Graphics

Page 21: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

3D Graphics Programming• Application Programming Level (Learning to

Drive):1. Describe the objects in 3D coordinates.2. Set up the camera.3. Call OpenGL (or any other 3D API).

• Implementation of a Renderer (Under the Hood):

1. Transform 3D coordinates to 2D.2. Apply lighting.3. Draw the dots (pixels).

Page 22: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Hands-On Approach

• We will look at both levels in parallel.– In some assignments, you will program in

the application level. In the graphics pipeline assignments, we will create a 3D renderer.

• A lot of coding, but most of the design is already done for you. It should be fun!

Page 23: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Course Plan• Draw something first

• Then make them look pretty or make them move really fast!

• Some 3D models from Internet:– http://www.3drender.com/challenges/index.htm

Page 24: CSU0021 Computer Graphics © Chun-Fa Chang CSU0021 Computer Graphics September 10, 2014

CSU0021 Computer Graphics© Chun-Fa Chang

Some Advices

• This course involves a lot of programming in C or C++.

• Do not take this course if:– You are not confident about your

programming skill– The ideal time is during your junior or

senior year. (The same course will be offered again next year.)