introduction to cg

Upload: nidhi-purohit

Post on 04-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Introduction to CG

    1/67

    Introduction to

    Computer Graphics

    CS 351

  • 8/13/2019 Introduction to CG

    2/67

    Introduction to CG Computer Graphics involves creation,

    display, manipulation and storage of picturesand experimental data for propervisualization using a computer

    Typical graphics system comprises of a hostcomputer with support of fast processor,large memory, frame buffer and

    Display Devices(monitors)

    Input Devices(mouse, keyboard, joystick, touchscreen, digital pen, trackball)

    Output devices(LCD, laser & color printers,Plotters)

    Interfacing Devices(Video I/O, TV interfaces, etc)

  • 8/13/2019 Introduction to CG

    3/67

    Conceptual Framework for

    Interactive GraphicsApplicationModel

    ApplicationProgram

    GraphicsSystem

    OutputDevice(Monitor)

    InputDevices(Keyb

    oard)

  • 8/13/2019 Introduction to CG

    4/67

    What drives computer graphics? Typical Applications of Computer Graphics

    Graphic al User Interfaces (GUI) interface orprogram that sits between user and graphicsapplication program.

    Typical Components used in GUI MENUS

    ICONS

    CURSORS

    DIALOG BOXES SCROLL BARS

    BUTTONS

    SKETCHING

    3-D INTERFACESSlide information from Leonard McMillian's slideshttp://www.cs.unc.edu/~mcmillan/comp136/Lecture1/compgraf.html

  • 8/13/2019 Introduction to CG

    5/67

    Example of a GUI available inAdobe Acrobat Reader

  • 8/13/2019 Introduction to CG

    6/67

    Other Typical applications of CG Business Plotting Office Automation

    Desktop publishing

    Plotting in Science and Technology Web/Business/Commercial publishing and

    advertisements

    Engineering ApplicationsCAD/CAMDesign(Ex- VLSI, Constructions, Circuits)

    Scientific Visualization(Effects of bombs,biological simulations, etc)

    Cartography

  • 8/13/2019 Introduction to CG

    7/67

    Other Typical applications of CG

    Simulations & Simulators

    Multimedia

    Virtual Reality Process Monitoring(Ex- Chemical Process,

    Sensors, Circuits)

    Digital Image Processing

    Educational and Training

  • 8/13/2019 Introduction to CG

    8/67

  • 8/13/2019 Introduction to CG

    9/67

    What drives computer graphics?

    Movie Industry

    Leaders in quality and artistry

    Not slaves to conceptual purity

    Big budgets and tight schedules

    Reminder that there is more toCG than technology

    Hey, How'd they do that?

    Defines our expectations

    Slide information from Leonard McMillian's slideshttp://www.cs.unc.edu/~mcmillan/comp136/Lecture1/compgraf.html

  • 8/13/2019 Introduction to CG

    10/67

    What drives computer graphics? Game Industry

    The newest driving force in CG Why? Volume and Profit

    This is why we have commodity GPUs

    Focus on interactivity

    Cost effective solutions Avoiding computating and other tricks

    Games drive the baseline

    Slide information from Leonard McMillian's slideshttp://www.cs.unc.edu/~mcmillan/comp136/Lecture1/compgraf.html

  • 8/13/2019 Introduction to CG

    11/67

    What drives computer graphics?

    Medical Imaging and Scientific Visualization Tools for teaching and diagnosis

    No cheating or tricks allowed

    New data representations and modalities

    Drive issues of precision and correctness Focus on presentation and interpretation of data

    Construction of models from acquired data

    Nanomanipulator, UNCJoe Kniss, Utah Gordon Kindelman, Utah

  • 8/13/2019 Introduction to CG

    12/67

    What drives computer graphics?

    Computer Aided Design Mechanical, Electronic, Architecture,...

    Drives the high end of the hardware market

    Integration of computing and display resources

    Reduced design cyles == faster systems, sooner

    ProEngineer, www.ptc.com

  • 8/13/2019 Introduction to CG

    13/67

    Various application packages and

    standards available Core Graphics

    GKS

    SRGP PHIGS, SPHIGS and PEX 3D

    OpenGL(with ActiveX and Direct 3D)

    X11- based systems(OpenGL on Linux)

  • 8/13/2019 Introduction to CG

    14/67

    GKSGraphics Kernel System

    By ISO(International StandardsOrganizations) & ANSI(American NationalStandards Institute)

    Replaced by SRGPSimple RasterGraphics Package

    Replaced by PHIGSProgrammersHierarchical Interactive Graphics System

    Replaced by OpenGL(Open GraphicsLibrary)

  • 8/13/2019 Introduction to CG

    15/67

    How to use OpenGL

    Download Device Drivers, Library files,Header files of OpenGL for correspondingsystems i.e. either windows or Linux and

    Display Adapter card that is used. Once you have compiler on top of Visual

    Environment like .net in windows system ornew environment based on X11 for Linux,

    you will be able to write your own graphicsprograms on OpenGL .

  • 8/13/2019 Introduction to CG

    16/67

    Tools, Utilities and Compilers

    Various utilities and tools available for web-based design includes: JAVA, XML,VRML(Virtual Reality Modeling Language)and GIF animators.

    Certain compilers, such as Visual C/C++,Visual Basic, Borland C/C++. BorlandPascal, Turbo C, Turbo Pascal, Gnu C/C++,JAVA provide their own graphical libraries,

    APIs, support and help for programming 2-Dand 3-D graphics.

    Some of these systems are device-independent (OpenGL, X11) and device-dependent(Solaris, HP-AGL)

  • 8/13/2019 Introduction to CG

    17/67

    Four Basic output primitives(or

    elements) for drawing pictures Polylines ((x1,y1), (x2,y2).. (xn,yn) )

    Filled Polygons

    Ellispe(arc) (circle is a special case of ellipse) Text

    Raster Image (digital images of JPEG, JPG,GIF, BITMAP ,etc format)

  • 8/13/2019 Introduction to CG

    18/67

    Four Major Areas of ComputerGraphics

    Display of Information

    Design/ Modeling

    Simulation and User Interfaces

  • 8/13/2019 Introduction to CG

    19/67

    Active and Passive GraphicsSystem

    CG Systems could be active or passive

    In both cases, the input to the system is thescene description and output is a static oranimated scene to be displayed

    In case of active systems, the user controlsthe display with the help of a GUI, using aninput device(Ex- Video Games)

    In passive systems no control overdisplay(Ex- TV)

  • 8/13/2019 Introduction to CG

    20/67

    Various Fundamental Conceptsand Principles in CG

    Display Systems

    Storage displays, Random scan, Raster refreshdisplays, CRT basics, video basics, Flat panel

    displays TransformationsManipulating objects

    Affine Transformations(2-D & 3-D) : Rotation,Translation, Scale, Reflection and Shear.

    Viewing Transformation : The CameraTransformation sperspective, orthographic,isometric and stereographic views, Quaternion

  • 8/13/2019 Introduction to CG

    21/67

    Scan Conversion and Clipping

    Drawing of Points, Lines, Markers, Curves,

    Circles, Ellipse, Polyline, Polygon, Area filling, fillstyle, fill pattern, clipping algorithms, anti-aliasingetc.

    Hidden Surface Removal

    Back face culling, Painters Algorithm, scan-linealgorithm, BSP-trees, Z-buffering/sorting, Raytracing etc.

    Shading & illumination

    Phongs shading model, texture mapping, bumpmapping, Gouraud shading, shadows andbackgroud, color models etc.

  • 8/13/2019 Introduction to CG

    22/67

    Curves and Surfaces

    Bezier Curves, B-Splines, Cubic-Splines,Quadratic surfaces, parametric and non-

    paramertic forms, hermite curves etc.

  • 8/13/2019 Introduction to CG

    23/67

    What is Computer Graphics?

    Look at 5 areas

    Hardware

    Rendering

    Interaction

    Modeling

    Scientific Visualization

    Slide information from Richard Riesenfeld

  • 8/13/2019 Introduction to CG

    24/67

    Hardware: Amazing Changes

    Fundamental architecture shift

    Dual computing engines:

    CPU and GPU

    More in GPU than CPU

  • 8/13/2019 Introduction to CG

    25/67

    Hardware: Amazing Changes

    Fast, cheap GPUs

    ~$300

    Cheap memory

    Displays at low cost

    How many monitors do you have/use?

  • 8/13/2019 Introduction to CG

    26/67

    Hardware: Amazing Changes

    Wired -> Unwired

    World of Access

  • 8/13/2019 Introduction to CG

    27/67

    Hardware... some not so good

    Devices

    3D displays

    Etc

  • 8/13/2019 Introduction to CG

    28/67

    Hardware

    How old is Nvidia

    How big is Nvidia

    QED

  • 8/13/2019 Introduction to CG

    29/67

    Rendering

    Many think/thoughtgraphicssynonymouswith rendering

    Well researched

    Working on second and third order effects

    Fundamentals largely in place

  • 8/13/2019 Introduction to CG

    30/67

    Rendering

    Major areas:

    Ealiest: PhotoRealism

    Recent: Non-Photorealistic Graphics (NPR)

    Recent: Image-based Rendering (IBR)

  • 8/13/2019 Introduction to CG

    31/67

  • 8/13/2019 Introduction to CG

    32/67

  • 8/13/2019 Introduction to CG

    33/67

    Rendering Realism

    Cornel Measurement Lab

  • 8/13/2019 Introduction to CG

    34/67

    Rendering Realism

    Real Synthetic

    Shirley, et. al., cornell

  • 8/13/2019 Introduction to CG

    35/67

    Is this real?

    m fajaro, usc

  • 8/13/2019 Introduction to CG

    36/67

  • 8/13/2019 Introduction to CG

    37/67

    Growth Models

    o deusson,

  • 8/13/2019 Introduction to CG

    38/67

    Rendering/Modeling Hair

    http://www.rhythm.com/~ivan/hairRender.html

    QuickTime and aPhoto decompressor

    are needed to s ee this picture.

    QuickTime and a

    Video d ecompressorare needed to s ee this picture.

    H

  • 8/13/2019 Introduction to CG

    39/67

    Humans

    Final Fantasy (Sony) Jensen et al.

  • 8/13/2019 Introduction to CG

    40/67

    Is Photorealism Everything?

  • 8/13/2019 Introduction to CG

    41/67

    Is Photorealism Everything?

  • 8/13/2019 Introduction to CG

    42/67

    Non-Photorealistic Rendering

    b gooch, et.al., utah

  • 8/13/2019 Introduction to CG

    43/67

    Tone Shading

    a gooch, et. al., utah

  • 8/13/2019 Introduction to CG

    44/67

    NonPhotorealistic Rendering

  • 8/13/2019 Introduction to CG

    45/67

  • 8/13/2019 Introduction to CG

    46/67

    3D Scene Capture

    Fuchs et.al., UNCUNC and UVA

  • 8/13/2019 Introduction to CG

    47/67

    3D Scene Recreation

    Faugeras et. al

  • 8/13/2019 Introduction to CG

    48/67

    360oScan

    p willemsen, et. al., utah

  • 8/13/2019 Introduction to CG

    49/67

  • 8/13/2019 Introduction to CG

    50/67

    Interaction still needs...

    Better inputdevices

    Better outputdevices

    Better interaction paradigms Better understanding of HCI

    Bring in psychologists

  • 8/13/2019 Introduction to CG

    51/67

    Modeling

    Many model reps

    Bezier, B-spline, box splines, simplex splines,polyhedral splines, quadrics, super-quadrics,

    implicit, parametric, subdivision, fractal, levelsets, etc (not to mention polygonal)

  • 8/13/2019 Introduction to CG

    52/67

  • 8/13/2019 Introduction to CG

    53/67

    Modeling... is hard

    Complexity

    Shape

    Specifying Realistic constraints

    Detail vs concept

    Tedious, slow

    s drake, et. al., utah

  • 8/13/2019 Introduction to CG

    54/67

    Modeling is hard

    Mathematical challenge

    Computational challenge

    Interaction challenge Display challenge (want 3D)

    Domain knowledge, constraints

  • 8/13/2019 Introduction to CG

    55/67

    Growth Models

    o deusson,

  • 8/13/2019 Introduction to CG

    56/67

  • 8/13/2019 Introduction to CG

    57/67

    Models

    D Johnson andJ D St Germain, Utah

    Russ Fish et al., Utah

  • 8/13/2019 Introduction to CG

    58/67

    Scientific Visualization

    Johnson et al., UtahNational Library of Medicine

    Visual Human

    QuickTime and a

    YUV420 codec decompressorare needed to see this picture.

  • 8/13/2019 Introduction to CG

    59/67

    In This Class

    Review rasterization, modeling, viewing,lighting, texture mapping and raytracing

    GUI and Interaction in three-dimensions

  • 8/13/2019 Introduction to CG

    60/67

    Required Books

    Optional

  • 8/13/2019 Introduction to CG

    61/67

    Each class

    Based-upon reading assignment

    Quiz

    Roundtable:

    What you found to be the most interesting in thereading

    What confused you or topic(s) you want morediscussion on

  • 8/13/2019 Introduction to CG

    62/67

    Each class (cont.)

    Lecture and discussion

    20 minute or less viewing of an animation

    Project discussion and help session

    At least one 15 minute break in the middle

  • 8/13/2019 Introduction to CG

    63/67

    Projects

    C or C++

    Chinese-Resturaunt menu like

  • 8/13/2019 Introduction to CG

    64/67

    Project Rules

    Failure to follow these rules will result in lostpoints:

    If you use code from elsewhere, it must be

    documented in your README If you use ideas from printed paper or online

    material, must credit it

    Projects must compile and run on thedesignated machine

  • 8/13/2019 Introduction to CG

    65/67

    Grades

    Class participation

    Quizes

    Late projects loose 5% on first 12 hours, 10%every 12 hours after that

    You can miss

    Can drop lowest quiz score

    Can miss one class without loosing participationpoints

  • 8/13/2019 Introduction to CG

    66/67

  • 8/13/2019 Introduction to CG

    67/67

    What is Computer Graphics?

    Creation, Manipulation, and Storage ofgeometric objects (modeling) and theirimages (rendering)

    Display those images on screens orhardcopy devices

    Image processing

    Others: GUI, Haptics, Displays (VR)...