Task 021: Layered reflectance model Weidlich-Wilkie

Your task is to implement a layered reflectance model (interface IReflectanceModel) for our ray-based renderer. Your implementation should be tested in at least one sample scene. In addition to the reflectance formulae you have to declare a specific material object as well (IMaterial).

Weidlich-Wilkie © A.Weidlich, A.Wilkie


Read the article Weidlich & Wilkie: Arbitrarily layered microfacet surfaces and implement described layered reflectance model. Authors focused on a general layered surface model and introduced a couple of simplifications for convenience and higher efficiency. They cover sampling methods for Monte-Carlo rendering as well, but this is not necessary for our task (feel free to skip all the sampling-related parts).
To simplify the situation, you can restrict your implementation to two surfaces (interfaces). This means: one thin semi-transparent layer (clear or tinted varnish), two material boundaries, see the illustration (or Figure 6 in the article - all materials except for the last one).


You will work in the template application 048rtmontecarlo from the repository grcis. There is the form capable of choosing a scene from a list-box, setting up various options.. After pressing the "Render" button, the scene will be rendered and the result image will be displayed in the form window.
Use the MonteCarloRT.cs source file for your implementation, you will send me this file as a solution of the assignment. You can create new classes (you actually will to implement at least twho new classes - a new reflectance model and a material property class), data structures, etc. Definition of your scene (CustomScene) is in this file as well.


You have to implement a reflectance model in a new class compatible with the interface IReflectanceModel. In sync with it you will need to define a new material class compatible with interface IMaterial. You can take inspiration from the builtin classes PhongModel and PhongMaterial.
It is necessary to implement functions: DefaultMaterial() and ColorReflection() in two variants. You should pay attention to the argument ReflectionComponent comp defining which reflection components you have to include into the result (core ray-tracing algorithm requires this functionality).

For your convenience, there is a function InitializeScenes(). You can put there default/initial values of image resolution, anti-aliasing, scene selection, etc. The function is called only once, in the form setup phase.

Survey of relevant concepts and components of our ray-tracer architecture can be found in this PDF presentation.

What to hand in

You must send the modified file MonteCarloRT.cs. Please include interesting material settings to show your reflectance model, use the scene-list-box to select your new scenes.


Hand in the assignment until: 30. 4. 2017


Basis: 28 points (layered model, functional in all common contexts),
up to additional 8 points: bonus for interesting demo scenes..


Visual Studio project: 048rtmontecarlo

Source file

Modify and hand in the source file: MonteCarloRT.cs
As a comment in the first line, please include your name!

Copyright (C) 2011-2017 J.Pelikán, last change: 2017-03-26 16:28:56 +0200 (Sun, 26 Mar 2017)