Sevalna metoda (Radiosity)

Slides:



Advertisements
Similar presentations
SI31 Advanced Computer Graphics AGR
Advertisements

Computer graphics & visualization Global Illumination Effects.
Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Radiosity Mel Slater Department of Computer Science University College London
Advanced Computer Graphics
Modeling the Interaction of Light Between Diffuse Surfaces Cindy M. Goral, Keenth E. Torrance, Donald P. Greenberg and Bennett Battaile Presented by: Chris.
Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Osvetljevanje in senčenje (lighting - shading)
Global Illumination: Radiosity
Radiosity A Fascinating Presentation by Alex Danilevky.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
The Radiosity Method Donald Fong February 10, 2004.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
1 Dr. Scott Schaefer Radiosity. 2/38 Radiosity 3/38 Radiosity Physically based model for light interaction View independent lighting Accounts for indirect.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Radiosity What we can do with scan line conversion and ray tracing What we can’t do Radiosity.
-Global Illumination Techniques
01/29/03© 2003 University of Wisconsin Last Time Radiosity.
David Luebke 1 10/12/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.
02/16/05© 2005 University of Wisconsin Last Time Re-using paths –Irradiance Caching –Photon Mapping.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
David Luebke10/21/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Volume radiosity Michal Roušal University of West Bohemia, Plzeň Czech republic.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
Introduction to Radiosity Geometry Group Discussion Session Jiajian (John) Chen 9/10/2007.
111/17/ :21 Graphics II Global Rendering and Radiosity Session 9.
Radisoity Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New.
Radiosity Jian Huang, CS594, Fall 2002 This set of slides reference the text book and slides used at Ohio State.
DPL11/27/2015 CS 551/651: Radiosity David Luebke
Komputer Grafik 2 (AK045206) Radiosity 1/19 Radiosity.
CPSC 641 Computer Graphics: Radiosity Jinxiang Chai.
David Luebke 1 12/2/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.
Global Illumination: Radiosity, Photon Mapping & Path Tracing Rama Hoetzlein, 2009 Lecture Notes Cornell University.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces ­Not real scenes Rendering equation describes general shading problem.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
Computer Graphics (Fall 2003) COMS 4160, Lecture 20: Radiosity Ravi Ramamoorthi
Global Illumination (2) Radiosity (3). Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System.
Global Illumination (2) Radiosity (2). The Radiosity Equation The "radiosity equation" describes the amount of energy which can be emitted from a surface,
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
Advanced Computer Graphics
Advanced Computer Graphics
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Radisoity Ed Angel Professor Emeritus of Computer Science
Global Illumination: Radiosity, Photon Mapping & Path Tracing
The Rendering Equation
Path Tracing (some material from University of Wisconsin)
Introduction to Computer Graphics with WebGL
Radiosity Part II Form Factors
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Radiosity.
Introduction to Computer Graphics with WebGL
Computer Graphics (Spring 2003)
Radiosity Dr. Scott Schaefer.
CSCE 441 Computer Graphics: Radiosity
(c) 2002 University of Wisconsin
Fundamentals of Computer Graphics Part 6 Shading
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Lecture 25 Radiosity.
Illumination and Shading
Foundations of Computer Graphics (Spring 2012)
OPTICS III, IV: Global Illumination
Radiosity Sung-Eui Yoon (윤성의) CS580: Course URL:
Advanced Computer Graphics: Radiosity
Monte Carlo Path Tracing and Caching Illumination
Presentation transcript:

Sevalna metoda (Radiosity)

Sevalna metoda (radiosity) Sledenje žarka modelira zrcalne odboje in lome skozi prosojne predmete, toda še vedno ne upošteva difuzne svetlobe Sevanje je delež energije, ki se od neke površine odda ali odbije S shranjevanjem svetlobne energije v neki količini, lahko efektu sevanja sledimo

Koncept sevalne metode Sevanje posamezne površine je odvisno od sevanja vseh ostalih površin Globalno osvetlitev obravnavamo kot linearni sistem Potrebna je konstantna BRDF, tj. Bi-directional Reflectance Distribution Function (difuzna svetloba) Enačbo upodabljanja rešujemo kot problem matrik Postopek Razdeli površine na mrežo ploskev (v nadaljevanju elementi) Izračunaj snovne faktorje površin Izračunaj sevanje Prikaži ploskve

Algoritem To dosežemo tako, da najprej razdelimo originalne ploskve na mrežo manjših ploskev, recimo jim elementi. Med postopkom nato računamo, kakšen prispevek svetlobe seva vsak posamezen element drugim elementom. Za vsak element mreže pomnimo seštevek takih sevalnih vrednosti.

