Computer Graphics

caig.cs.nctu.edu.tw

Computer Graphics

Example◦ Where did this image come from?◦ What hardware/software did we need toproduce it?


Preliminary Answer◦ Application: The object is an artist’s renditionof the sun for an animation to be shown in adomed environment (planetarium)◦ Software: Maya for modeling and renderingbut Maya is built on top of OpenGL◦ Hardware: PC with graphics card for modelingand rendering


Basic Graphics SystemOutput deviceInput devicesImage formed in FB


Computer Graphics: 1950-1960◦ Computer graphics goes back to the earliestdays of computing• Strip charts• Pen plotters• Simple displays using A/D converters to go fromcomputer to calligraphic CRT◦ Cost of refresh for CRT too high• Computers slow, expensive, unreliable


Computer Graphics: 1960-1970◦ Wireframe graphics• Draw only lines◦ Sketchpad◦ Display Processors◦ Storage tubewireframe representation of sun object


Sketchpad◦ Ivan Sutherland’s PhD thesis at MIT• Recognized the potential of man-machine interaction.• Sutherland also created many of the now commonalgorithms for computer graphicsIvan Sutherland,Turing Award winner, 1988The console of the TX-2,Sketchpad Project


Computer Graphics: 1970-1980◦ Raster Graphics• Image produced as an array (the raster) of pictureelements (pixels) in the frame buffer• Allows us to go from lines and wire frame images tofilled polygons


Computer Graphics: 1980-1990◦ Realism comes to computer graphicssmooth shadingenvironmentmappingbump mapping


Computer Graphics: 1980-1990◦ Special purpose hardware• Silicon Graphics geometry engine◦ VLSI implementation of graphics pipeline◦ Industry-based standards• PHIGS◦ Programmer's Hierarchical Interactive Graphics System• RenderMan◦ Networked graphics: X Window System◦ Human-Computer Interface (HCI)


Computer Graphics: 1990-2000◦ OpenGL API◦ Completely computer-generatedfeature-length movies (Toy Story)are successful.◦ New hardware capabilities• Texture mapping• Blending• Stencil buffers, …


Computer Graphics: 2000-◦ Photorealism◦ Graphics cards for PCs dominate market• Nvidia, ATI, 3DLabs• GPU (Graphics processing unit)◦ Game boxes and game players determinedirection of market◦ Computer graphics routine in movie industry:Maya, Lightwave◦ Programmable pipelines


Light & Image◦ Objects◦ Viewer◦ Light source(s)◦ Attributes that govern how light interacts with thematerials in the scene◦ Note the independence of the objects, the viewer,and the light source(s)


Light◦ Light is the part of the electromagnetic spectrum thatcauses a reaction in our visual systems◦ Generally these are wavelengths in the range of about350-750 nm (nanometers)


Three-Color Theory◦ Human visual system has two types ofsensors• Rods: monochromatic, night vision• Cones◦ Color sensitive◦ Three types of cones◦ Only three values (the tristimulusvalues) are sent to the brain◦ Need only match these three values• Need only three primary colors


Additive and Subtractive Color◦ Additive color• Form a color by adding amounts ofthree primaries◦ CRTs, projection systems, positivefilm• Primaries: Red (R), Green (G), Blue (B)• Subtractive color• Form a color by filtering white lightwith:◦ Cyan (C), Magenta (M), and Yellow(Y) filters◦ Printing, Negative film


RGB & CMYK color model⎡ C⎢⎢M⎢⎣Y⎤⎥⎥⎥⎦=⎡1⎤⎢ ⎥⎢1⎥⎢⎣1⎥⎦−⎡R⎤⎢ ⎥⎢G⎥⎢⎣B⎥⎦K = min (C, M, Y)C = C – KM = M – KY = Y - KCyan = min (1, max(0, C - U(K))Magenta = min (1, max(0, M - U(K))Yellow = min (1, max(0,Y - U(K))Black = min (1, max(0, BK(K))


Basic 3D Graphics


What’s 3D?◦ How about thesepictures?


What’s 3D?◦ Is this correct?


Vanish point


Perspective projection◦ Taking photographing as an example.


Synthetic Camera Modelprojectorpimage planeprojection of pcenter of projection


Perspective projection (cont.)◦ Projection


Perspective projection (cont.)◦ Let pupils as the pinhole and a screen asthe film.


Generating perspective views◦ From the continuous world to a digital one.◦ Representing by surfaces?


Represented by primitives◦ Curves and surfaces are inefficient torender directly.


Represented by primitives (cont.)◦ We use primitives such as polygons instead.


Represented by primitives◦ Polygons


Represented by primitivesDigital Michelangelo Project, Stanford University


Represented by primitives (cont.)◦ A triangle is usually the most basicprimitive.◦ Polygons -> triangles.


Projection of trianglesADA’D’CBfocusC’B’Projection plane


Visibility◦ If we draw triangles directly, ourscreen will be a “mess”.◦ Remove hidden surfaces.


A realistic 3D view◦ Delicate 3D models.◦ Perspective.◦ Hidden surface removal.◦ Shading (lighting & reflection).◦ Shadow.◦ Detailed textures and normalsPixar corp.B. Martin, U. Utah


How to synthesize a view?◦ How to represent a object?◦ How to make the scene “move”?◦ How to display a 3D scene on screen?◦ How to efficiently simulate lighting effects?

More magazines by this user
Similar magazines