Scene objects such as lights, materials and textures, as well as objects used for rendering such as cameras and film, are written as plugins to PBRT and PBRT_batchRender rather than core elements of the program. This enables the functionality of PBRT to be expanded without requiring changes to the basic programming scheme of the entire package.

PBRT_batchRender employs two plugins in addition to those supplied with PBRT, a film plugin image_raw and a material plugin ward2 (both of which are discussed in detail PBRT_batchRender)

All PBRT and PBRT_batchRender plugins are grouped into directories such as ‘materials’ and ‘lights’ within the PBRT or PBRT_batchRender root directory. The Makefile at the root of the PBRT or PBRT_batchRender directory directs the program’s compilation. In order to include a plugin in the compilation, add its filename minus the ‘.cpp’ extention to the list of plugins beginning on line 42 of the Makefile under the appropriate category. Lists of file names for each category are space separated and must reside on one line each.

For example, when the image_raw plugin was added,
FILM         = image

was changed to
FILM         = image image_raw


Finally to include a plugin in the compilation, cd into the PBRT or PBRT_batchRender directory and type make. make will only compile the files that have not yet been compiled (such as the plugin to be added) or whose source files have changed since the last compilation.

There is one comment on this page. [Display comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki