Bidirectional Path Tracing support for pbrt Release 1.02 By MLJack mljack at gmail dot com mljack.googlepages.com It's a migration of RenderPark's implementation. Reference: http://graphics.stanford.edu/papers/veach_thesis/ http://www.cs.kuleuven.ac.be/~graphics/RENDERPARK/ Feathers/Limitations: * Bidirectional Path Tracing with Russian Roulette * Particle Tracing * Materials: matte/phong/glass/mirror * Only support area light. (Also see the interface changes) * Only support perspective camera. (Also see the interface changes) * BidirectionalPathTracing plugin need image4BidirectionalPT plugin. * ParticleTracing plugin need image4PaticleTracing plugin. * Pinhole camera (no DOF) * Vacuum only (no participating media) * Use the default cropwindow parameter in any image plugins. * Use the following filter configuration: PixelFilter "box" "float xwidth" [0.5] "float ywidth" [0.5] Samples: * See files in the _scene directory. License: * All Rights Reserved. * For educational use only; commercial use expressly forbidden. * NO WARRANTY, express or implied, for this software. * (See file License.txt for complete license) If you have any problems, notice errors, or make any patches, please let me know. ------------------------------------------------------------------------ The BidirectionalPT plugin depends on the following changes/interfaces. It call AddSample(...) directly to store samples in the screen. Some major changes: New global variables: int PBRT_DEBUG: Debugging state of system Scene* scene: Plugins can communicate with each others not only through interface of core, but also interfaces of other plugins. int PBRT_FILE_CurrentImage: Store the current output image index. New classes: Spectrum_double: Double-precision floating point number to prevent underflow. New interfaces: In class SurfaceIntegrator: IsLastSampleLiValid(...): Return last return by Li(...) should be stored in the image. In class Camera: GenerateSample(...): Convert a sample from world space to camera space. getEyePoint(...): Return eye position in world space. getEyeNormal(..): Return eye direction in world space. isVisibleFromEye(...): Return the visibility between eye and a world space position. In class Light: Sample_Point(...): Return a point sample in the light surface. Sample_Direction(...): Return a direction sample in a point of light surface. LemitEval(...): Return the emitting radiance. PointPdfEval(...): Return the PDF of point sampling. DirectionPdfEval(...): Return the PDF of direction sampling. New parameters: In Intersection::GetBSDF(...) Spectrum *ScatterPower: Get the total scattering power. It can be used in Russian Roulette. New class members: In class Film: float R, xWidth, yHeight, xPixelWidth, yPixelHeight, Apixel: Physical parameters of the screen In class Perspective: Transform WorldToRaster: Transform from world space to pixel space