Other Features

Rough Dielectric BSDF

After I implemented the Rough Conductor BSDF from Microfacet Models for Refraction through Rough Surfaces by Walter et al., I also took the time to implement the Rough Dielectric BSDF from the same paper.

See below for renderings of a dielectric with increasing roughness parameter with their usual Mitsuba comparisons.
There is also a visualization of the BSDF values in the warptest tool together with the results from a chi^2 test to show, that the BSDF is correctly sampled according to its probability density function.

Code:

My Rendering Mitsuba Reference
Roughness alpha = 0.01
My Rendering Mitsuba Reference
Roughness alpha = 0.05

My Rendering Mitsuba Reference
Roughness alpha = 0.1
My Rendering Mitsuba Reference
Roughness alpha = 0.2

BSDF Values
Chi^2 Test


Selection BSDF

As objects can be composed of different materials, I found it useful to have a special kind of Selection BSDF that combines other BSDFs. It takes a grayscale texture as input and selects for each surface point one of several nested BSDFs, depending on the value stored in the texture.

See below for close-up renderings of the crayons from my final scene, which are built out of multiple BSDFs types.

Code:

Crayons close-up


Final Submission