Slide 1AdminMathDisplay technologiesRendering pipelineSlide 6TransformationsSlide 8OpenGLClippingRasterizationColorThe Human Visual SystemSlide 14Slide 15MetamersSlide 17Slide 18Slide 19Slide 20LightingPhong Lighting: OpenGL ImplementationVisibility in the smallVisibility in the largeTexture mappingModern GPUsGPGPURay tracingAntialiasingLODShadowsCS 445: Introduction to Computer GraphicsDavid LuebkeUniversity of VirginiaReviewAdminCourse evaluations: please do during class today (available on Toolkit)MathMathematical foundations–Vector arithmetic –Affine spaces: points, vectors, scalars–Parametric representation of a line/ray/segment–Dot product, cross product–Matrix-matrix and matrix-vector arithmeticDisplay technologiesCRTs–Underlying technology–Vector vs. raster–Framebuffer, pixel, scanline, rasterizeLCDs–Underlying technology–Pros & consOther – don’t need to know details–Plasma display–OLEDRendering pipelineKnow the various stages:–TransformsModelingCameraProjection–Illuminate–Clip–Homogeneous divide–RasterizeBe able to reason about which stages go whereTransformationsModeling transforms–Objectworld coords–Common xforms:TranslateRotateScale (uniform vs. nonuniform)–Composing xformsMultiplying matrices – know the correct order!Be able to compose a rotation matrix about an arbitrary axisBe able to compose rotation & translation matricesTransformationsHomogeneous coordinates–Homogeneous coordinate akin to a scale factor–Homogeneous points vs. vectors–Enables translation, projectionProjection transforms–Uses the homogeneous coordinate–Be ready to reason about simple projection xformsOpenGLSpecifying transforms–Understand how to use the matrix stacksGL_MODELVIEWGL_PROJECTION–Understand the principles of hierarchical transformsNest xformsFunctions shouldn’t have side effects–Understand the concept of a scene graphClipping2D: Cohen-Sutherland–Outcodes & how to use them–Clipping a line segment to an edge3D: Sutherland-HodgemanClipping in the graphics pipelineRasterizationLine rasterization–DDA–Optimization strategiesTriangle rasterization–Edge walking–Edge equationsPolygon rasterization–Parity test–Active edge tableColorPhysiology of the eye–Cornea, lens, retina–PhotoreceptorsRods (low light, luminance) vs. cones (high light levels, color)Color-sensitivity of cones: S, M, L (B, G, R)Density: fovea (high spatial resolution, all cones) vs. periphery (low spatial resolution, largely rods)–Metamers: different spectra with the same perceptual responseE.g., a monochromatic orange light (spectral spike) vs. combinations of red, green, tiny bit of blue: same perceived color!–Color gamuts and CIE chromaticity diagramThe Human Visual SystemThe human visual system has four types of sensors: rods and S, M, and L conesνν110.10.10.010.011010100100rodsrodsconesconesLLMMSSsensitivitysensitivityCourtesy Nathaniel HoffmanRods are the most sensitive–Used in weak illumination (scotopic) conditions–Sensitivity peaks at cyan (blue-green)–Only one kind: monochromatic visionCones enable color vision–Used in strong illumination (photopic) conditions–Total sensitivity peaks at yellow-green–Three kinds: trichromatic vision The Human Visual SystemCourtesy Nathaniel HoffmanThe Human Visual SystemTrichromatic vision enables us to somewhat sense the spectral distributionνν0.50.50.250.2511LLMMSSsensitivitysensitivity0.10.1Courtesy Nathaniel HoffmanMetamersA spectral power distribution is an infinite-dimensional signal.Since we perceive color only as a three-dimensional signal, there is an infinite number of different spectral power distributions which map onto the same perceived color. These are known as metamers.Courtesy Nathaniel HoffmanMetamers700nm600nm500nm400nm470nm480nmwhitespectrallocusmore bluemore redmore greenmore yellowCourtesy Nathaniel HoffmanMetamers700nm600nm500nm400nm470nm480nmwhitespectrallocusmore bluemore redmore greenmore yellowCourtesy Nathaniel HoffmanMetamers700nm600nm500nm400nm470nm480nmwhitespectrallocusmore bluemore redmore greenmore yellowCourtesy Nathaniel HoffmanMetamers700nm600nm500nm400nm470nm480nmwhitespectrallocusmore bluemore redmore greenmore yellowCourtesy Nathaniel HoffmanLightingIllumination models–Global vs. local illumination models–Empirical vs. physically based Know and understand the Phong model: –Local, empirical, implemented in OpenGL–Ambient, diffuse, and specular termsShading: flat vs. smooth (Gouraud) vs. PhongPhong Lighting:OpenGL ImplementationThe final Phong model as we studied it:OpenGL variations:–Every light has an ambient component–Surfaces can have “emissive” component to simulate glowAdded directly to the visible reflected intensityNot actually a light source (does not illuminate other surfaces) lightsinsdiambie ntatotalshinyRVkLNkIIkI#1ˆˆˆˆ( ) ( )#1ˆ ˆ ˆ ˆshinylightsntotal e a a d d s siI k I k I k N L I k V R== + + + � + ��Visibility in the smallPainter’s algorithmZ-bufferBSP trees: organize all of space (hence partition) into a binary tree–Preprocess: overlay a binary tree on objects in the scene–Runtime: correctly traversing this tree enumerates objects from back to front–Idea: divide space recursively into half-spaces by choosing splitting planesSplitting planes can be arbitrarily orientedNotice: nodes are always convexVisibility in the largeView-frustum cullingCells & portals (architectural/urban models)–Cells form the basic unit of PVS–Create an adjacency graph of cells–Starting with cell containing eyepoint, traverse graph, rendering visible cells –A cell is only visible if it can be seen through a sequence of portalsSo cell visibility reduces to testing portal sequences for a line of sight…Occlusion query (modern hardware)Texture mappingEstablishing correspondences (parameterization): texture coordinatesInterpolating texture coordinates in screen space during rasterizationTexture map antialiasing: –know MIP-mapping, be aware of others–Related to antialiasing subject: prefilteringApplications of texture mapping:–Bump mapping, gloss mapping, displacement mapping, light mappingModern GPUsProgrammable GPUs–Programmable vertex & fragment engines–Render
View Full Document