Skip to content

1 path tracer written in pure lua, 1 file, 0 dependencies.

License

Notifications You must be signed in to change notification settings

LingDong-/teapot.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teapot.lua

1 path tracer written in pure lua, 1 file, 0 dependencies.

Made after taking Computer Graphics (15462) in 2019 at CMU and feeling not having had enough.

Supports:

  • Bounding volume hierachy (BVH)
  • Diffuse, Emission, Mirror, Glass, Glossy, SSS (subsurface scattering)
  • Directional, point, area, hemisphere, ambient, environmental lights
  • 2D Texture sampler

17 century silver teapot from China. 清雍正銀提梁壺 (modelled to be a slightly more interesting alternative to the canonical teapot [.obj]).

Another setup

Stanford dragon in a cronell box with glass ball.

Lucy in Pisa.

The canonical teapot in cornell box.

Jade dragon with subsurface scattering.

I lost most my renderings after a computer disaster, will render some more soon :P

Usage

See scenes folder on how to contruct a scene and render it.

File formats

OBJ for 3D models, PPM for input texture and output rendering. Included is a tool tools/convert_ppm.py for converting to PPM from PNG/JPG/EXR to PPM.

About

1 path tracer written in pure lua, 1 file, 0 dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages