Skip to content

stevebest/lua-raytracer-in-one-weekend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-raytracer-in-one-weekend

Implementation of a simple raytracer in Lua, mostly following the structure of Peter Shirley's "Ray Tracing in One Weekend" series of books.

Example of a scene

This scene was rendered in under 3 hours at 1024 samples per pixels, 400x225 resolution, on a single core of an M1 Pro.

Features and limitations

  • Support for tev image viewer. No PPM output, as in books, because tev can save OpenEXR, which is much much cooler.
  • Progress view, showing the total amount of work, elapsed time, and estimated time of completion.
  • BVH acceleration from the second book in the series.
  • No depth-of-field or motion blur (those are boring).
  • Everything is a sphere.
  • Is literally my first attempt at coding in Lua, and trying to learn the idiomatic ways of doing things, as well as trying to keep it relatively fast.

Usage

To run, start the raytracer from the command line, providing a scene file, and a number of samples.

lua rt.lua scenes/Final1.lua 64

Tev support

Tev is an extremely fast image viewer with support for HDR images in many formats. This implementation can upload images to tev as they are being rendered.

Tev preview

Install tev, start it up and start the raytracer. Tev will now show and update the image as it's being rendered.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages