SlideShare a Scribd company logo
1 of 63
Download to read offline
Computergrafiek: project
B-KUL-H07Z5A
Remainder deadline 2.5
Woensdag 28 maart (= vandaag) 15u
• Demo
• Prentjes doorsturen
2
Opgave 3: Specialisatie
• Track: acceleratiedatastructuren
of
• Track: globale belichting
of
• Eigen voorstel (mits goedkeuring)
3
Acceleratiedatastructuren
• Implementeer/Onderzoek o.a.:
• BVH bouwheuristieken
• Object Instancing
• Scènegenerator
4
BVH bouwheuristieken
5
BVH bouwheuristieken: Object Median Split
6
BVH bouwheuristieken: Object Median Split
7
BVH bouwheuristieken: Object Median Split
8
BVH bouwheuristieken: Object Median Split
9
BVH bouwheuristieken: Object Median Split
10
BVH bouwheuristieken: Spatial Median Split
11
BVH bouwheuristieken: Spatial Median Split
12
splitsingsvlak
BVH bouwheuristieken: Spatial Median Split
13
splitsingsvlak
BVH bouwheuristieken: Spatial Median Split
14
splitsingsvlak
BVH bouwheuristieken: Spatial Median Split
15
splitsingsvlak
BVH bouwheuristieken: Spatial Median Split
16
BVH bouwheuristieken: Surface Area Heuristic
17
splitsingsvlakken
BVH bouwheuristieken: Surface Area Heuristic
• 𝒞SAH L, R = 𝑐 + pL 𝒞L + pR 𝒞R
• 𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
18
BVH bouwheuristieken: Surface Area Heuristic
19
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
20
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
21
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
22
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
23
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
24
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
25
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
26
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
27
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken: Surface Area Heuristic
28
splitsingsvlakken
𝒞SAH L, R = 𝑐 +
SA AABBL
SA AABBP
NL +
SA AABBR
SA AABBP
NR
BVH bouwheuristieken
• Object Median Split
• Spatial Median Split
• Surface Area Heuristic
• ℬ equidistante splitsingsvlakken (binned)
• “Alle” splitsingsvlakken (sweeping-plane) (optioneel)
• Splitsingsas:
• … ⟶ 𝑥 ⟶ 𝑦 ⟶ 𝑧 ⟶ 𝑥 ⟶ 𝑦 ⟶ 𝑧 ⟶ …
• volgens as grootste bereik van centroids
• allemaal (enkel mogelijk voor SAH)
29
BVH bouwheuristieken
• Stopcriterium? Afleidbaar uit SAH kostfunctie?
• Wat is de average case Θ-complexiteit voor het opstellen v/d BVH?
• Wat is de average case Θ-complexiteit voor het doorlopen v/d BVH?
30
Object Instancing
31
Acceleratiedatastructuur
over de instances
Acceleratiedatastructuur
over de mesh
Transformatie
Object Instancing
• Vergelijk Object Instancing met Triangle Soup
• Triangle Soup:
• Transformeer alle driehoeken naar wereldruimte
• Construeer één acceleratiedatastructuur over alle driehoeken van alle instances
32
Scènegenerator
• Genereer bepaalde types scènes automatisch om
extrema (best/worst case) te illustreren bij het
bouwen en doorlopen van de BVH voor de
verschillende bouwheuristieken.
• Enkele eenvoudige aanzetten ter inspiratie:
• Een hoop bollen uniform in de eenheidskubus?
• Een hoop theepotten (Object Instancing?) verspreid
volgens een bepaalde kansverdeling?
• …
33
34
Teapot-in-a-stadium problem binary kd-tree
VRAGEN? OPMERKINGEN?
35
Globale Belichting
• Path tracing ☺
• Implementeer/Onderzoek o.a.:
• Hoekbemonstering vs. Hybride Bemonstering
• Recursiediepte
• Branching factor
• Caustics
• Convergentie
36
• 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬𝐴
𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 𝑉 𝑝, 𝑝′ cos 𝜃′d𝐴
𝑝−𝑝′ 2
• 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬Ω+ 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′
, −𝜔𝑖 cos 𝜃 d𝜔𝑖
• 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0
2𝜋
‫׬‬0
𝜋/2
𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 sin 𝜃 d𝜃d𝜙
• 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0
2𝜋
‫׬‬0
1
𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 d cos 𝜃 d𝜙
Globale Belichting - Hoekbemonstering
importance
sampling
niet gekendconstant voor
diffuus
oppervlak
37
• 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0
2𝜋
‫׬‬0
1
𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 d cos 𝜃 d𝜙
• ‫׬‬0
2𝜋
1d𝜙 = 2𝜋 ⟶ pdf 𝜙 =
1
2𝜋
• 𝑢 =
𝜙
2𝜋
⟹ 𝜙 = 2𝜋𝑢 𝑢 ∼ 𝒰 0,1
• ‫׬‬0
1
cos 𝜃 d cos 𝜃 =
1
2
⟶ pdf cos 𝜃 = 2 cos 𝜃
• cdf cos 𝜃 = ‫׬‬0
cos 𝜃
2 cos 𝜃 d cos 𝜃 = cos2 𝜃 ⟶ 𝑢 = cos2 𝜃 ⟹ cos 𝜃 = 𝑢
Globale Belichting - Hoekbemonstering
38
cdf inversion
39
Globale Belichting - Hoekbemonstering
• 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0
2𝜋
‫׬‬0
1
𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 d cos 𝜃 d𝜙
• ‫׬‬0
2𝜋
1d𝜙 = 2𝜋 ⟶ pdf 𝜙 =
1
2𝜋
• 𝑢 =
𝜙
2𝜋
⟹ 𝜙 = 2𝜋𝑢 𝑢 ∼ 𝒰 0,1
• ‫׬‬0
1
cos 𝜃 d cos 𝜃 =
1
2
⟶ pdf cos 𝜃 = 2 cos 𝜃
• cdf cos 𝜃 = ‫׬‬0
cos 𝜃
2 cos 𝜃 d cos 𝜃 = cos2 𝜃 ⟶ 𝑢 = cos2 𝜃 ⟹ cos 𝜃 = 𝑢
• pdf 𝜙, cos 𝜃 = pdf 𝜙 pdf cos 𝜃 =
cos 𝜃
𝜋
Globale Belichting - Hoekbemonstering
40
cdf inversion
41
Globale Belichting - Hoekbemonstering
Typische resultaten:
1 camerastraal/pixel 16 camerastralen/pixel 256 camerastralen/pixel
42
Globale Belichting – Hybride Bemonstering
Oplossing: hybride aanpak
Hoekbemonstering om lichtpad uit te breiden met een nieuwe knoop
+
Directe belichting expliciet bemonsteren voor elke knoop op het lichtpad
• i.e. expliciet een schaduwstraal sturen naar elk van de lichtbronnen (= Next Event Estimation)
43
44
Globale Belichting – Hybride Bemonstering
Oplossing: hybride aanpak
Hoekbemonstering om lichtpad uit te breiden met een nieuwe knoop
+
Directe belichting expliciet bemonsteren voor elke knoop op het lichtpad
• i.e. expliciet een schaduwstraal sturen naar elk van de lichtbronnen (= Next Event Estimation)
Probleem: sommige paden worden 2x in rekening gebracht
• via hoekbemonstering en via Next Event Estimation
Oplossing:
Indien je via hoekbemonstering rechtstreeks een lichtbron raakt, negeer de bijdrage van deze
lichtbron 𝐿 𝑒 𝑝, 𝜔 𝑜
• i.e. return een nulradiantie
45
Globale Belichting – Hybride Bemonstering
Typische resultaten:
256
camerastralen/pixel
16
camerastralen/pixel
4
camerastralen/pixel
1
camerastraal/pixel
46
Globale Belichting – Recursie
Maximale recursiediepte
• i.e. return een nulradiantie indien lichtpaden geen lichtbron bereikt hebben
47
48
0 oppervlakte-interacties 0+1 oppervlakte-interacties 0+1+2 oppervlakte-interacties
49
Globale Belichting
Voorzie ook functionaliteit om enkel één bepaalde paddiepte weer te geven:
• Enkel het directe licht;
• Enkel het licht na exact 1 indirecte oppervlakte-interactie;
• Enkel het licht na exact 2 indirecte oppervlakte-interacties;
• Etc.
Wat leer je hieruit?
50
Globale Belichting – Recursie
Maximale recursiediepte
• i.e. return een nulradiantie indien lichtpaden geen lichtbron bereikt hebben
Branching factor
• Om inkomende radiantie te bepalen in een shading point, kan je kiezen om 1 of meerdere
stralen te gebruiken.
• Onderzoek het effect van verschillende branching factors op de convergentie.
51
52
Globale Belichting – Recursie
Maximale recursiediepte
• i.e. return een nulradiantie indien lichtpaden geen lichtbron bereikt hebben
Branching factor
• Om inkomende radiantie te bepalen in een shading point, kan je kiezen om 1 of meerdere
stralen (= branching factor) te gebruiken.
• Onderzoek het effect van verschillende branching factors op de convergentie.
Russische Roulette (optioneel)
• voor het bekomen van niet-vertekend resultaten
• Wat zou een goede keuze zijn van stop-kans? Waarvan afhankelijk?
53
0+1+2 oppervlakte-interacties Russische Roulette
54
Globale Belichting – Caustics
Reflectieve materialen (en hun reflectieve caustics)
moet/kan je nu nog de hemisfeer bemonsteren via de hoekbemonstering?
55
Globale Belichting – Caustics
Refractieve materialen (en hun refractieve caustics) (optioneel)
moet/kan je nu nog de hemisfeer bemonsteren via de hoekbemonstering?
56
Globale Belichting
Hoe zit het met het convergentiegedrag van de twee algoritmen?
1. Brute force path tracer (i.e. hoekbemonstering)
2. Hybride path tracer (i.e. hoekbemonstering + Next Event Estimation)
Heeft de grootte van een oppervlaktelichtbron impact op het convergentiegedrag
van de twee algoritmen?
Bespreek dit alles bv. aan de hand van de Root Mean Squared Error.
57
Intermezzo: Root Mean Squared Error
Een mogelijke ‘convergentie-maat’ is de Root Mean Squared Error (RMSE), een
schatter voor de ‘afwijking’ over alle pixels:
RMSE =
σ 𝑗
𝑃
𝐿𝑗 − 𝐿𝑗
REF 2
𝑃
t.o.v. ‘goed-geconvergeerde’ referentieafbeelding met pixelwaarden 𝐿𝑗
REF
Hoe gedraagt de RMSE zich in termen van het aantal camerastralen? (Wat weet je
uit de theorie van Monte Carlo schatters?) Interessant voor je verslag?
Extra doordenkers (optioneel): bekijk eens de distributie van de afwijkingen 𝐿𝑗 −
𝐿𝑗
REF
; wat met gammacorrectie (i.e. RMSE ervoor of erna?); wat met grote
dynamische bereiken? 58
VRAGEN? OPMERKINGEN?
59
Evaluatie
60
Evaluatie – Alle Tracks
Grondig academisch/wetenschappelijk verslag met bespreking en verantwoording
van experimenten en hun resultaten met als doel een correcte implementatie en
inzicht weer te geven.
Bespreek enkel Deel 3.
Geen exact opgelegd aantal pagina’s of formaat. (Je verslag wordt meerdere malen
afgedrukt, dus denk wat aan het milieu en houd het enigszins compact; liever niet
>15 pagina’s.)
Examen = mondelinge bespreking van verslag
61
VRAGEN? OPMERKINGEN?
62
63

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Presentation 4 (B-KUL-H07Z5A)

  • 2. Remainder deadline 2.5 Woensdag 28 maart (= vandaag) 15u • Demo • Prentjes doorsturen 2
  • 3. Opgave 3: Specialisatie • Track: acceleratiedatastructuren of • Track: globale belichting of • Eigen voorstel (mits goedkeuring) 3
  • 4. Acceleratiedatastructuren • Implementeer/Onderzoek o.a.: • BVH bouwheuristieken • Object Instancing • Scènegenerator 4
  • 10. BVH bouwheuristieken: Object Median Split 10
  • 11. BVH bouwheuristieken: Spatial Median Split 11
  • 12. BVH bouwheuristieken: Spatial Median Split 12 splitsingsvlak
  • 13. BVH bouwheuristieken: Spatial Median Split 13 splitsingsvlak
  • 14. BVH bouwheuristieken: Spatial Median Split 14 splitsingsvlak
  • 15. BVH bouwheuristieken: Spatial Median Split 15 splitsingsvlak
  • 16. BVH bouwheuristieken: Spatial Median Split 16
  • 17. BVH bouwheuristieken: Surface Area Heuristic 17 splitsingsvlakken
  • 18. BVH bouwheuristieken: Surface Area Heuristic • 𝒞SAH L, R = 𝑐 + pL 𝒞L + pR 𝒞R • 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR 18
  • 19. BVH bouwheuristieken: Surface Area Heuristic 19 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 20. BVH bouwheuristieken: Surface Area Heuristic 20 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 21. BVH bouwheuristieken: Surface Area Heuristic 21 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 22. BVH bouwheuristieken: Surface Area Heuristic 22 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 23. BVH bouwheuristieken: Surface Area Heuristic 23 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 24. BVH bouwheuristieken: Surface Area Heuristic 24 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 25. BVH bouwheuristieken: Surface Area Heuristic 25 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 26. BVH bouwheuristieken: Surface Area Heuristic 26 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 27. BVH bouwheuristieken: Surface Area Heuristic 27 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 28. BVH bouwheuristieken: Surface Area Heuristic 28 splitsingsvlakken 𝒞SAH L, R = 𝑐 + SA AABBL SA AABBP NL + SA AABBR SA AABBP NR
  • 29. BVH bouwheuristieken • Object Median Split • Spatial Median Split • Surface Area Heuristic • ℬ equidistante splitsingsvlakken (binned) • “Alle” splitsingsvlakken (sweeping-plane) (optioneel) • Splitsingsas: • … ⟶ 𝑥 ⟶ 𝑦 ⟶ 𝑧 ⟶ 𝑥 ⟶ 𝑦 ⟶ 𝑧 ⟶ … • volgens as grootste bereik van centroids • allemaal (enkel mogelijk voor SAH) 29
  • 30. BVH bouwheuristieken • Stopcriterium? Afleidbaar uit SAH kostfunctie? • Wat is de average case Θ-complexiteit voor het opstellen v/d BVH? • Wat is de average case Θ-complexiteit voor het doorlopen v/d BVH? 30
  • 31. Object Instancing 31 Acceleratiedatastructuur over de instances Acceleratiedatastructuur over de mesh Transformatie
  • 32. Object Instancing • Vergelijk Object Instancing met Triangle Soup • Triangle Soup: • Transformeer alle driehoeken naar wereldruimte • Construeer één acceleratiedatastructuur over alle driehoeken van alle instances 32
  • 33. Scènegenerator • Genereer bepaalde types scènes automatisch om extrema (best/worst case) te illustreren bij het bouwen en doorlopen van de BVH voor de verschillende bouwheuristieken. • Enkele eenvoudige aanzetten ter inspiratie: • Een hoop bollen uniform in de eenheidskubus? • Een hoop theepotten (Object Instancing?) verspreid volgens een bepaalde kansverdeling? • … 33
  • 36. Globale Belichting • Path tracing ☺ • Implementeer/Onderzoek o.a.: • Hoekbemonstering vs. Hybride Bemonstering • Recursiediepte • Branching factor • Caustics • Convergentie 36
  • 37. • 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬𝐴 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 𝑉 𝑝, 𝑝′ cos 𝜃′d𝐴 𝑝−𝑝′ 2 • 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬Ω+ 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′ , −𝜔𝑖 cos 𝜃 d𝜔𝑖 • 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0 2𝜋 ‫׬‬0 𝜋/2 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 sin 𝜃 d𝜃d𝜙 • 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0 2𝜋 ‫׬‬0 1 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 d cos 𝜃 d𝜙 Globale Belichting - Hoekbemonstering importance sampling niet gekendconstant voor diffuus oppervlak 37
  • 38. • 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0 2𝜋 ‫׬‬0 1 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 d cos 𝜃 d𝜙 • ‫׬‬0 2𝜋 1d𝜙 = 2𝜋 ⟶ pdf 𝜙 = 1 2𝜋 • 𝑢 = 𝜙 2𝜋 ⟹ 𝜙 = 2𝜋𝑢 𝑢 ∼ 𝒰 0,1 • ‫׬‬0 1 cos 𝜃 d cos 𝜃 = 1 2 ⟶ pdf cos 𝜃 = 2 cos 𝜃 • cdf cos 𝜃 = ‫׬‬0 cos 𝜃 2 cos 𝜃 d cos 𝜃 = cos2 𝜃 ⟶ 𝑢 = cos2 𝜃 ⟹ cos 𝜃 = 𝑢 Globale Belichting - Hoekbemonstering 38 cdf inversion
  • 39. 39 Globale Belichting - Hoekbemonstering
  • 40. • 𝐿 𝑜 𝑝, 𝜔 𝑜 = 𝐿 𝑒 𝑝, 𝜔 𝑜 + ‫׬‬0 2𝜋 ‫׬‬0 1 𝑓𝑟 𝑝, 𝜔𝑖, 𝜔 𝑜 𝐿 𝑜 𝑝′, −𝜔𝑖 cos 𝜃 d cos 𝜃 d𝜙 • ‫׬‬0 2𝜋 1d𝜙 = 2𝜋 ⟶ pdf 𝜙 = 1 2𝜋 • 𝑢 = 𝜙 2𝜋 ⟹ 𝜙 = 2𝜋𝑢 𝑢 ∼ 𝒰 0,1 • ‫׬‬0 1 cos 𝜃 d cos 𝜃 = 1 2 ⟶ pdf cos 𝜃 = 2 cos 𝜃 • cdf cos 𝜃 = ‫׬‬0 cos 𝜃 2 cos 𝜃 d cos 𝜃 = cos2 𝜃 ⟶ 𝑢 = cos2 𝜃 ⟹ cos 𝜃 = 𝑢 • pdf 𝜙, cos 𝜃 = pdf 𝜙 pdf cos 𝜃 = cos 𝜃 𝜋 Globale Belichting - Hoekbemonstering 40 cdf inversion
  • 41. 41
  • 42. Globale Belichting - Hoekbemonstering Typische resultaten: 1 camerastraal/pixel 16 camerastralen/pixel 256 camerastralen/pixel 42
  • 43. Globale Belichting – Hybride Bemonstering Oplossing: hybride aanpak Hoekbemonstering om lichtpad uit te breiden met een nieuwe knoop + Directe belichting expliciet bemonsteren voor elke knoop op het lichtpad • i.e. expliciet een schaduwstraal sturen naar elk van de lichtbronnen (= Next Event Estimation) 43
  • 44. 44
  • 45. Globale Belichting – Hybride Bemonstering Oplossing: hybride aanpak Hoekbemonstering om lichtpad uit te breiden met een nieuwe knoop + Directe belichting expliciet bemonsteren voor elke knoop op het lichtpad • i.e. expliciet een schaduwstraal sturen naar elk van de lichtbronnen (= Next Event Estimation) Probleem: sommige paden worden 2x in rekening gebracht • via hoekbemonstering en via Next Event Estimation Oplossing: Indien je via hoekbemonstering rechtstreeks een lichtbron raakt, negeer de bijdrage van deze lichtbron 𝐿 𝑒 𝑝, 𝜔 𝑜 • i.e. return een nulradiantie 45
  • 46. Globale Belichting – Hybride Bemonstering Typische resultaten: 256 camerastralen/pixel 16 camerastralen/pixel 4 camerastralen/pixel 1 camerastraal/pixel 46
  • 47. Globale Belichting – Recursie Maximale recursiediepte • i.e. return een nulradiantie indien lichtpaden geen lichtbron bereikt hebben 47
  • 48. 48
  • 49. 0 oppervlakte-interacties 0+1 oppervlakte-interacties 0+1+2 oppervlakte-interacties 49
  • 50. Globale Belichting Voorzie ook functionaliteit om enkel één bepaalde paddiepte weer te geven: • Enkel het directe licht; • Enkel het licht na exact 1 indirecte oppervlakte-interactie; • Enkel het licht na exact 2 indirecte oppervlakte-interacties; • Etc. Wat leer je hieruit? 50
  • 51. Globale Belichting – Recursie Maximale recursiediepte • i.e. return een nulradiantie indien lichtpaden geen lichtbron bereikt hebben Branching factor • Om inkomende radiantie te bepalen in een shading point, kan je kiezen om 1 of meerdere stralen te gebruiken. • Onderzoek het effect van verschillende branching factors op de convergentie. 51
  • 52. 52
  • 53. Globale Belichting – Recursie Maximale recursiediepte • i.e. return een nulradiantie indien lichtpaden geen lichtbron bereikt hebben Branching factor • Om inkomende radiantie te bepalen in een shading point, kan je kiezen om 1 of meerdere stralen (= branching factor) te gebruiken. • Onderzoek het effect van verschillende branching factors op de convergentie. Russische Roulette (optioneel) • voor het bekomen van niet-vertekend resultaten • Wat zou een goede keuze zijn van stop-kans? Waarvan afhankelijk? 53
  • 55. Globale Belichting – Caustics Reflectieve materialen (en hun reflectieve caustics) moet/kan je nu nog de hemisfeer bemonsteren via de hoekbemonstering? 55
  • 56. Globale Belichting – Caustics Refractieve materialen (en hun refractieve caustics) (optioneel) moet/kan je nu nog de hemisfeer bemonsteren via de hoekbemonstering? 56
  • 57. Globale Belichting Hoe zit het met het convergentiegedrag van de twee algoritmen? 1. Brute force path tracer (i.e. hoekbemonstering) 2. Hybride path tracer (i.e. hoekbemonstering + Next Event Estimation) Heeft de grootte van een oppervlaktelichtbron impact op het convergentiegedrag van de twee algoritmen? Bespreek dit alles bv. aan de hand van de Root Mean Squared Error. 57
  • 58. Intermezzo: Root Mean Squared Error Een mogelijke ‘convergentie-maat’ is de Root Mean Squared Error (RMSE), een schatter voor de ‘afwijking’ over alle pixels: RMSE = σ 𝑗 𝑃 𝐿𝑗 − 𝐿𝑗 REF 2 𝑃 t.o.v. ‘goed-geconvergeerde’ referentieafbeelding met pixelwaarden 𝐿𝑗 REF Hoe gedraagt de RMSE zich in termen van het aantal camerastralen? (Wat weet je uit de theorie van Monte Carlo schatters?) Interessant voor je verslag? Extra doordenkers (optioneel): bekijk eens de distributie van de afwijkingen 𝐿𝑗 − 𝐿𝑗 REF ; wat met gammacorrectie (i.e. RMSE ervoor of erna?); wat met grote dynamische bereiken? 58
  • 61. Evaluatie – Alle Tracks Grondig academisch/wetenschappelijk verslag met bespreking en verantwoording van experimenten en hun resultaten met als doel een correcte implementatie en inzicht weer te geven. Bespreek enkel Deel 3. Geen exact opgelegd aantal pagina’s of formaat. (Je verslag wordt meerdere malen afgedrukt, dus denk wat aan het milieu en houd het enigszins compact; liever niet >15 pagina’s.) Examen = mondelinge bespreking van verslag 61
  • 63. 63