H331: Computer Graphics http://www.cs.kuleuven.ac.be/~graphics/H331/ Philip Dutré Department of Computer Science Wednesday May 8, 2003
Announcements Practicum 3: Ray Tracing Showcase online Exam info: website + this lecture
Topics Surfel Rendering Morphable faces Environment Matting Interactive shadows for Cinematic Design
Surfels : Surface Elements as Rendering Primitives What’s wrong with polygons? “Reality starts at 80 million polygons” Organic shapes are difficult to represent with polygons (Pfister et al. SIGGRAPH 2000)
Example (movie clip)
Surfels: Concepts Object is represented as oriented surface points, sampled from polygons Hierarchical resolutions Each point has texture information
Surfels: Sampling Generate Layered Depth Image for each dimension: “Layered Depth Cube” LDI LDI LDI
Surfels: Sampling Analog in 2D Sampling density not determined by curvature of geometry
Surfels: Sampling Adequate density? Distance between sample rays: h Choose density such that each pixel is covered by at least one surfel Distance between sample rays: h then: imaginary triangle mesh on surface has lengths of at most h*sqrt(3)
Surfels: Texture pre-filtering Texture color per surfel: filter in texture space using filter of size h.sqrt(3) Also use larger filters: typically 3 or 4 colors per surfel
Surfels: Data Structure Octree Each cell in tree is LDI at half the resolution 2 levels Construction: bottom-up
Surfels: Rendering Choose blocks in octree at correct level each pixel must be covered Cull blocks that are not visible all surfels in block point away from camera Project surfels on image plane What about holes?
Surfels: Hole pixels? During reprojection, reproject ‘disks’ and record depth in each pixel, NOT color Each pixel has pointer to closest surfel
Surfels: Hole Pixels? For each hole pixel, we have a reference to the nearest surfel Color for hole pixels interpolate between different levels of the texture colors of the nearest surfel
Surfels: Examples (2.8 M surfels) (2 M surfels) (video clips)
A Morphable Model For the Synthesis of 3D Faces Basic idea: find a set of basis functions for modeling human faces Max-Planck Institut fur Biologische Kybernetik (SIGGRAPH 99)
General Principle
Building database Scan 200 heads (100 male, 100 female) Conditions: geometric data texture data Conditions: no facial hair (facial + head) no make-up Rotate each face in standard orientation each face: 70,000 vertices
Building database
Morphable model Face has n vertices Pick set of m ‘basis’ faces shape of face is point in R3n space texture of face is point in R3n space Pick set of m ‘basis’ faces each face is linear combination of m basis faces
Morphable model We can make arbitrary faces by making linear combinations of the m basis faces (m-1 degrees of freedom) “Face Space” For more variety: different models for ear, nose, eyes, etc.
Morphable model
Morphable model Label initial set of 200 faces with attributes: male/female smiling/frowning ... Find ‘tendencies’ for each of these attributes in Face Space
Morphable model
Morphable model
Match to image of a new face Place morphable model over image Iterative procedure to adapt morphable model until ‘closest fit’ is found Correct texture due to illumination effects
Match to image of a new face
Morphable model
Morphable model (clip)
Environment Matting Classic matting and compositing place object in front of controlled backdrop Extract object Replace background Transparancy: alpha-matting (Zongker 99)
Environment Matting What if object affects the background? (e.g. transparent objects?)
Basic Idea Capture the way light is reflected through the object Apply this reflection to any new background
Basic Idea Use textures of different frequencies to capture the way light passes through the object backdrops sidedrops
Basic idea Textures are projected on a CRT
Given all deformations of all textures, find what portion of the background ends up in what pixel multi-dimensional optimization problem Assumptions axis-aligned region on texture maps
Results Alpha-matte Environment matte Photograph
Results Alpha-matte Environment matte Photograph
Extensions Reflections (clips)
Interactive shadow editing Designing a scene: Where to place light sources? Usually shadows are an important aspect!!! How to specify where shadows are to be located?
Examen
Hoe verloopt het? Mondeling + schriftelijke voorbereiding Gesloten boek ~ 5 vragen Zowel kennis als inzicht
Welke stof moet gekend zijn? “Alles wat in de les gezien is” Relevante secties in boek staan op website Indien niet in boek: slides Zowel boek-versie als slide-versie zijn goed als antwoord, zolang het maar juist is!
Welke stof moet NIET gekend zijn? Dingen in boek niet behandeld in les ;-) OpenGL Geen OpenGL code op examen
Type Vragen: Kennis “Leg uit: Phong-shading” “Wat is het XYZ kleurendiagramma?” “Bespreek het klassieke ray tracing algoritme” “Wat is een viewport? Welke plaats neemt het in de grafische pipeline?”
Type vragen: inzicht We willen de volgende animatie maken: Werk de transformatiematrix uit in functie van t … t = 10 t = 5 t = 0
Type Vragen: Inzicht In stochastische ray tracing delen we een lichtbron op in 4 aparte lichtbronnen. Hoeveel schaduwstralen per lichtbron moeten we in beide gevallen gebruiken om dezelfde kwaliteit van beeld te bekomen?
Practica? Tellen mee voor 7 punten op 20 Verdeling: 3 /4 of 4/ 3 (afhankelijk van beste score)