Demonstracija sevalne metode

Demonstracija sevalne metode

Osnove Definition: Simplifying assumptions The radiosity of a surface is the rate at which energy leaves the surface Radiosity = rate at which the surface emits energy + rate at which the surface reflects energy Simplifying assumptions Environment is closed All surfaces have Lambertian reflectance Surface patches emit and reflect light uniformly over their entire surface

Sevalna metoda (radiosity) For each surface i: Bi = Ei + i  Bj Fji (Aj / Ai) where Bi, Bj= radiosity of patch i, j Ai, Aj= area of patch i, j Ei = energy/area/time emitted by i i = reflectivity of patch i Fji = Form factor from j to i

Faktorji oblike (Form Factors) Form factor: fraction of energy leaving the entirety of patch i that arrives at patch j, accounting for: The shape of both patches The relative orientation of both patches Occlusion by other patches We’ll return later to the calculation of form factors

Faktorji oblike (form factors) Nekaj primerov… Faktor oblike: približno 100%

Faktorji oblike Nekaj primerov… Faktor oblike: približno 50%

Faktorji oblike Nekaj primerov… Faktor oblike: Približno 10%

Faktorji oblike Nekaj primerov… Faktor oblike: Približno 5%

Faktorji oblike Nekaj primerov… Faktor oblike: približno 30%

Faktorji oblike Nekaj primerov… Faktor oblike: približno 2%

Faktorji oblike Ai Fij = Ai Fji In diffuse environments, form factors obey a simple reciprocity relationship: Ai Fij = Ai Fji Which simplifies our equation: Bi = Ei + i  Bj Fij Rearranging to: Bi - i  Bj Fij = Ei

Faktorji oblike So…light exchange between all patches becomes a matrix: What do the various terms mean?

Faktorji oblike 1 - 1F11 - 1F12 … - 1F1n B1 E1 . . … . . . - pnFn1 - nFn2 … 1 - nFnn Bn En Note: Ei values zero except at emitters Note: Fii is zero for convex or planar patches Note: sum of form factors in any row = 1 (Why?) Note: n equations, n unknowns!

Sevalna metoda Now “just” need to solve the matrix! W&W: matrix is “diagonally dominant” Thus Guass-Siedel must converge (what’s that?) End result: radiosities for all patches Solve RGB radiosities separately, color each patch, and render! Caveat: for rendering, we actually color vertices, not patches (see F&vD p 795)

Sevalna metoda Q: How many form factors must be computed? A: O(n2) Q: What primarily limits the accuracy of the solution? A: The number of patches

Faktorji oblike Calculating form factors is hard Analytic form factor between two polygons in general case: open problem till last few years Q: So how might we go about it? Hint: Clearly form factors are related to visibility: how much of patch j can patch i “see”?

Faktorji oblike: polkocke Hemicube algorithm: Think Z-buffer Render the model onto a hemicube as seen from the center of patch i Store item IDs instead of color Use Z-buffer to resolve visibility See W&W p 278 Q: Why hemicube, not hemisphere?

Faktorji oblike: polkocke Advantages of hemicubes Solves shape, size, orientation, and occlusion problems in one framework Can use hardware Z-buffers to speed up form factor determination (How?)

Faktorji oblike: polkocke Q: What are some disadvantages of hemicubes? Aliasing! Low resolution buffer can’t capture actual polygon contributions very exactly Causes “banding” near lights (plate 41) Actual form factor is over area of patch; hemicube samples visibility at only center point on patch (So?)

Faktorji oblike: Zlivanje žarkov (Ray Casting) Idea: shoot rays from center of patch in hemispherical pattern

Zlivanje žarkov (Ray Casting) Advantages: Hemisphere better approximation than hemicube More even sampling reduces aliasing Don’t need to keep item buffer Slightly simpler to calculate coverage

Zlivanje žarkov (Ray Casting) Disadvantages: Regular sampling still invites aliasing Visibility at patch center still isn’t quite the same as form factor Ray tracing is generally slower than Z-buffer-like hemicube algorithms Depends on scene, though Q: What kind of scene might ray tracing actually be faster on?

Faktorji oblike Source-to-vertex form factors Calculating form factors at the patch vertices helps address some problems: for every patch vertex for every source patch sample source evenly with rays visibility = % rays that hit Q: What are the problems with this approach?

