New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement BDPTIntegrator #29

Closed
wahn opened this Issue Nov 27, 2017 · 3 comments

Comments

Projects
None yet
1 participant
@wahn
Copy link
Owner

wahn commented Nov 27, 2017

The assets/scenes/veach-bidir/bidir.pbrt needs a BDPTIntegrator:

> grep bdpt assets/scenes/veach-bidir/bidir.pbrt
Integrator "bdpt" "integer maxdepth" [5]

In C++:

// BDPT Declarations
class BDPTIntegrator : public Integrator {
  public:
    // BDPTIntegrator Public Methods
    BDPTIntegrator(std::shared_ptr<Sampler> sampler,
                   std::shared_ptr<const Camera> camera, int maxDepth,
                   bool visualizeStrategies, bool visualizeWeights,
                   const Bounds2i &pixelBounds,
                   const std::string &lightSampleStrategy = "power")
        : sampler(sampler),
          camera(camera),
          maxDepth(maxDepth),
          visualizeStrategies(visualizeStrategies),
          visualizeWeights(visualizeWeights),
          pixelBounds(pixelBounds),
          lightSampleStrategy(lightSampleStrategy) {}
    void Render(const Scene &scene);

  private:
    // BDPTIntegrator Private Data
    std::shared_ptr<Sampler> sampler;
    std::shared_ptr<const Camera> camera;
    const int maxDepth;
    const bool visualizeStrategies;
    const bool visualizeWeights;
    const Bounds2i pixelBounds;
    const std::string lightSampleStrategy;
};

@wahn wahn added the enhancement label Nov 27, 2017

@wahn wahn self-assigned this Nov 27, 2017

@wahn

This comment has been minimized.

Copy link
Owner

wahn commented Nov 27, 2017

Using the already implemented (uni-directional) path-tracing algorithm we get:

pbrt

Integrator "path" "integer maxdepth" [5]
@wahn

This comment has been minimized.

Copy link
Owner

wahn commented Nov 27, 2017

Whereas the bi-directional path-tracing algorithm (rendered via the C++ version of PBRT) looks like this:

bidir_bidirectional_path_cpp

Integrator "bdpt" "integer maxdepth" [5]
@wahn

This comment has been minimized.

Copy link
Owner

wahn commented Mar 15, 2018

Closing the issue for now. This was rendered by Rust:

pbrt

@wahn wahn closed this Mar 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment