Nothing Special   »   [go: up one dir, main page]

Skip to content

MIS (Multiple importance sampling) and hair bsdf implementation built on top of Yocto/GL

Notifications You must be signed in to change notification settings

edu-rinaldi/MIS-Path-tracer

Repository files navigation

Yocto/Pathtrace: Tiny Path Tracer

For this homework the objectives were to:

  • write camera with depth of field
  • write a naive path tracer
  • write a path tracer with MIS (multiple importance sampling)
  • write an hair material based on pbrt v.3

(The original readme of the homework can be found as readme.html)

Framework

The code uses the library Yocto/GL, that is included in this project in the directory yocto.

In order to compile the code, you have to install Xcode on OsX, Visual Studio 2019 on Windows, or a modern version of gcc or clang on Linux, together with the tools cmake and ninja. The script scripts/build.sh will perform a simple build on OsX.

Main functionalities can be found in yocto_pathtrace.{cpp|h}

This repository also contains tests that are executed from the command line as shown in run.sh. The rendered images are saved in the out/ directory. The results can be compared with the ones in the directory check/.

Functionality

In this homework/project the following features are implemented:

  • Camera Sampling in functions pathtrace_samples()
  • Naive Path tracing in function shade_naive()
  • Brdf sampling in function eval_brdfcos(), sample_brdscos() and sample_brdfcos_pdf()
  • Delta handling in function eval_delta(), sample_delta() and sample_delta_pdf()
  • Light sampling in function sample_lights() and sample_lights_pdf()
  • Path tracing in function shade_pathtrace()
  • Hair BSDF in function eval_hairbsdf(), sample_hair() and sample_hair_pdf()

Extra information about Hair BSDF implementation can be found in report.pdf

Some renders

Other renders can be found in out/ folder.

Car

Car

Classroom

Classroom

Coffee

Coffee

Kitchen

Kitchen

Hair

Curly hair Straight hair Hair ball

About

MIS (Multiple importance sampling) and hair bsdf implementation built on top of Yocto/GL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published