Skip to content

a basic python raytracer implementation

Notifications You must be signed in to change notification settings

Racer0815/pytracer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytracer

a simple python raytracer implementation


Features:

  • Lambertian diffuse
  • Metals with fuzziness
  • The classic checkerboard floor texture
  • Emissive materials
  • Optional denoiser
  • Live preview while rendering
  • PPM file output
  • Miserable performance (slow af)

Example renders:

To create your own renders: Modify samples, resolution, maxBounces and ambient occlusion in "src/main.py" and add objects to the scene by calling scene.addObject() and passing an object as a parameter.


Denoising:

To denoise a render: Run "denoiser/denoise.py", choose the input file in the first filedialogue and choose the output folder in the second.


Project structure

Folder content
results/ All of my renders (even those from older more primitive versions of the raytracer)
└ results/denoised denoised versions of some of the renders
└ results/fails funny failed renders luckily i dont have many of those.. or sadly
output/ This is where the resulting image file of a render is written to (also overwriting old ones!)
src/ This is where the code is

About

a basic python raytracer implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%