README.md.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  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.) Sometimes the corresponding `*.pbrt`
  58. file has a comment under the `Film` directive with the command line options
  59. that were used for `imgtool`.
  60. ## A Note about Clamped Sample Values
  61. Some of these scenes have very difficult-to-sample light transport paths
  62. that in turn cause high variance, which manifests itself as scattered very
  63. bright pixels in images (often called "fireflies"). (For example, scenes
  64. with bumpy specular surfaces that are illuminated by realistic sky environment
  65. maps suffer from this issue when a path intersects the specular surface and
  66. is then scattered such that it happens to intersect the sun.)
  67. There is an option for pbrt's Film implementation that allows the user to
  68. specify a maximum value for the luminance of any sample added to the film;
  69. if enabled, any sample with a larger luminance has its luminance scaled
  70. down so that it is equal to the maximum. In turn, the impact of fireflies
  71. in images can be greatly reduced.
  72. We have used this option for a number of challenging scenes in the
  73. following. As such, **bias has been introduced into the the images that
  74. pbrt generates for those scenes**. We highlight this issue for two reasons:
  75. first, if you want to use those scenes as unbiased comparisons to another
  76. rendering system or to your implementation of a new light transport
  77. algorithm, it's important to be aware of this (and likely, to modify the
  78. scene files to disable this setting). Second, if you're developing a new
  79. light transport algorithm, these scenes provide a number of challenging
  80. situations that current algorithms don't handle well; new algorithms that
  81. handle them effectively would be useful contributions to rendering.
  82. ## Overview of Scenes
  83. (##) Barcelona Pavilion
  84. ![](images/barcelona-pavilion/pavilion-day.png height="200px")
  85. ![](images/barcelona-pavilion/pavilion-night.png height="200px")
  86. [barcelona-pavilion](barcelona-pavilion): Model of van der Rohe's classic
  87. [Barcelona Pavilion](https://en.wikipedia.org/wiki/Barcelona_Pavilion),
  88. including both daytime and nighttime lighting setups. In the daytime setup,
  89. all illumination comes from a realistic sky model encoded in an HDR
  90. environment map. The night model has a very dark sky map and a number of
  91. area light sources; it is particularly challenging to render, as much of
  92. the illumination travels through one or more layers of glass before hitting
  93. a surface.
  94. barcelona-pavilion: Thanks to [Hamza Cheggour](http://www.emirage.org), who
  95. created this [great
  96. model](http://www.emirage.org/2013/04/24/free-download-archviz-project-pabellon-barcelona-3d-scene-v1-2-updated/)
  97. and made it available via a
  98. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license.
  99. (##) Bathroom
  100. ![](images/bathroom/bathroom.png height="200px")
  101. [bathroom](bathroom): Modern bathroom with soft indirect lighting and
  102. depth of field. Given the mirrors and bright wight walls, multi-bounce
  103. indirect illumination has a substantial effect on the overall appearance
  104. of the scene.
  105. Thanks to "nacimus", who made this scene available under the
  106. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Downloaded
  107. from [Blendswap](http://www.blendswap.com/blends/view/73937).
  108. (##) BMW M6
  109. ![](images/bmw-m6/bmw-m6.png height="200px")
  110. [bmw-m6](bmw-m6): BMW M6 car (model year 2006) illuminated by a realistic
  111. skylight model.
  112. Thanks to Fred C. M'ule Jr. ("tyrant monkey" on BlendSwap) for this nice
  113. car model. [CC-Zero](https://creativecommons.org/publicdomain/zero/1.0/)
  114. (public domain) license. Downloaded from
  115. [Blendswap](http://www.blendswap.com/blends/view/3557).
  116. (##) Breakfast
  117. ![](images/breakfast/breakfast-lamps.png height="200px")
  118. [breakfast](breakfast): Indoor scene with chairs around a table. One
  119. variant of the scene has light streaming in through blinds from the side
  120. such that most of the scene is only illuminated indirectly; finding these
  121. indirect illumination paths can be challenging. Another variant is only
  122. illuminated by the lights above the table; handling the resulting light
  123. transport through the glass light fixtures is a good challenge for many
  124. light transport algorithms.
  125. Thanks to "Wig42", who made this scene available under a
  126. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Downloaded
  127. from [Blendswap](http://www.blendswap.com/blends/view/75431).
  128. (##) Buddha Fractal
  129. ![](images/buddha-fractal/buddha-fractal.png height="200px")
  130. [buddha-fractal](buddha-fractal): Stanford Buddha model made out of Stanford Buddha
  131. models. 25,250 instances, each with 29,890 triangles, giving a total
  132. geometric complexity of over 750 million triangles.
  133. Thanks for Guillermo M. Leal Llaguno for this fun variant
  134. of the Stanford Buddha model. (Buddha model courtesy [Stanford Computer
  135. Graphics Laboratory](http://graphics.stanford.edu/data/3Dscanrep/)).
  136. (##) Bunny Fur
  137. ![](images/bunny-fur/f3-15.png height="200px")
  138. [bunny-fur](bunny-fur): Stanford Bunny with fur growing out of it, modeled using the
  139. new curve shape added to `pbrt` in the third edition of the book. Over
  140. 1.5 million curves are used.
  141. Bunny model courtesy [Stanford Computer Graphics
  142. Laboratory](http://graphics.stanford.edu/data/3Dscanrep/). Environment map
  143. thanks to [Bernhard Vogl](http://dativ.at/lightprobes/index.html).
  144. (##) Caustic Glass
  145. ![](images/caustic-glass/f16-9c.png height="200px")
  146. [caustic-glass](caustic-glass): A delightfully complex caustic pattern that
  147. results from light being projected through a realistic model of a bumpy
  148. glass.
  149. Thanks to Simon Wendsche (https://byob.carbonmade.com/) for
  150. the model.
  151. (##) Chopper Titan
  152. ![](images/chopper-titan/chopper-titan.png height="200px")
  153. [chopper-titan](chopper-titan): Shiny motorcycle sitting on a glossy
  154. surface, illuminated by a sunset.
  155. Thanks to julioras3d for this model;
  156. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Downloaded
  157. from [Blendswap](http://www.blendswap.com/blends/view/67726).
  158. (##) Cloud
  159. ![White cloud](images/cloud/cloud.png height="200px")
  160. ![Smoky cloud](images/cloud/smoke.png height="200px")
  161. [cloud](cloud): One scene with a bright white cloud, showing the effect of
  162. multiple scattering in participating media, and another, with the same
  163. volume density but with much more absorption, leading to a much darker
  164. cloud. The two images show the difference between highly-scattering and
  165. highly-absorptive media.
  166. Smoke dataset courtesy Duc Nguyen and Ron Fedkiw. Skylight
  167. environment map courtesy Nolan Goodnight.
  168. (##) Coffee Splash
  169. ![](images/coffee-splash/splash.png height="200px")
  170. [coffee-splash](coffee-splash): A splash of coffee in a cup with a spoon,
  171. rendered using a complex simulated BRDF for the cup and saucer, and
  172. multiple scattering in participating media inside the splash.
  173. Scene thanks to "guismo";
  174. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Downloaded
  175. from [Blendswap](http://www.blendswap.com/blends/view/56136). Environment
  176. thanks to [Bernhard Vogl](http://dativ.at/lightprobes/index.html).
  177. (##) Contemporary Bathroom
  178. ![](images/contemporary-bathroom/contemporary-bathroom.png height="200px")
  179. [contemporary-bathroom](contemporary-bathroom): Another contemporary
  180. bathroom scene. This scene is quite challenging to render without visible
  181. noise: specular light transport by the large mirror and the
  182. very small area light sources surrounded by glass in the light bulbs are
  183. difficult to render efficiently.
  184. Scene thanks to [Mareck](http://www.studios-cad.fr/galerie.html),
  185. [CC-Zero](https://creativecommons.org/publicdomain/zero/1.0/) (public
  186. domain) license. "contemporary_china" texture used for wallpaper thanks to
  187. [Adam Charlts](http://subtlepatterns.com/contemporary-china/); texture
  188. contrast was increased for the render. "American_walnut_pxr128" wood
  189. texture courtesy [Pixar Animation
  190. studios](https://community.renderman.pixar.com/article/114/library-pixar-one-twenty-eight.html),
  191. [CC-BY](https://creativecommons.org/licenses/by/4.0/) license. Abstract
  192. print seen in mirror based on a smoke photograph by [Vanessa
  193. Pike-Russell](https://www.flickr.com/photos/lilcrabbygal/),
  194. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license; the photo
  195. was inverted and contrast was adjusted for rendering. Hurricane image used
  196. for photo on wall courtesy [NASA Goddard Space Flight
  197. Center](https://www.flickr.com/photos/gsfc),
  198. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license.
  199. (##) Crown
  200. ![](images/crown/crown.png height="200px")
  201. [crown](crown): Detailed model of the Austrian Imperial Crown, featuring an
  202. accurate reflection model for the gold metal surfaces, and many gems that
  203. refract light passing through them.
  204. This amazing model was created by Martin Lubich (http://www.loramel.net/).
  205. (##) Dam Break
  206. ![](images/dambreak/dambreak0.png height="200px")
  207. ![](images/dambreak/dambreak1.png height="200px")
  208. [dambreak](dambreak): two frames of a fluid simlulation from [Yining Karl
  209. Li](http://www.yiningkarlli.com)'s nifty [Ariel fluid
  210. simulator](http://www.yiningkarlli.com/projects/arielflip.html).
  211. (##) Dragon
  212. ![](images/dragon/f9-3.png height="200px")
  213. [dragon](dragon): A scanned dragon model rendered with many different materials,
  214. showing off the visual differences between them.
  215. Dragon model courtesy Christian Schüller. Environment map
  216. thanks to [Bernhard Vogl](http://dativ.at/lightprobes/index.html).
  217. (##) Ecosystem
  218. ![](images/ecosys/ecosys.png height="200px")
  219. [ecosys](ecosys): Fairly complex outdoor scene with many plants and trees,
  220. illuminated by an environment map. This scene was used for the cover image
  221. for the first edition of _Physically Based Rendering_.
  222. Scene from Deussen et al., [Realistic modeling and rendering of plant
  223. ecosystems](http://dl.acm.org/citation.cfm?id=280898).
  224. (##) Figures
  225. [figures](figures): A variety of fairly simple scenes used for figures in the book.
  226. (##) Ganesha
  227. ![](images/ganesha/ganesha.png height="200px")
  228. [ganesha](ganesha): Very detailed scan of a small statue with over 4.3
  229. million triangles, illuminated by a few area light sources.
  230. Model scanned by Wenzel Jakob.
  231. (##) Hair
  232. ![Curly hair](images/hair/curly-hair.png height="200px")
  233. ![Straight hair](images/hair/straight-hair.png height="200px")
  234. [hair](hair): Hair geometry to show off the hair scattering model now
  235. available in pbrt, as described in [The Implementation of a
  236. Hair Scattering Model](http://pbrt.org/hair.pdf).
  237. Many thanks to [Cem Yuskel](http://www.cemyuksel.com/) for the hair
  238. geometry, which is licensed under a "no commercial use" license.
  239. (##) Head
  240. ![](images/head/head.png height="200px")
  241. [head](head): Human head model with a realistic BSSRDF, showing the effect of
  242. subsurface scattering.
  243. Model thanks to Infinite Realities, Inc.,
  244. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Environment
  245. map thanks to [USC-ICT light probe image
  246. gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  247. (##) Killeroo
  248. ![](images/killeroos/killeroo-gold.png height="200px")
  249. [killeroos](killeroos): The classic "killeroo" model, in a variety of settings.
  250. Thanks to [headus](http://www.headus.com/au)/Rezard for the model.
  251. (##) Landscape
  252. ![](images/landscape/view-0.png height="200px")
  253. ![](images/landscape/view-1.png height="200px")
  254. ![](images/landscape/view-2.png height="200px")
  255. ![](images/landscape/view-3.png height="200px")
  256. [landscape](landscape): Very complex realistic outdoor landscape scene,
  257. featuring 23,241 unique plant models. Thanks to object instancing, the
  258. scene has a total geometric complexity of 3.1 billion triangles, even
  259. though only 24 million triangles need to be stored in memory. `view-0.pbrt`
  260. is the cover image of the third edition of the _Physically Based Rendering_
  261. book.
  262. Many thanks to Jan-Walter Schliep, Burak Kahraman, and Timm
  263. Dapper from [Laubwerk](http://www.laubwerk.com) for this amazing scene.
  264. (##) LTE Orb
  265. ![Rough glass around gold](images/lte-orb/lte-orb-roughglass.png height="200px")
  266. ![Silver around diffuse](images/lte-orb/lte-orb-silver.png height="200px")
  267. [lte-orb](lte-orb): Spherical orb with an inset spherical object. The
  268. geometric structure of the shapes involved provides a useful tool for
  269. visualizing the appearance of various materials.
  270. Thanks to Yasutoshi Mori (@MirageYM) for this model;
  271. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license.
  272. (##) Measure One
  273. ![](images/measure-one/frame25.png height="200px")
  274. ![](images/measure-one/frame380.png height="200px")
  275. [measure-one](measure-one): A number of frames converted from Beeple's
  276. amazing [Zero-Day](https://vimeo.com/140163198) animation. Converted from
  277. Cinema4D files downloaded from [Beeple's
  278. website](http://www.beeple-crap.com/resources.php). (Note that the original
  279. materials and lighting is much better--improvements to our conversion
  280. gratefully received!)
  281. [License]((http://beeple-crap.com/resources.php):
  282. "These files are available under a sort of "open source" concept. They are
  283. intended for educational use but really can be used for whatever the fuck
  284. you want. You don't need to credit me for whatever commercial or
  285. non-commercial use you make of them, but if you could shout me a holla with
  286. any project that do come from them, I'd love to see it :)"
  287. (##) PBRT Book
  288. ![](images/pbrt-book/book.png height="200px")
  289. [pbrt-book](pbrt-book): A realistic model of the second edition of the _Physically
  290. Based Rendering_ book.
  291. Thanks to Karl Li (@yiningkarlli) for this fun model.
  292. (##) San Miguel
  293. ![](images/sanmiguel/sanmiguel.png height="200px")
  294. [sanmiguel](sanmiguel): A complex model inspired by a hotel in San Miguel de
  295. Allende, Mexico.
  296. Thanks to Guillermo M. Leal Llaguno for this excellent scene.
  297. (##) Simple
  298. ![](images/simple/anim-bluespheres.png height="200px")
  299. [simple](simple): A variety of relatively simple scenes.
  300. (##) Smoke Plume
  301. ![](images/smoke-plume/plume-084.png height="200px")
  302. ![](images/smoke-plume/plume-184.png height="200px")
  303. ![](images/smoke-plume/plume-284.png height="200px")
  304. A few renderings of a smoke simulation around an obstacle using volume data
  305. generated using the simulator published with Kim et al.'s [Wavelet
  306. Turbulence for Fluid Simulation](https://www.cs.cornell.edu/~tedkim/wturb/)
  307. paper.
  308. (##) Sportscar
  309. ![](images/sportscar/sportscar.png height="200px")
  310. [sportscar](sportscar): Sportscar model, in a variety of illumination settings,
  311. showing off the substantial differences in overall visual appearance that
  312. result.
  313. Excellent model and pbrt conversion courtesy of Yasutoshi Mori (@MirageYM);
  314. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Skylight
  315. environment maps courtesy Nolan Goodnight.
  316. (##) SSS Dragon
  317. ![](images/sssdragon/dragon_10.png height="200px")
  318. [sssdragon](sssdragon): Dragon model rendered with subsurface scattering,
  319. where multiple scene description files show the visual effect of changing
  320. the density of the scattering medium.
  321. Dragon model courtesy [Stanford Computer Graphics
  322. Laboratory](http://graphics.stanford.edu/data/3Dscanrep/). Environment map
  323. thanks to [Bernhard Vogl](http://dativ.at/lightprobes/index.html).
  324. (##) StructureSynth
  325. ![](images/structuresynth/arcsphere.png height="200px")
  326. [structuresynth](structuresynth): A few interesting procedural scenes scenes converted
  327. from [Structure Synth](http://structuresynth.sourceforge.net) into
  328. `pbrt`'s format.
  329. Environment map thanks to [USC-ICT light probe image
  330. gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  331. (##) Transparent Machines
  332. ![](images/transparent-machines/frame888.png height="200px")
  333. ![](images/transparent-machines/frame542.png height="200px")
  334. [transparent-machines](transparent-machines): A variety of highly detailed
  335. glass shapes illuminated by skylight. For good results, upwards of 64 ray
  336. bounces are required.
  337. Models from frames of [@beeple](http://beeple-crap.com)'s amazing
  338. [Transparent Machines
  339. video](https://vimeo.com/78716671). [License]((http://beeple-crap.com/resources.php):
  340. "These files are available under a sort of "open source" concept. They are
  341. intended for educational use but really can be used for whatever the fuck
  342. you want. You don't need to credit me for whatever commercial or
  343. non-commercial use you make of them, but if you could shout me a holla with
  344. any project that do come from them, I'd love to see it :)"
  345. (##) TT Car
  346. ![](images/tt/tt.png height="200px")
  347. [tt](tt): Audi TT car model.
  348. Thanks for Marko Dabrovic and Mihovil Odak for the car model. Environment
  349. map thanks to [USC-ICT light probe image
  350. gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  351. (##) Veach Bidir
  352. ![](images/veach-bidir/bidir.png height="200px")
  353. [veach-bidir](veach-bidir): A version of a classic scene with a variety of complex
  354. types of light transport developed by Eric Veach to show the value of
  355. bidirectional path tracing.
  356. (##) Veach MIS
  357. ![](images/veach-mis/f14-13-mi.png height="200px")
  358. [veach-mis](veach-mis): Another scene based on one by Eric Veach, this one showing
  359. off the benefit of multiple importance sampling when rendering surfaces
  360. of varying glossiness illuminated by light sources of various sizes.
  361. (##) Villa
  362. ![](images/villa/villa-daylight.png height="200px")
  363. [villa](villa): Modern indoor environment. The `villa-daylight.pbrt` version is
  364. particularly tricky to render, as all of the indoor lighting comes via
  365. specular paths from the outside through the windows.
  366. Many thanks to Florent Boyer for this scene. Skylight environment
  367. map courtesy Nolan Goodnight.
  368. (##) VW Van
  369. ![](images/vw-van/vw-van.png height="200px")
  370. [vw-van](vw-van): Volkswagen Van, illuminated by a HDR environment map.
  371. Model courtesy of
  372. [Greyscalegorilla](https://greyscalegorilla.com/gsg-free-model-pack-for-cinema-4d/),
  373. exported from Cinema4D using the [Cinema4D pbrt
  374. exporter](https://github.com/mmp/pbrt-v3/tree/master/exporters/cinema4d).
  375. (##) Volume Caustic
  376. ![](images/volume-caustic/caustic.png height="200px")
  377. [volume-caustic](volume-caustic): A glass sphere in participating media, showing off a
  378. volumetric caustic--light being focused in the scattering medium after
  379. passing through the sphere.
  380. (##) White Room
  381. ![](images/white-room/whiteroom-daytime.png height="200px")
  382. ![](images/white-room/whiteroom-night.png height="200px")
  383. [white-room](white-room): Interior scene, with two illumination
  384. configurations. The daytime variant is primarily illuminated by light
  385. coming through the windows from the outdoors, while the nighttime version
  386. is illuminated by the two lights in the scene.
  387. Scene thanks to Jay Hardy,
  388. [CC-BY](https://creativecommons.org/licenses/by/2.0/) license. Downloaded
  389. from [Blendswap](http://www.blendswap.com/blends/view/41683).
  390. (##) Yeah Right
  391. ![](images/yeahright/yeahright.png height="200px")
  392. [yeahright](yeahright): An unusual and intricate form on a glossy plate.
  393. "Interesting" shape generated by [Keenan
  394. Crane](http://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/).
  395. Environment map thanks to [USC-ICT light probe image
  396. gallery](http://gl.ict.usc.edu/Data/HighResProbes/).
  397. (##) WIP
  398. [wip](wip): This directory has a few scenes that aren't quite ready;
  399. renderings don't yet look great, parameters need tuning, etc. We'll try
  400. to get to this eventually, or if you're able to get them in good shape,
  401. please submit an update (see the following).
  402. # Converting Scenes to pbrt's Format
  403. Given an amazing scene in another 3D file format, there are a few
  404. options for converting it to be used in pbrt. (We're always happy to have
  405. help with improvements in this area!)
  406. ## Cinema 4D
  407. The `exporters/cinema4d` directory in the pbrt-v3 distribution provides an
  408. exporter from Cinema 4D. This exporter was developed to export the amazing
  409. "landscape" scene that is on the book's front cover from Cinema 4D, so thus
  410. is up to date with respect to pbrt's material models and rendering
  411. settings. We have seen good results with using this exporter for other
  412. Cinema 4D scenes.
  413. ## Wavefront OBJ
  414. The pbrt-v3 distribution includes a converter from the Wavefront OBJ
  415. format, `obj2pbrt`, that is built when the rest of the system is compiled.
  416. To run it, provide the path to an OBJ file and a filename for a new pbrt
  417. file:
  418. ```bash
  419. $ obj2pbrt scene.obj scene.pbrt
  420. ```
  421. If there is an accompanying material description file (e.g. `scene.mtl`),
  422. the values in it will be roughly mapped to corresponding pbrt materials.
  423. You will likely need to manually edit and tune the materials in the
  424. generated pbrt file in order to achieve reasonably good-looking
  425. results.
  426. Note that OBJ files only describe scene geometry; they don't include camera
  427. specifications or descriptions of light sources. (Thus, the generated pbrt
  428. input file only includes shape and material specifications that you'll need
  429. to add inside the `WorldBegin`/`WorldEnd` block of a full pbrt input file.)
  430. Unless you have camera and light source information separately, you'll need
  431. to specify both on your own (see "General Tips" below for some ideas about
  432. how to do this.)
  433. ## Blender
  434. Many very nice scenes have been modeled in
  435. [Blender](https://www.blender.org/) and are freely available. (See, for
  436. example, the [BlendSwap](http://www.blendswap.com/) website for many
  437. scenes that can be used via a Creative Commons license.) Our experience has
  438. been that the best approach to export scenes from Blender is to use
  439. Blender's native OBJ export (available via the File/Export menu item) and
  440. then to use the obj2pbrt utility described above to convert to pbrt's
  441. format.
  442. Blender scene files may have texture maps for the scene included directly
  443. in their `.blend` file. Choose "File/External Data/Unpack into Files" in
  444. Blender to save those files independently on disk. (Note that if the
  445. textures aren't PNG or TGA format, you'll need to convert to one of those
  446. for pbrt to be able to use them.)
  447. We would have hoped that the Blender exporter for
  448. [LuxRender](http://www.luxrender.net) would have worked well for pbrt
  449. (LuxRender is originally based on pbrt and still has a similar input file
  450. format.) Unfortunately, our experience has been that exporting to OBJ and
  451. using obj2pbrt gives a better starting point for the scene
  452. materials. (Further, the LuxRender Blender exporter silently fails if there
  453. aren't any lights in the scene.) We suspect that using this exporter as a
  454. starting point for a new direct Blender to pbrt exporter might be a
  455. worthwhile approach.
  456. ## Old Exporters
  457. The pbrt-v2 distribution includes
  458. [exporters](https://github.com/mmp/pbrt-v2/tree/master/exporters) for 2010
  459. era 3DS Max (which was used for the model used for the cover image for the
  460. second edition of the book), Blender, Mathematica, and [Structure
  461. Synth](http://structuresynth.sourceforge.net/). All of these are very much
  462. out of date, both due to changes over the past six years in in the systems
  463. they exported from as well as changes in pbrt. Some of these may be useful
  464. for developing updated exporters for the corresponding systems for pbrt-v3.
  465. ## General Tips
  466. A scene exported using one of the above exporters is certain to not
  467. immediately render beautifully as is. Here are some suggestions for how to
  468. take an initial export and turn it into something that looks great.
  469. First, you may find it useful to run
  470. ```bash
  471. $ pbrt --toply scene.pbrt > newscene.pbrt
  472. ```
  473. This will convert triangle meshes into more compact binary PLY files,
  474. giving you a much smaller pbrt scene file to edit.
  475. Next, if the exporter doesn't include camera information, the first thing
  476. to do is to find a good view. The "environment" camera (which renders an
  477. image in all directions) can be useful for finding a good initial position
  478. for the camera. Keep rendering images and adjusting the camera position to
  479. taste. (For efficiency, use as few pixel samples as you can tolerate and
  480. learn to squint and interpret noisy renderings!) Then, you can use the
  481. origin you've chosen as the basis for specifying a `LookAt` transformation
  482. for a more conventional camera model.
  483. While placing the camera, it can be helpful to have a point light source at
  484. the camera's position. Adding a light source like the following to your
  485. scene file does this in a way that ensures that the light moves
  486. appropriately to wherever the camera has been placed. (You may need to
  487. scale the intensity up or down for good results--remember the
  488. radius-squared falloff!
  489. ```
  490. AttributeBegin
  491. CoordSysTransform "camera"
  492. LightSource "point" "color I" [10 10 10]
  493. AttributeEnd
  494. ```
  495. Once the camera is placed, we have found that it's next useful to set up
  496. approximate light sources. For outdoor scenes, a good HDR environment map
  497. is often all that is needed for lighting. (You may want to consider using
  498. `imgtool makesky` to make a realistic HDR sky environment map.)
  499. For indoor scenes, you may want a combination of an environment map for the
  500. outside and point and/or area light sources for interior lights. You may
  501. find it useful to examine the scene in the modeling system that it came
  502. from to determine which geometry corresponds to area light sources and to
  503. try adding `AreaLightSource` properties to those. (Note that in pbrt, area
  504. light sources only emit lights on the side that the surface normal points;
  505. you may need a `ReverseOrientation` directive to make the light come out in
  506. the right direction.)
  507. Given good lighting, the next step is to tune the materials (or set them
  508. from scratch). It can be helpful to pick a material and set it to an
  509. extreme value (such as a "matte" material that is pure red) and render the
  510. scene; this quickly shows which geometric models have that material
  511. associated with it. Alternatively, consider applying this
  512. [patch](html/mtl.patch.txt) to your pbrt source tree; after rebuilding
  513. pbrt, if you set the `PBRT_MTL_HACK` environment variable and render the
  514. scene, pbrt will generate a separate image for each `NamedMaterial`
  515. in the scene, with a filename corresponding to the material name. Each
  516. of these images will only include the objects with that material, which
  517. makes it easier to see what's what.
  518. As you figure out which material names correspond to what geometry, watch
  519. for objects that are missing texture maps and add `Texture` specifications
  520. for them and use them in the materials. (The good news is that such objects
  521. generally do have correct texture coordinates with them, so this mostly
  522. just works.)
  523. # Submitting Updates
  524. We'd love to increase the scope (and quality) of scenes available for use
  525. with `pbrt`. If you have a nice scene in `pbrt`'s format that you'd like to
  526. have included in this distribution, or if you have improvements to the
  527. current set of scenes, we'd love to have them! (Even finding additional
  528. good camera locations for the existing scenes or generating variants of
  529. some of the existing scenes with different lighting setups is helpful.)
  530. We're particularly interested in adding scenes that include complex and
  531. realistic character models as well as scenes with realistic distributions
  532. of hair or fur.
  533. Unfortunately, it's not possible to host large binary distributions on
  534. github, so submitting scene updates a little more involved than sending a
  535. pull request. There are a few options.
  536. * For changes small enough to be sent via email, you can use
  537. `git format-patch` to make a patch that we can apply and push to the
  538. repository. (Send the patch to authors@pbrt.org.)
  539. * For larger changes, consider the `git bundle` command to generate a
  540. binary representation of the changes. Post the resulting file online
  541. somewhere that we can access it, send us a pointer (again,
  542. authors@pbrt.org), and we'll merge it.
  543. * Finally, if you're not comfortable enough with git for those options,
  544. feel free to create a zip or tar file with a new scene and send us a
  545. pointer to it; we can take it from there.
  546. <!-- Markdeep: --><style class="fallback">body{visibility:hidden;}</style><script src="html/markdeep.min.js"></script>