Skip to content

Latest commit

 

History

History
112 lines (95 loc) · 3.89 KB

report.md

File metadata and controls

112 lines (95 loc) · 3.89 KB

Computer Graphics Report

Raytracer

Basic version

Optimisations
  • Cramer's rule for computing triangle intersections
  • OpenMP parallelism
Phong light
  • Glossy surfaces are modeled using Phong light

Custom models

Monte Carlo Path Tracing

  • Point light
  • Anti-aliasing and soft shadows by shooting slightly perturbed rays each time

Emissive materials
  • Point lights are replaced by emissive surfaces

Tone mapping
  • The color values can sometimes be higher than vec3(1,1,1), which means they are clipped when passed to PutPixelSDL. To convert the colors from HDR to LDR we experimented with different tone mapping and gamma correction methods.

BRDF for specular (mirrors) and glossy materials

Transparent & refractive materials
  • The amount of light reflected when light enters another medium is computed using Schlick's approximation for Fresnel's equations
  • Total internal refraction

Beer-Lambert law
  • Beer’s law models light being absorbed over distance as it travels through a transparent material. The extinction (absorption) describes how much of each colour channel absorbs over distance. For example, a value of (8.0, 2.0, 0.1) would make red get absorbed the fastest, then green, then blue, so would result in a blueish, slightly green color object. The first picture shows a fully transparent object, while the second cube has a refraction index of 1.52.

Fog density
  • Based on the distance travelled by a ray and on the height

Final renders

basic basic basic

Rasteriser

Object loader

Texture mapping
  • Used barycentric coordinates basic
FXAA anti-aliasing
  • Box without AA basic
  • Box with AA basic