Skip to content

๐ŸŒˆ Path tracer implemented in OCaml based on "Ray Tracing in One Weekend"

Notifications You must be signed in to change notification settings

MisakaCenter/RayTracer.ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RayTracer.ml

๐ŸŒˆ Path tracer implemented in OCaml based on "Ray Tracing in One Weekend"

Features

  • Defocus Blur
  • Motion Blur
  • Bounding Volume Hierarchies
  • Textures
    • Checker Texture
  • Instance Translation & Rotation

Usage

To set up the environment, run the following command (Ubuntu)

apt install opam
opam init
opam install dune

To render the scene, run the following command

make

, and the rendered scene will be stored in ./output/

Screenshots

Ray Tracing in One Weekend

Result: (Intel i7-8750H CPU @ 2.20GHz) (Random Scene)

Ray Tracing finished in 1474.2 s.
Random Scene Sphere Sea (hd)

Ray Tracing: The Next Week

Result: (Intel i7-8750H CPU @ 2.20GHz)

Bouncing spheres (2071.7 s) Texture (531.9 s) Light (1654.9 s)
Empty Cornell box (437.5 s) Cornell box with two blocks (958.3 s) Standard Cornell box (1165.1 s)

About

๐ŸŒˆ Path tracer implemented in OCaml based on "Ray Tracing in One Weekend"

Topics

Resources

Stars

Watchers

Forks

Languages