Cmputr graphcs III Rndrng quatn and ts slutn Jarslav Křvánk MFF UK Jarslav.Krvank@mff.cun.cz
Glbal llumnatn GI Drct llumnatn 2
Rvw: Rflctn quatn Sum ntgral f cntrbutns vr th hmsphr: r d cs H f r d n r r Ttal utgng rad. Emttd radanc Rflctd rad.
Frm lcal rflctn t glbal lght transprt Rflctn quatn lcal rflctn Whr ds th ncmng radanc cm frm? Frm thr placs n th scn! r r - d cs H f r r Ra castng functn CG III NPGR010 - J. Křvánk 2015
Frm lcal rflctn t glbal lght transprt Plug fr nt th rflctn quatn Incmng radanc drps ut Outgng radanc at dscrbd n trms f at thr pnts n th scn d cs r H f r CG III NPGR010 - J. Křvánk 2015
Rndrng quatn Rmv th subscrpt frm th utgng radanc: Dscrptn f th stad stat nrg balanc n th scn Rndrng calculat fr all pnts vsbl thrugh pls such that t fulfls th rndrng quatn d cs r H f r CG III NPGR010 - J. Křvánk 2015
Rflctn quatn Dscrbs lcal lght rflctn at a sngl pnt Intgral that can b usd t calculat th utgng radanc f w knw th ncmng radanc Rndrng quatn Cndtn n th glbal dstrbutn f lght n scn Intgral quatn unknwn quantt n bth sds Rflctn quatn vs. Rndrng quatn d cs r H f r d cs H f r Smlar frm dffrnt manng
Rndrng Equatn Kaja 1986 CG III NPGR010 - J. Křvánk 2015
Path tracng sktch
Rcursv unwndng f th RE Angular frm f th RE T calculat w nd t calculat r fr all drctns arund th pnt Fr th calculatn f ach r w nd t d th sam thng rcursvl tc. H r ' ' r r f r ' cs ' d' r CG III NPGR010 - J. Křvánk 2015
Path tracng v. zr rcursv frm gt ω: tracra ω rturn ω r ω // mttd radanc // rflctd radanc r ω: ω gnunfrmhmsphrrandmdr n rturn 2p * brdf ω ω * dtn ω * gt ω CG III NPGR010 - J. Křvánk 2015
Back t th thr: Angular and ara frm f th rndrng quatn
Angular vs. ara frm f th RE Angular frm ntgral vr th hmsphr n ncmng drctns Substtutn 2 cs d d r A d cs r H f r CG III NPGR010 - J. Křvánk 2015
Angular vs. ara frm f th RE Ara frm Intgral vr th scn surfac M r A V G f d 2 cs cs G vsblt 1 vsbl frm 0 thrws gmtr trm scn surfac CG III NPGR010 - J. Křvánk 2015
Angular frm Add radanc cntrbutns t a pnt frm all drctns Fr ach drctn fnd th narst surfac Implmntatn n stchastc path tracng: Fr a gvn gnrat randm drctns fr ach fnd th narst ntrsctn rturn th utgng radanc at that ntrsctn and multpl t wth th csn-wghtd BRDF. Avrag th rsult f ths calculatn vr all th gnratd drctns vr th hmsphr. CG III NPGR010 - J. Křvánk 2015
Ara frm Sum up cntrbutns t a pnt frm all thr pnts n th scn surfac Cntrbutn addd nl f th tw pnts ar mutuall vsbl Implmntatn n stchastc path tracng: Gnrat randml pnt n scn gmtr. Tst vsblt btwn and. If mutuall vsbl add th utgng radanc at mdulatd b th gmtr factr. Tpcal us: drct llumnatn calculatn fr ara lght surcs CG III NPGR010 - J. Křvánk 2015
Mst rndrng algrthms apprmat slutn f th RE cal llumnatn OpnG Onl pnt surcs ntgral bcms a sum Ds nt calculat qulbrum radanc s nt rall a slutn f th RE Fnt lmnt mthds radst [Gral 84] Dscrtz scn surfac fnt lmnts Dsrgard drctnalt f rflctns: vrthng s assumd t b dffus Cannt rprduc glss rflctns CG III NPGR010 - J. Křvánk 2015
Mst rndrng algrthms apprmat slutn f th RE Ra tracng [Whttd 80] Drct llumnatn n dffus and glss surfacs du t pnt surcs Indrct llumnatn nl n dal mrrr rflctn / rfractns Cannt calculat ndrct llumnatn n dffus and glss scns sft shadws tc. Dstrbutd ra tracng [Ck 84] Estmat th lcal rflctn usng th MC mthd Can calculat sft shadws glss rflctns camra dfcus blur tc. CG III NPGR010 - J. Křvánk 2015
Mst rndrng algrthms apprmat slutn f th RE Path tracng [Kaja 86] Tru slutn f th RE va th Mnt Carl mthd Tracng f randm paths randm walks frm th camra Can calculat ndrct llumnatn f hghr rdr CG III NPGR010 - J. Křvánk 2015
Frm th rndrng quatn t fnt lmnt radst
Frm th rndrng quatn t radst Start frm th ara frm f th RE: Th Radst mthd assumptns Onl dffus surfacs BRDF cnstant n and Radst.. radant tanc s spatall cnstant flat vr th ndvdual lmnts M r A V G f d CG III NPGR010 - J. Křvánk 2015
Frm th rndrng quatn t radst Dffus surfacs nl Th BRDF s cnstant n and Outgng radanc s ndpndnt f and t s qual t radst B dvdd b p M A V G d p M A V G B B B d p ' G CG III NPGR010 - J. Křvánk 2015
Frm th rndrng quatn t radst Spatall cnstant flat radst B f th cntrbutng surfac lmnts N B B B j G' da j j 1 Aj Radst f th j-th lmnt Gmtr factr btwn surfac lmnt j and pnt CG III NPGR010 - J. Křvánk 2015
Frm th rndrng quatn t radst Spatall cnstant flat radst f th rcvng surfac lmnt : B 1 A Avrag radst vr th lmnt A B da N 1 B B j G' da j da j 1 A A Aj da A j da j A j F j frm factr CG III NPGR010 - J. Křvánk 2015
Classc radst quatn Sstm f lnar quatns B B N j 1 B j F j Frm factrs 1 F j G' da j da A A A j Cnclusn: th radst mthd s nthng but a wa t slv th RE undr a spcfc st f assumptns CG III NPGR010 - J. Křvánk 2015
Radst mthd Classcal radst 1. Frm fact calculatn Mnt Carl hmcub 2. Slv th lnar sstm Gathrng Shtng Stchastc radst Avds plct calculatn f frm factrs Mtda Mnt Carl Radst s nt practcal nt usd Scn subdvsn -> snstv t th qualt f th gmtr mdl but n ralt mdls ar alwas brkn Hgh mmr cnsumptn cmpl mplmntatn CG III NPGR010 - J. Křvánk 2015
Th pratr frm f th RE
RE s a Frdhm ntgral quatn f th 2 nd knd Gnral frm th Frdhlm ntgral quatn f th 2 nd knd f g k f d unknwn functn Rndrng quatn: knwn functns quatn krnl H r f r cs d CG III NPGR010 - J. Křvánk 2015
nar pratrs nar pratrs act n functns as matrcs act n vctrs h f Th pratr s lnar f th actng s a lnar pratn af bg a f b g Eampls f lnar pratrs FIX NOTATION shul K f k f d f D f CG III NPGR010 - J. Křvánk 2015
Transprt pratr d cs H f r T Rndrng quatn T CG III NPGR010 - J. Křvánk 2015
Slutn f th RE n th pratr frm Rndrng quatn T Frmal slutn I T 1 I T unusabl n practc th nvrs cannt b plctl calculatd CG III NPGR010 - J. Křvánk 2015
Epansn f th rndrng quatn Rcursv substtutn T T T T T 2 n-fld rpttn lds th Numann srs n T 0 T n 1 CG III NPGR010 - J. Křvánk 2015
Epansn f th rndrng quatn If T s a cntractn tj. T < 1 whch hlds fr th RE thn 1 lm T n n 0 Slutn f th rndrng quatn s thn gvn b 0 T CG III NPGR010 - J. Křvánk 2015
A dffrnt drvatn f th Numann srs Frmal slutn f th rndrng quatn Prpstn Prf... 2 1 T T I T I I T T T T T I T T I T I T I T I......... 3 2 2 2 1 1 T I CG III NPGR010 - J. Křvánk 2015
Rndrng quatn T T Slutn: Numann srs T 2 3 T T... CG III NPGR010 - J. Křvánk 2015
Prgrssv apprmatn T T T T T T 2 3 T T T... T CG III NPGR010 - J. Křvánk 2015
Prgrssv apprmatn Each applcatn f T crrspnds t n stp f rflctn & lght prpagatn T 2 3 T T... mssn n-bunc ndrct llumnatn drct llumnatn OpnG shadng CG III NPGR010 - J. Křvánk 2015 tw-bunc ndrct llumnatn
Cntractvt f T Hlds fr all phscall crrct mdls Fllws frm th cnsrvatn f nrg It mans that rpttv applcatn f th pratr lwr th rmanng lght nrg maks sns snc rflctn/rfractn cannt crat nrg Scns wth wht r hghl spcular surfacs rflctvt cls t 1 t achv cnvrgnc w nd t smulat mr buncs f lght CG III NPGR010 - J. Křvánk 2015
Alrght s what hav w achvd? Rndrng quatn Slutn thrugh th Numann srs T 0 T W hav rplacd an ntgral quatn b a sum f smpl ntgrals Grat w knw hw t calculat ntgrals numrcall th Mnt Carl mthd whch mans that w knw hw t slv th RE and that mans that w can rndr mags a! Rcursv applcatn t T crrspnds t th rcursv ra tracng frm th camra CG III NPGR010 - J. Křvánk 2015
What act ntgral ar w valuatng thn? CG III NPGR010 - J. Křvánk 2015 M r M r M r A A A A A V G f V G f A V G f ž z z z ž z z z z d d...d d d d
Paths vs. rcursn: Sam thng dpnds n hw w lk at t Paths n a hgh-dmnsnal path spac T 2 3 T T... Rcursv slutn f a srs f nstd hmsphrcal ntgrals: T T T... CG III NPGR010 - J. Křvánk 2015
Rcursv ntrprtatn Angular frm f th RE T calculat I nd t calculat r fr all drctns arund th pnt. Fr th calculatn f ach r I nd t d th sam thng rcursvl tc. H r ' ' r r W v sn ths alrad rght? But unlk at th bgnnng f th lctur b nw w knw ths actuall slvs th RE. f r ' cs ' d' r CG III NPGR010 - J. Křvánk 2015
Path tracng v. 0.1 rcursv frm gt ω: narstintrsct ω rturn gt ω gtr ω // mttd radanc // rflctd radanc gtr ω nc : [ω gn pdf gn ] gnrnddrbrdfisω nc nrmal rturn 1/pdf gn * gt ω gn * brdf ω nc ω gn * dtnrmal ω gn CG III NPGR010 - J. Křvánk
Path tracng v. 2012 Arnld Rndrr 2012 Clumba Pcturs Industrs Inc. All Rghts Rsrvd. CG III NPGR010 - J. Křvánk 2015
Path tracng [Kaja86] Onl n scndar ra at ach ntrsctn Randm slctn f ntractn dffus rflctn rfractn tc. Drct llumnatn: tw stratgs Hp that th gnratd scndar ra hts th lght surc r Eplctl pck a pnt n th lght surc Trac hundrds f paths thrugh ach pl and avrag th rsult Advantag vr dstrbutd ra tracng: nw branchng f th ra tr mans n plsn f th numbr f ras wth rcursn dpth CG III NPGR010 - J. Křvánk 2015