Top Banner
Usman Alim [email protected]
13

Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

Apr 20, 2018

Download

Documents

habao
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 2: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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

Page 3: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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

Page 4: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

Modeling tools

Manual editing

Scene description file

.pbrt

Renderer

HDR Image file

Page 5: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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

Page 6: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

13 key classes (p. 16)

Page 7: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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

Page 8: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

Major component that traces rays

Multithreaded using screne-space decomposition

Page 9: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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

Page 10: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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

Page 11: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities
Page 12: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities

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)

Page 13: Usman Alim ualim@sfutorsten/Teaching/Cmpt461/LectureNotes/Tutorial/... · A physically based rendering system based on the ray-tracing algorithm Think in terms of physical quantities