Metropolis Light Transport (MLT)

19 Jun 2018

Version 0.3.2 of my Rust based PBRT implementation can render with Metropolis Light Transport (MLT) now:

Living Room
rendered via MLT.

I also fixed a bug for Bi-directional Path Tracing (see previous blog):

Living Room
rendered via bi-directional path tracing.

The difference between both algorithms is hard to see, but with some false-color representation you can see that the main difference is in some specular highlights at the rim of some objects:

The difference
between both algorithms.

To see a higher resolution of the image above follow this link and right-click->View Image. For high-res versions of the other two images just follow this link and click either living-room-2_pbrt_rust_mlt.png or living-room-2_pbrt_rust_bdpt.png.

Here is another scene which profits from using MLT:

Volumetric caustics.

Version 0.3.2 consists of 114 public structs, 9 enums, 21 traits, and 143 public functions:

> pwd
/mill3d/users/jan/git/github/rs_pbrt/src
> rg -trust "^pub struct" | wc
    114     459    5143
> rg -trust "^pub enum" | wc
      9      36     371
> rg -trust "^pub trait" | wc
     21      88     879
> rg -trust "^pub fn" | wc
    143    1089   10238

Here are the traits:

> rg -trust "^pub trait" 
core/reflection.rs
253:pub trait Bxdf {
307:pub trait Fresnel {

core/primitive.rs
16:pub trait Primitive {

core/filter.rs
11:pub trait Filter {

core/camera.rs
16:pub trait Camera {

core/microfacet.rs
12:pub trait MicrofacetDistribution {

core/medium.rs
266:pub trait PhaseFunction {
271:pub trait Medium {

core/light.rs
26:pub trait Light {
126:pub trait AreaLight: Light {

core/texture.rs
17:pub trait TextureMapping2D {
77:pub trait Texture<T> {

core/interaction.rs
28:pub trait Interaction {

core/integrator.rs
23:pub trait SamplerIntegrator {

core/shape.rs
16:pub trait Shape {

core/material.rs
20:pub trait Material {

core/lightdistrib.rs
22:pub trait LightDistribution {

core/sampler.rs
12:pub trait Sampler: SamplerClone {
36:pub trait PixelSampler: Sampler {}
38:pub trait GlobalSampler: Sampler {}
40:pub trait SamplerClone {

The next major release will probably either re-write the parser to use the latest pest crate or experiment with other parser generators available for Rust.