Trace the Ray – Part 6 (BRDFs)

Hey trace-masters, Bidirectional Reflectance Distribution Functions are here!

Bidirectional reflectance distribution functions (BRDFs) govern how
much a surface reflects lights for every incoming and outgoing light direction.

There are many BRDFs used in practice, but in my sixth assignment, my task was to implement the BRDFs listed below:

  • Phong BRDF
  • Modified Phong BRDF
  • Normalized Modified Phong BRDF
  • Blinn-Phong BRDF
  • Modified Blinn-Phong BRDF
  • Normalized Modified Blinn-Phong BRDF
  • Torrance-Sparrow BRDF

My instructor, Assoc. Prof. Ahmet Oguz Akyuz, has prepared a .pdf document with easy-to-understand figures that explains the details of the BRDFs listed above. The document can be downloaded by clicking here. The phi angle, which is used in the denominator of the Torrance-Sparrow BRDF in the document, is the angle between the normal vector and wo (eye) direction.

Below are my results:

Phong BRDF

brdf_phong_original.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50.

Modified Phong BRDF

brdf_phong_modified.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50.

Normalized Modified Phong BRDF

brdf_phong_modified_normalized.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50.

Blinn-Phong BRDF

brdf_blinnphong_original.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50.

Modified Blinn-Phong BRDF

brdf_blinnphong_modified.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50.

Normalized Modified Blinn-Phong BRDF

brdf_blinnphong_modified_normalized.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50.

Torrance-Sparrow BRDF

brdf_torrancesparrow.xml
(800x800)
/w 8 thrd, no MSAA
1 sphere, 2 point lights.
BRDF exponent 50,
BRDF refractiveIndex 0.370 .

Killeroo Renders

killeroo_blinnphong.xml
(800x800)
/w 8 thrd, 16MSAA,
Photographic Tonemapping,
3% burn-out,
Original Blinn-Phong BRDF,
BRDF exponent 50.

killeroo_blinnphong_closeup.xml
(800x800)
/w 8 thrd, 16MSAA,
Photographic Tonemapping,
3% burn-out,
Original Blinn-Phong BRDF,
BRDF exponent 50.

killeroo_torrancesparrow.xml
(800x800)
/w 8 thrd, 16MSAA,
Photographic Tonemapping,
3% burn-out,
Torrance-Sparrow BRDF,
BRDF exponent 50,
BRDF refractiveIndex 0.370 .

killeroo_torrancesparrow_closeup.xml
(800x800)
/w 8 thrd, 16MSAA,
Photographic Tonemapping,
3% burn-out,
Torrance-Sparrow BRDF,
BRDF exponent 50,
BRDF refractiveIndex 0.370 .
Brightness being too high is caused by
a small bug in my tonemapping
(to create .png file) implementation;
still working on to fix it.
.exr files below do not have this bug.

EXR Outputs

You can visualize my .exr outputs of the killeroo scene by following the links below (move the handles of the slider to right step by step, while “Gamma 2.0” option is selected):

That’s the end of my sixth assignment!

Hope to see you in the next one!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.