Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based...
Transcript of Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based...
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
Pros
• Flexible and well-tested
framework
• Saves you the pain of
writing bootstrapping
code
• Abstract and modular
design, so you can focus
on certain aspects of
interest
Cons
• Learning curve!
• Basic design is already
set, can be hard to
modify
Used to describe the geometry and lighting .pbrt file extension
Can edit scene manually • support for various geometric primitives
(spheres, quadrics, triangle meshes etc.) and materials
Or export from a modeling software • scripts included for 3ds Max, Blender,
Mathematica and Structure Synth
Specify scene using directives and identifiers along with parameters
Identifiers correspond to the class names
System takes care of parsing and instantiating appropriate objects
More details in Appendix B
Also see docs/fileformat.pdf
High Dynamic Range (HDR) image analogous to the raw output of a camera
Saved in the OpenEXR format
Has to be suitably tone-mapped for a computer screen ◦ view using exrdisplay
◦ convert to another format, exrtopng, exr2tiff
Copy to a local directory and compile ◦ On linux, a simple make should do it
Experiment with the provided scenes ◦ Look in scenes/
◦ More scenes available here
◦ Build your own scenes or modify the provided ones
Extend pbrt
1. Extend the appropriate classes (e.g. Ripples2DTexture that extends Texture)
2. Provide instantiation code that extracts parameters and invokes the constructor (e.g. CreateRipplesFloatTexture)
3. Add calls in the appropriate Make function in core/api.cpp (e.g. MakeFloatTexture)