Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
Thanks to the author for the great book and great test scenes. To understand the organization of the input file I intend to write a parser on my own as an exercise. My idea is to build this functionality with flex and bison.
However some input files in pbrt-v3-scenes confuses me: some ObjectBegin/ObjectEnd pairs are not placed correctly.
One such example is in transparent-machines/frame675.pbrt. The object "BOLT.1" is defined in lines 1952-1971. This object begins at line 1953, ends at 1971, but the directive pairs AttributeBegin and AttributeEnd don't match here.
This seemingly incorrect ordering of the directives doesn't baffle the api provided by pbrt (it also works if I switch the last 2 lines), but is this intended? I read the documentation for file format, but the description and example I see indicates "balanced" usage of the directive pairs.
Clarification on this issue can help a lot with a bison-based parser. Thanks!
Thanks to the author for the great book and great test scenes. To understand the organization of the input file I intend to write a parser on my own as an exercise. My idea is to build this functionality with
flex
andbison
. However some input files inpbrt-v3-scenes
confuses me: someObjectBegin
/ObjectEnd
pairs are not placed correctly. One such example is intransparent-machines/frame675.pbrt
. The object "BOLT.1" is defined in lines 1952-1971. This object begins at line 1953, ends at 1971, but the directive pairsAttributeBegin
andAttributeEnd
don't match here.This seemingly incorrect ordering of the directives doesn't baffle the api provided by pbrt (it also works if I switch the last 2 lines), but is this intended? I read the documentation for file format, but the description and example I see indicates "balanced" usage of the directive pairs.
Clarification on this issue can help a lot with a bison-based parser. Thanks!