README.md.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <meta charset="utf-8" lang="en"><style class="fallback">body{visibility:hidden;}</style>
  2. # Overview
  3. This repository includes a number of example scenes and
  4. data for use with the [pbrt-v3](https://github.com/mmp/pbrt-v3) renderer,
  5. which corresponds to the system described in the third edition of
  6. _Physically Based Rendering_, by Matt Pharr, Wenzel Jakob, and Greg
  7. Humphreys. (See also the [pbrt website](http://pbrt.org).)
  8. We hope that this data will be useful to users of `pbrt`, developers making
  9. changes to the system, and researchers in rendering. To our knowledge, all
  10. of these scenes and data can be used fairly freely. Some data is licensed
  11. under a Creative Commons Attribution license; see details in
  12. Section [Scene Credits] of this document.
  13. # Data Sets
  14. In addition to example scenes, there is some useful data for use with the
  15. system.
  16. * [bsdfs/](bsdfs/): this directory includes a variety of bidirectional scattering
  17. distribution functions (BSDFs) for use with the `FourierMaterial`. See, for
  18. example, the [coffee-splash](coffee-splash) scene for use of such a BSDF in a scene.
  19. * New versions of BSDFs for use with `FourierMaterial` can be generated
  20. with [layerlab](https://github.com/wjakob/layerlab/).
  21. * [lenses/](lenses/): lens description files for a handful of real-world lens
  22. systems, for use with the `RealisticCamera`. See the scenes
  23. [villa/villa-photons.pbrt](villa/villa-photons.pbrt) and
  24. [sanmiguel/f6-17.pbrt](sanmiguel/f6-17.pbrt) for examples of their use.
  25. * [spds/](spds/): measured spectral power distributions for a variety of standard
  26. illuminants, light sources, metals, and the squares of the Macbeth color
  27. checker.
  28. # Scenes
  29. A variety of scenes are available, ranging from simple ones that show off
  30. an individual feature of the system, to more interesting ones that
  31. demonstrate complex lighting effects in scenes with detailed geometry and
  32. realistic reflection models.
  33. Scene files for many of the rendered figures in the book are included here;
  34. for example, [dragon/f11-13.pbrt](dragon/f11-13.pbrt) corresponds to Figure
  35. 11.13 in the third edition of the book.
  36. ## Directory Organization
  37. We've tried to organize all of the scene directories in a consistent
  38. manner; each scene directory is self-contained, containing all of the
  39. geometry, textures, and additional data needed to render the scene.
  40. With a few exceptions, each `*.pbrt` file in a scene directory represents a
  41. separate variant of the scene to be rendered (possibly with different light
  42. source configurations, different camera positions, etc.) Some scenes have
  43. `geometry.pbrt`, `lights-*.pbrt` and `materials.pbrt` files that collect
  44. common geometry and material definitions across these variants. Thus, you
  45. should be able to just run `pbrt scene-name.pbrt` for any of the remaining
  46. `*.pbrt` files to render the corresponding scene.
  47. Complex triangle meshes and other complex geometry is stored in the
  48. `geometry/` directories and texture maps are all in the respective
  49. `textures/` directories. (Similarly, any SPDs, realistic camera lenses,
  50. or BSDF files are stored in corresponding sub-directories.)
  51. The [images/](images/) directory (which has a structure that parallels that
  52. of the scene directories) has EXR and PNG files corresponding to the final
  53. output from rendering each corresponding scene. All PNGs were generated
  54. using the `imgtool` program from the `pbrt-v3` distribution; many had a
  55. scale factor applied with the `--scale` command-line option, and a number
  56. include a bit of bloom to improve visual realism (via the `--bloomlevel`
  57. and related command-line options.)
  58. ## Overview of Scenes
  59. ![day](images/barcelona-pavillion/pavillion-day.png height="200px")
  60. ![night](images/barcelona-pavillion/pavillion-night.png height="200px")
  61. [barcelona-pavillion](barcelona-pavillion): Model of van der Rohe's classic
  62. [Barcelona Pavillion](https://en.wikipedia.org/wiki/Barcelona_Pavilion),
  63. including both daytime and nighttime lighting setups.
  64. ![](images/bathroom/bathroom.png height="200px")
  65. [bathroom](bathroom): Modern bathroom with soft indirect lighting and
  66. depth of field.
  67. ![](images/bmw-m6/bmw-m6.png height="200px")
  68. [bmw-m6](bmw-m6): BMW M6 car (model year 2006) illuminated by a realistic
  69. skylight model.
  70. Fred C. M'ule Jr. ('tyrant monkey')
  71. ![](images/breakfast/breakfast-lamps.png height="200px")
  72. [breakfast](breakfast): Indoor scene with chairs around a table. One
  73. variant has light streaming in through blinds from the side, while
  74. another is only illuminated by the lights above the table. (For the
  75. second variant, light transport through the glass light fixtures is a
  76. good challenge for many light transport algorithms.)
  77. ![](images/buddha-fractal/buddha-fractal.png height="200px")
  78. [buddha-fractal](buddha-fractal): Stanford Buddha model made out of Stanford Buddha
  79. models. 25,250 instances, each with 29,890 triangles, giving a total
  80. geometric complexity of over 750 million triangles.
  81. ![](images/bunny-fur/f3-15.png height="200px")
  82. [bunny-fur](bunny-fur): Stanford Bunny with fur growing out of it, modeled using the
  83. new curve shape added to `pbrt` in the third edition of the book. Over
  84. 1.5 million curves are used.
  85. ![](images/caustic-glass/f16-9c.png height="200px")
  86. [caustic-glass](caustic-glass): Caustic pattern projected through a realistic model of a
  87. glass.
  88. ![](images/chopper-titan/chopper-titan.png height="200px")
  89. [chopper-titan](chopper-titan): Shiny motorcycle sitting on a glossy
  90. surface, illuminated by a sunset.
  91. ![](images/cloud/f15-4c.png height="200px")
  92. [cloud](cloud): One scene with a bright white cloud, showing the effect of
  93. multiple scattering in participating media, and another, with the same
  94. volume density but with much more absorption, showing the difference
  95. between highly-scattering and highly-absorptive media.
  96. ![](images/coffee-splash/splash.png height="200px")
  97. [coffee-splash](coffee-splash): A splash of coffee in a cup with a spoon, showing a
  98. complex simulated BRDF for the cup and saucer, and scattering in
  99. participating media inside the splash.
  100. ![](images/crown/crown.png height="200px")
  101. [crown](crown): Detailed model of the Austrian Imperial Crown.
  102. ![](images/dragon/f9-3.png height="200px")
  103. [dragon](dragon): A scanned dragon model rendered with many different materials,
  104. showing off the visual differences between them.
  105. ![](images/ecosys/ecosys.png height="200px")
  106. [ecosys](ecosys): Complex outdoor scene with many plants and trees.
  107. [figures](figures): A variety of fairly simple scenes used for figures in the book.
  108. ![](images/ganesha/ganesha.png height="200px")
  109. [ganesha](ganesha): Very detailed scan of a small statue, illuminated by area
  110. light sources.
  111. ![](images/head/head.png height="200px")
  112. [head](head): Human head model with a realistic BSSRDF, showing the effect of
  113. subsurface scattering.
  114. ![](images/killeroos/killeroo-gold.png height="200px")
  115. [killeroos](killeroos): The classic "killeroo" model, in a variety of settings.
  116. ![view-0](images/landscape/view-0.png height="200px")
  117. ![view-1](images/landscape/view-1.png height="200px")
  118. ![view-2](images/landscape/view-2.png height="200px")
  119. ![view-3](images/landscape/view-3.png height="200px")
  120. [landscape](landscape): Very complex realistic outdoor landscape scene, featuring
  121. 23,241 unique plant models. Thanks to object instancing, the scene has a
  122. total geometric complexity of 3.1 billion triangles, even though only 24
  123. million triangles need to be stored in memory.
  124. ![](images/pbrt-book/book.png height="200px")
  125. [pbrt-book](pbrt-book): A realistic model of the second edition of the _Physically
  126. Based Rendering_ book.
  127. ![](images/sanmiguel/sanmiguel.png height="200px")
  128. [sanmiguel](sanmiguel): A complex model inspired by a hotel in San Miguel de
  129. Allende, Mexico.
  130. [simple](simple): A variety of relatively simple scenes.
  131. ![](images/sportscar/sportscar.png height="200px")
  132. [sportscar](sportscar): Sportscar model, in a variety of illumination settings,
  133. showing off the substantial differences in overall visual appearance that
  134. result.
  135. ![](images/sssdragon/dragon_10.png height="200px")
  136. [sssdragon](sssdragon): Dragon model rendered with subsurface scattering, showing
  137. the effect of changing the density of the scattering medium in the
  138. various scene description files.
  139. ![](images/structuresynth/arcsphere.png height="200px")
  140. [structuresynth](structuresynth): A few interesting procedural scenes scenes converted
  141. from [Structure Synth](http://structuresynth.sourceforge.net) into
  142. `pbrt`'s format.
  143. ![](images/tt/tt.png height="200px")
  144. [tt](tt): Audi TT car model.
  145. ![](images/veach-bidir/bidir.png height="200px")
  146. [veach-bidir](veach-bidir): A version of a classic scene with a variety of complex
  147. types of light transport developed by Eric Veach to show the value of
  148. bidirectional path tracing.
  149. ![](images/veach-mis/f14-13-mi.png height="200px")
  150. [veach-mis](veach-mis): Another scene based on one by Eric Veach, this one showing
  151. off the benefit of multiple importance sampling when rendering surfaces
  152. of varying glossiness illuminated by light sources of various sizes.
  153. ![](images/villa/villa-daylight.png height="200px")
  154. [villa](villa): Modern indoor environment. The `villa-daylight.pbrt` version is
  155. particularly tricky to render, as all of the indoor lighting comes via
  156. specular paths from the outside through the windows.
  157. ![](images/vw-van/vw-van.png height="200px")
  158. [vw-van](vw-van): Volkswagen Van, illuminated by a HDR environment map.
  159. ![](images/volume-caustic/caustic.png height="200px")
  160. [volume-caustic](volume-caustic): A glass sphere in participating media, showing off a
  161. volumetric caustic--light being focused in the scattering medium after
  162. passing through the sphere.
  163. ![Whiteroom daytime](images/white-room/whiteroom-daytime.png height="200px")
  164. ![Whiteroom night](images/white-room/whiteroom-night.png height="200px")
  165. [white-room](white-room): Interior scene, with two illumination
  166. configurations. The daytime variant is primarily illuminated by light
  167. coming through the windows from the outdoors, while the nighttime version
  168. is illuminated by the two lights in the scene.
  169. ![](images/yeahright/yeahright.png height="200px")
  170. [yeahright](yeahright): An unusual and intricate form on a glossy plate.
  171. [wip](wip): This directory has a few scenes that aren't quite ready;
  172. renderings don't yet look great, parameters need tuning, etc. We'll try
  173. to get to this eventually, or if you're able to get them in good shape,
  174. please submit an update (see the following).
  175. # Converting Scenes to pbrt's Format
  176. Given an amazing scene in another 3D file format, there are a few
  177. options for converting it to be used in pbrt. (We're always happy to have
  178. help with improvements in this area!)
  179. ## Cinema 4D
  180. The `exporters/cinema4d` directory in the pbrt-v3 distribution provides an
  181. exporter from Cinema 4D. This exporter was developed to export the amazing
  182. "landscape" scene that is on the book's front cover from Cinema 4D, so thus
  183. is up to date with respect to pbrt's material models and rendering
  184. settings. We have seen good results with using this exporter for other
  185. Cinema 4D scenes.
  186. ## Wavefront OBJ
  187. The pbrt-v3 distribution includes a converter from the Wavefront OBJ
  188. format, `obj2pbrt`, that is built when the rest of the system is compiled.
  189. To run it, provide the path to an OBJ file and a filename for a new pbrt
  190. file:
  191. ```bash
  192. $ obj2pbrt scene.obj scene.pbrt
  193. ```
  194. If there is an accompanying material description file (e.g. `scene.mtl`),
  195. the values in it will be roughly mapped to corresponding pbrt materials.
  196. You will likely need to manually edit and tune the materials in the
  197. generated pbrt file in order to achieve reasonably good-looking
  198. results.
  199. Note that OBJ files only describe scene geometry; they don't include camera
  200. specifications or descriptions of light sources. (Thus, the generated pbrt
  201. input file only includes shape and material specifications that you'll need
  202. to add inside the WorldBegin/WorldEnd block of a full pbrt input file.)
  203. Unless you have camera and light source information separately, you'll need
  204. to specify both on your own (see "General Tips" below for some ideas about
  205. how to do this.)
  206. ## Blender
  207. Many very nice scenes have been modeled in
  208. [Blender](https://www.blender.org/) and are freely available. (See, for
  209. example, the [BlendSwap](http://www.blendswap.com/) website for many
  210. scenes that can be used via a Creative Commons license.) Our experience has
  211. been that the best approach to export scenes from Blender is to use
  212. Blender's native OBJ export (available via the File/Export menu item) and
  213. then to use the obj2pbrt utility described above to convert to pbrt's
  214. format.
  215. Blender scene files may have texture maps for the scene included directly
  216. in their `.blend` file. Choose "File/External Data/Unpack into Files" in
  217. Blender to save those files independently on disk. (Note that if the
  218. textures aren't PNG or TGA format, you'll need to convert to one of those
  219. for pbrt to be able to use them.)
  220. We would have hoped that the Blender exporter for
  221. [LuxRender](http://www.luxrender.net) would have worked well for pbrt
  222. (LuxRender is originally based on pbrt and still has a similar input file
  223. format.) Unfortunately, our experience has been that exporting to OBJ and
  224. using obj2pbrt gives a better starting point for the scene
  225. materials. (Further, the LuxRender Blender exporter silently fails if there
  226. aren't any lights in the scene.) We suspect that using this exporter as a
  227. starting point for a new direct Blender to pbrt exporter might be a
  228. worthwhile approach.
  229. ## Old Exporters
  230. The pbrt-v2 distribution includes
  231. [exporters](https://github.com/mmp/pbrt-v2/tree/master/exporters) for 2010
  232. era 3DS Max (which was used for the model used for the cover image for the
  233. second edition of the book), Blender, Mathematica, and [Structure
  234. Synth](http://structuresynth.sourceforge.net/). All of these are very much
  235. out of date, both due to changes over the past six years in in the systems
  236. they exported from as well as changes in pbrt. Some of these may be useful
  237. for developing updated exporters for the corresponding systems for pbrt-v3.
  238. ## General Tips
  239. A scene exported using one of the above exporters is certain to not
  240. immediately render beautifully as is. Here are some suggestions for how to
  241. take an initial export and turn it into something that looks great.
  242. First, you may find it useful to run
  243. ```bash
  244. $ pbrt --toply scene.pbrt > newscene.pbrt
  245. ```
  246. This will convert triangle meshes into more compact binary PLY files,
  247. giving you a much smaller pbrt scene file to edit.
  248. Next, if the exporter doesn't include camera information, the first thing
  249. to do is to find a good view. The "environment" camera (which renders an
  250. image in all directions) can be useful for finding a good initial position
  251. for the camera. Keep rendering images and adjusting the camera position to
  252. taste. (For efficiency, use as few pixel samples as you can tolerate and
  253. learn to squint and interpret noisy renderings!) Then, you can use the
  254. origin you've chosen as the basis for specifying a `LookAt` transformation
  255. for a more conventional camera model.
  256. While placing the camera, it can be helpful to have a point light source at
  257. the camera's position. Adding a light source like the following to your
  258. scene file does this in a way that ensures that the light moves
  259. appropriately to wherever the camera has been placed. (You may need to
  260. scale the intensity up or down for good results--remember the
  261. radius-squared falloff!
  262. ```
  263. AttributeBegin
  264. CoordSysTransform "camera"
  265. LightSource "point" "color I" [10 10 10]
  266. AttributeEnd
  267. ```
  268. Once the camera is placed, we have found that it's next useful to set up
  269. approximate light sources. For outdoor scenes, a good HDR environment map
  270. is often all that is needed for lighting. (You may want to consider using
  271. `imgtool makesky` to make a realistic HDR sky environment map.)
  272. For indoor scenes, you may want a combination of an environment map for the
  273. outside and point and/or area light sources for interior lights. You may
  274. find it useful to examine the scene in the modeling system that it came
  275. from to determine which geometry corresponds to area light sources and to
  276. try adding `AreaLightSource` properties to those. (Note that in pbrt, area
  277. light sources only emit lights on the side that the surface normal points;
  278. you may need a `ReverseOrientation` directive to make the light come out in
  279. the right direction.)
  280. Given good lighting, the next step is to tune the materials (or set them
  281. from scratch). It can be helpful to pick a material and set it to an
  282. extreme value (such as a "matte" material that is pure red) and render the
  283. scene; this quickly shows which geometric models have that material
  284. associated with it. Alternatively, consdier applying this
  285. [patch](html/mtl.patch.txt) to your pbrt source tree; after rebuilding
  286. pbrt, if you set the `PBRT_MTL_HACK` environment variable, rendering the
  287. scene will cause a separate image to be generated for each `NamedMaterial`
  288. in the scene, with a filename corresponding to the material name. Each
  289. image will only include the objects with that material.
  290. As you figure out which material names correspond to what geometry, watch
  291. for objects that are missing texture maps and re-add them. (The good news
  292. is that such objects generally do have correct texture coordinates with
  293. them.
  294. # Submitting Updates
  295. We'd love to increase the scope (and quality) of scenes available for use
  296. with `pbrt`. If you have a nice scene in `pbrt`'s format that you'd like to
  297. have included in this distribution, or if you have improvements to the
  298. current set of scenes, we'd love to have them!
  299. Unfortunately, it's not possible to host large binary distributions on
  300. github, so it's a little more involved than sending a pull request. There
  301. are a few options for submitting updates.
  302. * For changes small enough to be sent via email, you can use
  303. `git format-patch` to make a patch that we can apply and push to the
  304. repository. (Send the patch to authors@pbrt.org.)
  305. * For larger changes, consider the `git bundle` command to generate a
  306. binary representation of the changes. Post the resulting file online
  307. somewhere that we can access it, send us a pointer (again,
  308. authors@pbrt.org), and we'll merge it.
  309. * Finally, if you're not comfortable enough with git for those options,
  310. feel free to create a zip or tar file with a new scene and send us a
  311. pointer to it; we can take it from there.
  312. # Scene Credits
  313. * barcelona-pavillion: Thanks to [Hamza Cheggour](http://www.emirage.org),
  314. who created this [great
  315. model](http://www.emirage.org/2013/04/24/free-download-archviz-project-pabellon-barcelona-3d-scene-v1-2-updated/)
  316. and made it available via a CC-BY license.
  317. * bathroom: Thanks to "nacimus", CC-BY license. Downloaded from
  318. http://www.blendswap.com/blends/view/73937.
  319. * bmw-m6: Thanks to Fred C. M'ule Jr. ("tyrant monkey" on BlendSwap) for
  320. this nice car model. CC-Zero (public domain) license. Downloaded from
  321. http://www.blendswap.com/blends/view/3557.
  322. * breakfast: Thanks to "Wig42", CC-BY license. Downloaded from
  323. http://www.blendswap.com/blends/view/75431.
  324. * buddha-fractal: Thanks for Guillermo M. Leal Llaguno for this fun variant
  325. of the Stanford Buddha model. (Buddha model courtesy [Stanford Computer
  326. Graphics Laboratory](http://graphics.stanford.edu/data/3Dscanrep/)).
  327. * bunny-fur: Bunny model courtesy [Stanford Computer Graphics
  328. Laboratory](http://graphics.stanford.edu/data/3Dscanrep/). Environment map
  329. via http://dativ.at/lightprobes/index.html, thanks to Bernhard Vogl.
  330. * caustic-glass: Thanks to Simon Wendsche (https://byob.carbonmade.com/) for
  331. the model.
  332. * chopper-titan: Thanks to julioras3d for this model; CC-BY
  333. license. Downloaded from http://www.blendswap.com/blends/view/67726.
  334. * cloud: Smoke dataset courtesy Duc Nguyen and Ron Fedkiw. Skylight
  335. environment map courtesy Nolan Goodnight.
  336. * coffee-splash: Scene thanks to "guismo"; CC-Attribution license.
  337. Downloaded from http://www.blendswap.com/blends/view/56136. Environment map
  338. via http://dativ.at/lightprobes/index.html, thanks to Bernhard Vogl.
  339. * crown: This amazing model was created by Martin Lubich
  340. (http://www.loramel.net/).
  341. * dragon: Dragon model courtesy Christian Schüller. Environment map via
  342. http://dativ.at/lightprobes/index.html, thanks to Bernhard Vogl.
  343. * ecosys: Scene from Deussen et al., [Realistic modeling and rendering of
  344. plant ecosystems](http://dl.acm.org/citation.cfm?id=280898).
  345. * ganesha: Model scanned by Wenzel Jakob.
  346. * head: Model thanks to Infinite Realities, Inc., CC-Attribution license.
  347. Environment map thanks to [USC-ICT light probe image gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  348. * killeroos: Thanks to [headus](http://www.headus.com/au)/Rezard for the
  349. model.
  350. * landscape: Many thanks to Jan-Walter Schliep, Burak Kahraman, and Timm
  351. Dapper from [Laubwerk](http://www.laubwerk.com) for this amazing scene.
  352. * pbrt-book: Thanks to Karl Li (yiningkarlli@) for this fun model.
  353. * sanmiguel: Thanks to Guillermo M. Leal Llaguno for this excellent scene.
  354. * sportscar: Excellent model and pbrt conversion courtesy of Yasutoshi
  355. Mori (@MirageYM); CC-BY license. Skylight environment maps courtesy Nolan
  356. Goodnight.
  357. * sssdragon: Dragon model courtesy [Stanford Computer Graphics
  358. Laboratory](http://graphics.stanford.edu/data/3Dscanrep/). Environment map
  359. via http://dativ.at/lightprobes/index.html, thanks to Bernhard Vogl.
  360. * structuresynth: Environment map thanks to [USC-ICT light probe image gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  361. * tt: Thanks for Marko Dabrovic and Mihovil Odak for the car model.
  362. Environment map thanks to [USC-ICT light probe image gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  363. * villa: Many thanks to Florent Boyer for this scene. Skylight environment
  364. map courtesy Nolan Goodnight.
  365. * vw-van: Model courtesy of
  366. [Greyscalegorilla](https://greyscalegorilla.com/gsg-free-model-pack-for-cinema-4d/),
  367. exported from Cinema4D using the [Cinema4D pbrt
  368. exporter](https://github.com/mmp/pbrt-v3/tree/master/exporters/cinema4d).
  369. * white-room: Scene thanks to Jay Hardy, CC-Attribution
  370. license. Downloaded from http://www.blendswap.com/blends/view/41683.
  371. * yeahright: "Interesting" shape generated by Keenan Crane
  372. (http://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/). Environment
  373. map thanks to [USC-ICT light probe image
  374. gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  375. <!-- Markdeep: --><style class="fallback">body{visibility:hidden;}</style><script src="html/markdeep.min.js"></script>