Skip to content

A physically-based spectral renderer written in Rust

License

Notifications You must be signed in to change notification settings

blamster19/nilepsilon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nilepsilon

nilepsilon is an attempt at writing physically-based spectral path tracer entirely in Rust programming language. The project is also a language learning experience and a graphics programming toy.

The renderer is currently in an unfinished state and might or might not be developed further in the future. Proceed with caution.

Features

Currently implemented features include:

  • std output of *.ppm image format
  • parallel rendering via rayon
  • spectral hero wavelength sampling
  • camera with focal length and sensor dimensions
  • diffuse BSDF (Oren-Nayar)
  • glossy BSDF (GGX)
  • blackbody radiation
  • refraction [borked]
  • fresnel dielectric [borked]

Running

nilepsilon is written as a library, and therefore lacks main body. To test the engine, run example tests and direct their output to file:

$ cargo test [test name] --release -- --nocapture >> filename.ppm

After waiting for render to finish, delete unnecessary std lines that got caught up in the output file.

Sample

Things worth mentioning

  • currently the engine represents material colors as reflectance polynomials over the visible spectrum
  • the only available primitives are planes, spheres and triangles
  • only mesh lights and background lights are available
  • the only working shaders are Oren-Nayar diffuse and GGX glossy
  • nilepsilon is a summer project and that's why it's not active for the rest of the year

References and inspiration

My first path tracer

Ray Tracing in One Weekend

Physically Based Rendering, 3rd ed.

Scratchapixel

Tzu-Mao Li's course notes

About

A physically-based spectral renderer written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages