Computer Graphics (CS 563) Lecture 1: Advanced Computer Graphics
Total Page:16
File Type:pdf, Size:1020Kb
Computer Graphics (CS 563) Lecture 1: Advanced Computer Graphics Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Photorealistic Rendering Photorealistic? Indistinguishable from picture Main concern: Realism. Slow: Does NOT care how long it takes (hours, days) Example photorealistic algorithm: Ray tracing images Real Time Rendering Some applications re‐render moving objects many times per second = Real‐time rendering Examples: Games Flight simulators Virtual reality Augmented reality, etc • Real Time graphics: Milliseconds to render (30 FPS) But lower image quality What is Real‐Time Rendering? How fast should real‐time rendering happen? Rendering speed measured in Frames Per Second (fps) About 72 fps guarantees that user: becomes immersed in graphics experience No distraction of waiting for rendering to complete Smooth interaction So, we can say 30 fps upwards is real‐time Frank Cho, electronics arts, algorithms must run in at least 30 fps (minimum) Images produced must have feel of 3D graphics Photorealistic Vs Real‐Time Graphics Hours to render Each frame takes Less than 0.033 seconds Ray tracing rendering time is over 10,000x that of real‐time render!! But is the image quality 10,000x better? Applications of Real‐Time Rendering Computer Games Courtesy: Super Mario Galaxy 2 Courtesy: Final Fantasy XIV Applications of Real‐Time Rendering Flight simulators, virtual worlds Courtesy: Evans and Sutherland Courtesy: PC Mag About This Course Focus this semester on Real time rendering Emphasis on real‐time global illumination techniques Previous editions: focussed on Photo‐realistic Rendering Advances in ray tracing Photon mapping Appearance Modeling BRDFs /materials (representations, viewers, acquisition) Rendering humans (face, skin) Rendering nature (water, trees, seashells) Rendering animals (feathers, butterflies) Basically, entire semester of ray tracing Professor Background Dr. Emmanuel Agu (professor, “Emmanuel”) Research areas Computer Graphics (real time/photorealistic rendering, etc) Mobile computing (Healthcare apps on smartphone, etc) Mobile graphics (games on mobile devices, mobile 3D, etc) Research opportunities Independent Study Project MQP MS theses PhD theses Student Background Name Class (undergrad (seniors), masters, PhD …) Full and Part‐time student Programming experience (C, C++, java) Graphics background At least one graphics class taken Solid math skills…. Other (Physics, computer vision, image science, ???) Students intro themselves Fill in above info, say what you want from this class Course Prerequisites No official prerequisite However, will assume you Have probably taken at least 1 graphics course (OpenGL?) Can quickly learn graphics representations and techniques, (will briefly cover them in class as needed) have background in calculus, linear algebra Can read book(s), research articles, fill in gaps Can learn rendering package, shading language, use it Still have questions? See me Syllabus http://web.cs.wpi.edu/~emmanuel/courses/cs563/S12/ Office hours: Tuesdays: 4:00‐5:00pm Other times by appointment Email me if you have specific questions Text Book: Real‐Time Rendering by Akenine‐Moller, Haines and Hoffman plus selected papers See online course paper schedule Text takes survey‐style approach: Give overview, When to use specific techniques Where to find more information Grading No exams Presentations each (30%) Class participation (10%) Projects defined by me (30%) Final project, chosen by you (30%) Projects for this course Small stand‐alone shader (OpenGL) programs Real time rendering platform (e.g. Ogre) Why this course? Understand state‐of‐the‐art real‐time graphics techniques Become conversant with cutting edge graphics literature Hands‐on exploration of a selection of the techniques encountered Use cutting edge shading language(s), rendering package(s), graphics card(s) Possibly extend one of the algorithms/techniques Class Time Two halves with 15 minutes break Each half 45 minute presentation followed by 30 minute discussion of topic(s) and questions Presentations My goal is to guide you how to present effectively I will be strict with time (no breaks when presenting at conferences!!) Get right to the point (core), offer motivation & insights Communicate basic ideas to fellow students Offer a ‘roadmap’ for studying the paper/readings Look over reading list & let me know which paper/readings you want to present Note: can use any resources (videos, Internet images) to build your talk. Must give credit. If not.. Cheating!!! Don’t just summarize! Find authors websites, videos, images, supplimentary cool stuff Presentations Common mistakes: Avoid: putting too much on a slide (talk!!) Too many slides for alloted time (approx 2 mins/slide) 45 mins time? Estimate: 25 slides max! Student presentations start in week 4 Final Project Implement one of the RT rendering techniques discussed in class, use shading language? Game engine? May also use high end package to create models Maya Renderman Blender PovRay, etc Must submit your final project proposal by March 20, 2012 Can get ambitious: convert photorealistic technique to real time Ideas?? See Stanford rendering competition http://graphics.stanford.edu/courses/cs348b‐competition/ Where to do Projects? Most self‐respecting home PC’s have a graphics card Some PCs even have sweet Nvidia or ATI cards You can use your home computer or on‐campus labs Remember you will demo project at the end Six labs on campus support OpenGL 3.3 or 4.0 Gordon's Library Salisbury Labs 123 Stratton Hall 003 (Math Lab) Washburn 226 Higgins Lab 230 Kaven Hall 203 Supplementary Books Will place the supplementary books on reserve: On reserve in the library under CS 563 folder Randy Rost et al "OpenGL Shading Language", Addison Wesley publishers, 2009 More to come.. About This Course Previous versions of class Students chose any topics they liked Students tend to pick what’s easy Many random papers. Sometimes big picture lost This version.. Suggested structure/papers based on hot trends in RT rendering In fact, using an advanced text for most of the literature Creates better flow, students understand better Should still do additional literature survey, etc Will get nice points for finding sweet links, videos, supplementary material Drivers of Real‐Time Graphics? A major driver of advances in real‐time graphics: Graphics Hardware acceleration Previously, SGI was king Today: 3D graphics cards from ATI, Nvidia on PCs 3Dfx Voodoo 1 was first card in 1996 beginning of real‐time graphics era? Most advances in real time graphics are due to innovation in graphics cards Chip on card also called Graphics Processing Unit (GPU) Graphics Processing Unit (GPU) Entire graphics library (OpenGL, DirectX) in hardware => FAST!! Speed: GPUs renders graphics faster CPUs Programmable: in last 8 years (Shaders) Located either on PC motherboard (Intel) or Separate graphics card (Nvidia or ATI) On PC motherboard On separate PCI express card GPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory GeForce GTX 280: 140 GB/s High availability to all “Fermi” 180+ million CUDA‐capable GPUs in the wild 3B xtors Numbers doubling every 6 months (Moore’s law cubed) GeForce 8800 681M xtors GeForce FX 125M xtors GeForce 3 GeForce® 256 60M xtors RIVA 128 23M xtors 3M xtors 1995 2000 2005 2010 Slide from Stanford course 193G 2010 GPU Server? Using Nvidia SLI, may install multiple cards Why is GPU so Fast? Geometry Lighting Projection Rasterization transforms and shading Graphics Rendering Pipeline GPUs grew out of need for graphics to render quicker Observation: Graphics rendering involves: Many: sequential calculations (linear algebra, matrix calculations) sequential memory access (Orderly rendering of pixels/images) Few: conditional (if/else,loops), branching statements Random memory access operations GPU Design Geometry Lighting Projection Rasterization transforms and shading Graphics Rendering Pipeline Arithmetic Logic Unit (ALU) is part of chip for calculations ALU chip area: CPU (7%) vs GPU ( > 50%) Transistors devoted to ALU, processing NOT Data caching Flow control (if, else) Result: GPU runs graphics (or math‐intensive apps) much faster than CPU Why is GPU so Fast? More transistors for ALU, faster rendering calculations GPUs will run applications with lots of branches, loops badly? GFLOP/sec growth GPU!! CPU!! GPU Memory Bandwidth Graph from: http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/CUDA_C_Programming_Guide.pdf How did GPU growth this happen? Games demand advanced shading Fast GPUs = better shading Need for speed = continued innovation The gaming industry has overtaken the defense, finance, oil and healthcare industries as the main driving factor for high performance processors. Aside: GPGPU: GPUs to speedup Non‐Graphics Applications 146X 36X 18X 50X 100X Medical Molecular Video Matlab Astrophysics Imaging Dynamics Transcoding Computing RIKEN U of Utah U of Illinois, Elemental Tech AccelerEyes Urbana 149X 47X 20X 130X 30X Financial Linear Algebra 3D Quantum Gene simulation Universidad Ultrasound Chemistry Sequencing Oxford Jaime Techniscan U of Illinois, U of Maryland Urbana Graphics Pipeline Revisited Conceptual graphics pipeline fits into 3 parts Application stage Geometry stage Rasterizer stage CPU GPU Application Geometry Rasterizer