Introduction to Computer Graphics
Introduction to Computer Graphics CMPS 160
Popular in Course
Popular in ComputerScienence
This 16 page Class Notes was uploaded by Dr. Elyssa Ratke on Monday September 7, 2015. The Class Notes belongs to CMPS 160 at University of California - Santa Cruz taught by Staff in Fall. Since its upload, it has received 67 views. For similar materials see /class/182280/cmps-160-university-of-california-santa-cruz in ComputerScienence at University of California - Santa Cruz.
Reviews for Introduction to Computer Graphics
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/07/15
Displays CRTs Raster scan vs vector scan Gamma gamma correction Line drawing rasterization n Line equato Bresenham s Line Algorithm Convex vs concave polygons Testing convexity 2D Transformations Vector representation of a point Matrix translation rotation scaling Homogeneous coordina es Composing a string of transformations Concept of changing coordinate systems 3D Transformation 3D rotation around a line as RXRyRZ Matrix translation rotation scaling Matrix stacks Object coordinates vs world coordinates Modeview ma rx Camera transform duality with object transform Hierarchical transforms Viewing and Perspective Orthographic vs perspective World coordinates vs screen coordinates View frustum Near and far clipping planes Oblique parallel projection Concept of oblique perspective projection Viewing pipeline object gt world gt normalized gt screen Visibility Back face detection Z buffer Depthbuffer Abuffer list of depths Abuffer openGL accumulation buffer BSP trees Screen space sort vs object space sort Color models Electromagnetic spectrum Spectral colors Color matching functions ClE chromaticity diagram RGB space HS V space Raytracing Basic algorithm Shadow rays Reflectedrefracted rays Antialiasing by supersampling Distributed ray tracing for estimating integrals Octtrees Lighting shading CMPS 160 7 Spring 2005 Your nal will be in our classroom Tue June 7Lh 730pm1030pm The nal is openbooldnotes Imight well ask you how to compute some matrix for example I wouldn t expect you to have the form of a rotation matrix memorized thus you can use your book A list of topics we covered is below Displays CRTs LCDs Raster scan vs vector scan Gamma gamma correction Line drawing rasterization Line equation Bresenham s Line Algorithm Convex vs concave polygons Testing convexity 2D Transformations Vector representation of a point Matrix translation rotation scaling Homogeneous coordinates Composing a string of transformations Concept of changing coordinate systems 3D Transformation rotation around a line as RnyRz Matrix translation rotation scaling Matrix stacks Object coordinates vs world coordinates Modeview ma rix Camera transform duality with object transform Hierarchical transforms Viewing and Perspective Orthographic vs perspective World coordinates vs screen coordinates View frustum Near and far clipping planes Oblique parallel projection Concept of oblique perspective projection Viewing pipeline object gt world gt normalized gt screen Visibility Back face detection Zbuffer Depthbuffer Abuffer list of depths Abuffer openGL accumulation buffer BSP trees Screen space sort vs object space sort Lighting shading OpenGL ambientdiffusespecular lighting model Phong specular reflection vs Phong shading Gouraud vs Phong shading Sampling theory Introduction to 3D in XNA Game Design Experience Professor Jim Whitehead February 27 2009 Announcements Partially operational game prototype gt Due today Can turn in to box by my office door by 5pm gt Submit on CDROM USB Drive or URL to Subversion project Project progress report gt Due Monday gt Take your project work breakdown and schedule done previously Update this schedule based on your now improved understanding of what still needs to be done Cut project scope if necessary Remember you have assignments due in other classes too Announcements 3D modeling homework p Assignment text not yet on web gt Will be up soon gt Due Monday March 9 p Assignment will involve Create a simple 3D model eg in Blender Something slightly but not by much more complex than a cube will be fine Make this model show up in XNA Extra credit for making model rotate applying bitmap textures Goal is to exercise a model import pathway p Intended to be a straightfonNard assignment 2D to 3D Many current games use 3D graphics p Much more complex than 2D graphics p This course will provide a basic overview of 3D graphics CMPS 160 161 164 provide greater depth r 1 iii iii A 5 ill ill a 39 Ratchet and Clank Future 33D Camera me computer Desktop Encyclopedia wus lmerglaph Computer Syszems Analogy gt 2D is like putting stickers on a page Place sticker sprite at xy coordinate If a sticker is placed at 5050 you see it gt 3D is like recording a video with a camera What is recorded shown on screen is what viewing a camera sees frustrum viewplane V i ewpoim Can have objects in a scene that aren t visible Can have 3D object at 505050 but if camera is pointing in the opposite direction won t see it Introduces rotation Camera can potentially be rotated around all 3 axes Objects can also be rotated around 3 axes Affects what shows up on screen Roll Pitch 3D Coordinate System 3D graphics requires use of xyz coordinates So which direction is positive 2 gt Is it back away from you or towards you gt Either choice would work need to pick one Right handed vs left handed coordinate systems gt XNA uses right handed coordinate system Place hands palms up gt Point fingers in direction of positive X gt Curl fingers in direction of positive Y gt Thumb is pointing in direction of positive Z Lefthanded Righthanded Cartesian Coordinates Cartesian Coordinates Y Y Z X X 2 Cw Righthanded coordinate system Camera Camera is comprised of two Matrix objects gt View matrix holds information on Location of camera in world Camera direction Camera orientation p Projection matrix holds information on View angle Aspect ratio Near and far plane Orientation Matrix Structure XNA provides a Matrix structure A 4x4 matrix in row vector layout Row vector matrices view vectors as a row from left to right column vector matrices view vectors as a column from top to bottom Builtin matrix operations 11 11 Also convenience matrices Identity Up Down Left Right Large number of convenience methods Rotations views into 3D world determinants invert Vector3 Structure Represents either gt An X Y Z coordinate or O XMZ coordinate gt Distances along X Y Z coordinates eg a vector y Often a unit vector xyz vector all values between 0 and 1 X gt X Y Z properties floats Builtin operators p Convenience vectors gt UnitX UnitY UnitZ Up Down Left Right Many convenience methods gt lnterpolations rotations distance dot product normalization Creating an XNA Camera View Matrix View matrix gt Use CreateLookAt method of Matrix structure p Parameters all Vector3 cameraPosition location of camera xyz cameraTarget coordinate of point where camera is looking cameraUpVector vector indicating up position Creating an XNA Camera Projection Matrix Projection Matrix gt Use CreatePerspectiveFieldOfView method gt Parameters all floats fieldOfView angle of camera view in radians Typically 45degrees pi2 radians aspectRatio Typically width of screen divided by height of screen nearPlaneDistance Distance from camera to near viewing plane Objects between camera and near plane are not shown farPlaneDistance Distance from camera to far viewing plane Objects beyond far plane are not shown Camera Drawing Triangles All complex 3D shapes seen in games are composed of a series of triangles p A triangle has 3 points one for each corner Points are more typically known as verticies Minimum number of points to unambiguously define a plane VertexPositionCoIor object p Represents the xyz location of a vertex p Also has a color for the vertex gt VertexPositionCoIor v new VertexPositionCoIornew Vector30l0 ColorBlue gt Need 3 verticies to draw a triangle Vertex Declaration XNA requires you to tell the graphics device what kind of vertex data you will be using Unclear why XNA can tjust figure this out or handle multiple types seamlessly p Probably due to structure of DirectX API or capabilities of graphics hardware gt For now treat as a mustdo black box gt Put following in your main derived from Game class gt GraphicsDeviceVertextDecaration new VertexDecIarationGrahpicsDevice VertexPositionColorVertexEements l Actually drawing the triangles In XNA all 3D rendering is handled by a shader p Shaders defined using High Level Shader Language HLSL Permits creation of wide range of visual effects p More on shaders in a few classes XNA provides a default shader p Called BasicEffect gt Will use this for now BasicEffect is a type of effect gt Effects contain a series of EffectPass p Each pass handles some aspect of putting things on screen
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'