Faktorji oblike Summary of form factor computation Analytical: Expensive or impossible (in general case) Hemicube Fast, especially using graphics hardware Not very accurate; aliasing problems Ray casting Conceptually cleaner than hemicube Usually slower; aliasing still possible

Sistem sevalne metode Fi Fo Razveljavimo žarečo verzijo enačbe upodabljanja Iztekajoča verzija enačbe upodabljanja Iztekanje = Sevanje X Površina Difuzni odboj je konstanten Fij je faktor snovi Fi Fo

Sevalna metoda (radiosity) Sevanje elementa ‘i’ je ei je delež svetlobe, ki se jo odda ri je odbojnost i-tega elementa Fj,i je faktor snovi ulomek elementa j, ki doseže element i je določen z orientacijo obeh elementov in z ovirami Uporabi Aj/Ai (površina elementa j / površina elementa i) da določiš enote za vso svetlobo oddano od j glede na prejeto na enoto površine i-ja

Hij = 1 or 0 depending on occlusion Faktorji oblike Izračunaj nxn matriko faktorjev snovi da shraniš odnose med sevanjem posameznega svetlobnega elementa in vsemi ostalimi Hij = 1 or 0 depending on occlusion

Faktor oblike – projekcije krogle Modeliranje faktorja oblike s projekcijami krogle poligon Aj projeciramo na enoto poloble s središčem (in tangentno na) Ai Prispevek cosqj / r2 Projeciramo to projekcijo na osnovno ploskev poloble Prispevek cosqi To površino delimo s povšino osnovnega kroga Prispevek p

Faktor oblike – polkocka Polkocka omogoča hitrejše računanje Analitična rešitev polkrogle je draga Uporabimo pravokotni približek, polkocko Kosinusi za vrh in stranice se poenostavijo Dimenzije 50 – 200 kvadratov so dobre

Reševanje za vse elemente En element definiran z: Simetrija: AiFi,j = AjFj,I Zato: In: Uporabi algebro matrik za izračun Bi-jev:

Sevalna metoda (radiosity) Sevanje je računsko kompleksno Naredi doktorsko disertacijo o izboljšavi... Oddana svetloba in točka pogleda se lahko spremenita Koti svetlobe in položaji objektov se ne morejo spremeniti Računanje faktorjev snovi je drago Zrcalni odboji se ne modelirajo

Faktor oblike Ai FdAidAj – delež skupne jakosti svetlobe, ki zapusti difuzno površino elementa i (imenovalec) in doseže difuzno površino elementa j (števec) FdAiAj – delež skupne jakosti svetlobe, ki zapusti difuzno povšino elementa i in v celoti doseže element j FAiAj = Fij – delež skupne jakosti svetlobe, ki zapusti element i in doseže element j qi qj r Aj Lepe lastnosti faktorjev oblike Fii = 0 ko so ploskve ravne Fij = 0 če so ploskve zaprte AiFij = AjFji Fij je brez dimenzij Ko r2 >> Aj …

Računanje faktorjev oblike Stokesov teorem [Lambert 1760, Goral et al. S84] Nusseltov analog Fij = projD(projW(Aj))/Area(D) Polkocka Monte-Carlo metanje žarkov Uniformni vzorčni disk Fij = (# žarkov ki zadanejo Aj) / (# vseh žarkov) Aj (cos qj/r2) Aj W 1 Ai D cos qi(cos qj/r2) Aj DA

Matrično sevanje Ei Bi

Zbiranje podatkov Bi Rešuje se kot linearni sistem Ax = b MB = E Jacobi Sevanje = Oddajanje + Odboj ostalih sevanj Bi(k+1) = Ei – Sji Mij Bj(k) Gauss-Siedel računa mestoma (tu pa tam) Bi = Ei – Sji Mij Bj pretirana omilitev Gauss-Siedel je preveč konzervativen Bi(k+1) = 110% Bj(k+1) – 10% Bj(k) Bi

Bj(k+1) = Bj(k) + SrjFji DBi Izris Progresivno izboljšanje Porazdeli dodatno sevanje DBi med ostale elemente j Bj(k+1) = Bj(k) + SrjFji DBi Dodatno “neizrisano” sevanje je tisto, kar smo dobili v zadnji iteraciji DBi = Bj(k) – Bj(k-1) Energija se začne pri oddajniku Porazdeljuj “progresivno” skozi prizor Lahko upoštevamo ambient, ko prikazujemo prizor in v njem delamo zamenjave tekom napredovanja progresivnega sevanja Bi