Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Luz 💡

A simple python3 raytracer using MPI that renders to ASCII, suitable as a cluster test tool.

refraction and dof aperture size 0.15, 120 samples per pixel ascii render

Requires:

  • PIL
  • numpy
  • pandas
  • py4mpi
  • argparse

Implements:

  • hard shadows
  • reflections
  • Lambert shading
  • Phong-Blinn shading
  • spheres (texture mapped)
  • planes(texture mapped)
  • triangles (color interpolated between vertices)
  • spherical skyboxes
  • arbitrary camera positioning and orientation
  • json scene files
  • depth of field (sloooooow)
  • refraction (does not play well with shadows)

Usage:

mpirun -np 5 --oversubscribe python3 luz.py

usage: luz.py [-h] [--bounces BOUNCES] [--height HEIGHT] [--width WIDTH] [--cols COLS] [--sd SD] [--output OUTPUT] [--scene SCENE] [--stats] [--long] [--camera CAMERA [CAMERA ...]]
              [--target TARGET [TARGET ...]] [--focal FOCAL] [--aperture APERTURE] [--samples SAMPLES] [--profile]

A simple MPI raytracer.

optional arguments:
  -h, --help            show this help message and exit
  --bounces BOUNCES     max number of bounces
  --height HEIGHT       output image height
  --width WIDTH         output image width
  --cols COLS           terminal columns for ascii output
  --sd SD               number of standard deviations from the mean to consider a node an outlier
  --output OUTPUT       output image filename
  --scene SCENE         json scene file
  --stats               show stats on computational distribution
  --long                show long stats on computational distribution
  --camera CAMERA [CAMERA ...]
                        camera origin
  --target TARGET [TARGET ...]
                        camera target
  --focal FOCAL         camera focal length
  --aperture APERTURE   camera aperture
  --samples SAMPLES     dof samples
  --profile             runs profiler

Todo:

About

luz

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages