pbrt-v3 tutorialvda.univie.ac.at/.../17w/lecturenotes/tutorial-v3.pdf · 2017. 10. 5. · pbrt-v3...
TRANSCRIPT
![Page 2: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/2.jpg)
© Alireza Ghane
What is PBRT?
• A physically based rendering system based on the ray-tracing algorithm– Think in terms of physical quantities and units
• Well documented in a literate programming style– Theory is coupled with implementation– Highly cross-referenced content– Book serves as API documentation
2
![Page 3: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/3.jpg)
© Alireza Ghane
Working with PBRT
3
Pros Cons‣ Flexible and well-tested
framework‣ Saves your the pain of
writing bootstrapping code‣ Abstract and modular
design, so you can focus on certain aspects of interest
‣ Learning curve!‣ Basic design is already
set, can be hard to modify
![Page 4: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/4.jpg)
© Alireza Ghane
System Overview
4
![Page 5: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/5.jpg)
© Alireza Ghane
Scene Description File• Used to describe the geometry and lighting
with .pbrt file extension
5
Can edit scene manually •Support for various geometry primitives (sphere, quadrics, triangle meshes, etc.) and materials•Or export from a modelling software
•Scripts included for 3ds Max, Blender, Mathematica and Structure Synth
![Page 6: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/6.jpg)
© Alireza Ghane
Abstract Base Classes
6
![Page 7: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/7.jpg)
© Alireza Ghane
.pbrt File Format
• Specific scene using directives and identifiers along with parameters
• Identifiers correspond to class names• System takes care of parsing and
instantiating appropriate objects• More details in Appendix B• Also see
http://pbrt.org/users-guide.html
7
![Page 8: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/8.jpg)
© Alireza Ghane
The Renderer• Major components that traces rays• Multithreaded using scene-space decomposition
8
![Page 9: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/9.jpg)
© Alireza Ghane
Output Image• High Dynamic Range (HDR) image
analogous to the rat output of a camera• Saved in OpenEXR format• Has to be suitably tone-mapped for a
computer screen– View using exrdisplay– Convert to another format with exttopng, exr2tiff, …
9
![Page 10: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/10.jpg)
© Alireza Ghane
How to get your feet wet• Download the code from
http://pbrt.org
• Build makefile with CMake• Download scenes from the scenes
repository (in http://pbrt.org)• You can modify the .pbrt file to modify
the scene
10
![Page 11: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/11.jpg)
© Alireza Ghane
How to Extend PBRT
• Extend the appropriate classes (e.g. Ripples2DTexture that extends Texture)
• Provide instantiation code that extracts parameters and invokes the constructor (e.g. CreateRipplesFloatTexture)
• Add calls in the appropriate Make function in core/api.cpp (e.g. MakeFloatTexture)
11
![Page 12: PBRT-v3 Tutorialvda.univie.ac.at/.../17w/LectureNotes/tutorial-v3.pdf · 2017. 10. 5. · PBRT-v3 Tutorial 052213 Image Synthesis ... • Well documented in a literate programming](https://reader035.vdocument.in/reader035/viewer/2022063009/5fc0bdcb38921a1301563697/html5/thumbnails/12.jpg)
© Alireza Ghane
Questions?
12