Advanced Computer Graphics (Fall 2009)MotivationReal-Time RenderingEvolution of 3D graphics renderingOffline 3D Graphics RenderingNew Trend: Acquired Data10 years agoTodayGoalsOutlineHigh quality real-time renderingSlide 12Slide 13Programmable Graphics HardwarePrecomputation-Based MethodsRelit ImagesVideo: Real-Time RelightingInteractive RayTracingSlide 19Basic Hardware PipelineGeometry or Vertex PipelinePixel or Fragment PipelineShading LanguagesShader SetupSlide 25Slide 26Slide 27Shadow and Environment MapsCommon Real-time Shadow TechniquesProblemsShadow MappingPhase 1: Render from LightSlide 33Phase 2: Render from EyePhase 2+: Project to light for shadowsSlide 36Visualizing Shadow MappingSlide 38Visualizing Shadow MappingSlide 40Slide 41Slide 42Slide 43Hardware Shadow Map FilteringSlide 45Problems with shadow mapsSlide 47Reflection MapsEnvironment MapsSlide 50Slide 51Reflectance MapsIrradiance Environment MapsAssumptionsDiffuse ReflectionAnalytic Irradiance Formula9 Parameter ApproximationSlide 58Slide 59Slide 60Environment Map SummaryResourcesAdvanced Computer Graphics Advanced Computer Graphics (Fall 2009)(Fall 2009)CS 294, Rendering Lecture 7: High Quality Real-Time RenderingRavi Ramamoorthihttp://inst.eecs.berkeley.edu/~cs294-13/fa09MotivationMotivationToday, we create photorealistic computer graphicsComplex geometry, realistic lighting, materials, shadowsComputer-generated movies/special effects (difficult to tell real from rendered…)But algorithms are very slow (hours to days)Real-Time RenderingReal-Time RenderingGoal is interactive rendering. Critical in many appsGames, visualization, computer-aided design, …So far, focus on complex geometryChasm between interactivity, realismEvolution of 3D graphics renderingEvolution of 3D graphics renderingInteractive 3D graphics pipeline as in OpenGLEarliest SGI machines (Clark 82) to todayMost of focus on more geometry, texture mapping Some tweaks for realism (shadow mapping, accum. buffer)SGI Reality Engine 93(Kurt Akeley)Offline 3D Graphics RenderingOffline 3D Graphics RenderingRay tracing, radiosity, global illuminationHigh realism (global illum, shadows, refraction, lighting,..)But historically very slow techniques“So, while you and your children’s children are waiting for ray tracing to take over the world, what do you do in the meantime?” Real-Time Rendering 1st ed.Pictures courtesy Henrik Wann JensenNew Trend: Acquired DataNew Trend: Acquired DataImage-Based Rendering: Real/precomputed images as inputAlso, acquire geometry, lighting, materials from real worldEasy to obtain or precompute lots of high quality data. But how do we represent and reuse this for (real-time) rendering?10 years ago10 years agoHigh quality rendering: ray tracing, global illum., image-based rendering (This is what a rendering course would cover)Real-Time rendering: Interactive 3D geometry with simple texture mapping, maybe fake shadows (OpenGL, DirectX)Complex environment lighting, real materials (velvet, satin, paints), soft shadows, caustics often omitted in bothRealism, interactivity at cross purposesTodayTodayVast increase in CPU power, modern instrs (SSE, Multi-Core)Real-time raytracing techniques are possible4th generation of graphics hardware is programmable(First 3 gens were wireframe, shaded, textured)Modern nVidia, ATI cards allow vertex, fragment shadersGreat deal of current work on acquiring and rendering with realistic lighting, materials… [Especially at Berkeley]Focus on quality of rendering, not quantity of polygons, textureGoalsGoalsOverview of basic techniques for high-quality real-time renderingSurvey of important concepts and ideas, but do not go into details of writing codeSome pointers to resources, others on webOne possibility for assignment 2, will need to think about some ideas on your ownOutlineOutlineMotivation and DemosProgrammable Graphics PipelineShadow MapsEnvironment MappingHigh quality real-time renderingHigh quality real-time renderingPhotorealism, not just more polygonsNatural lighting, materials, shadows Interiors by architect Frank Gehry. Note rich lighting, ranging from localized sources to reflections off vast sheets of glass.High quality real-time renderingHigh quality real-time renderingPhotorealism, not just more polygonsNatural lighting, materials, shadows Real materials diverse and not easy to represent by simple parameteric models. Want to support measured reflectance. Glass VaseGlass Star (courtesy Intel)Peacock featherHigh quality real-time renderingHigh quality real-time renderingPhotorealism, not just more polygonsNatural lighting, materials, shadowsNatural lighting creates a mix of soft diffuse and hard shadows. Agrawala et al. 00small area light, sharp shadowssoft and hard shadowsNg et al. 03Programmable Graphics HardwareProgrammable Graphics HardwarePrecomputation-Based MethodsPrecomputation-Based MethodsStatic geometry Precomputation Real-Time Rendering (relight all-frequency effects)Involves sophisticated representations, algorithmsRelit ImagesRelit ImagesNg, Ramamoorthi, Hanrahan 04Video: Real-Time RelightingVideo: Real-Time RelightingFollowed by demo with real-time relighting with causticsInteractive RayTracingInteractive RayTracingAdvantagesVery complex scenes relatively easy (hierarchical bbox)Complex materials and shading for free Easy to add global illumination, specularities etc.DisadvantagesHard to access data in memory-coherent wayMany samples for complex lighting and materials Global illumination possible but expensiveModern developments: Leverage power of modern CPUs, develop cache-aware, parallel implementationsDemo http://www.youtube.com/watch?v=blfxI1cVOzUOutlineOutlineMotivation and DemosProgrammable Graphics PipelineShadow MapsEnvironment MappingBasic Hardware PipelineBasic Hardware PipelineApplicationGeometryRasterizerCPUGPUCreate geometry, lights, materials, textures, cubemaps, … as inputsTransform and lighting calcs.Apply per-vertex operationsTextures, CubemapsPer-pixel (per-fragment)operationsGeometry or Vertex PipelineGeometry or Vertex PipelineModel, ViewTransformLightingProjection Clipping ScreenThese fixed function stages can be replaced by a general per-vertexcalculation using vertex shaders in modern programmable hardwarePixel or Fragment PipelinePixel or Fragment
View Full Document