# Feature: Texture

External libraries:
No further libraries than nori-framework has been used to complete this task.
Time spent:
2:00 (approximately)
Acknowledgements:
• Physically Based Rendering 2010
Files:
• src/conductor.cpp (new)
• common.h/.cpp (updated)

# Architecture

First I had the billiard balls all diffuse. This did not really look good in the final rendering, because all balls appeared to matt. Therefore, I implemented also the conductor.

# XML

### Texture-type: "conductor"

Following properties will be available for the texture to add the texture:

eta
The eta-scalar for the conductor-fresnel equation used to calculate the reflection-part. (There is no refraction, therefore it is another formula given in the book).
k
The k-scalar for the said conductor-formula.

# Implementation

## BSDF (src/conductor.cpp)

### class Conductor

I decided to set the eta and k parameters directly in the XML. It is an even better extension if one could simply specify the type of the conductor as a material-string. However, since it was only to improve the final image, I stayed with this first draft, which already makes what I wanted.

# Validation

This feature I am going to test simply by reasoning about the appearance. For me, it looks as it is expected. By setting the BSDF to a conductor, the appearance becomes shiny. It is also not too bright and does also not darken too much, based on the values. Therefore I think it looks pretty accurate.