Skip to content

hanton/pyTracer

Repository files navigation

##pyTracer - a Ray Tracer in Python

####Vision -> Physics (radiometry) -> Mathematical Model -> Python -> Screen Pixels

##Features

* Camera : Pinhole Camera
* Sampler: Multijittered Sampler, Regular Sampler
* Texture: Image Texture
* BRDF: Diffuse, Glossy Specular, Mirror Specular
* Light: Ambient Light, Point Light, Direction Light, Area Light
* Ambient Occlusion
* Shadow
* Geometry: Sphere, Plane, Rectangle
* Tone Mapping: Ward Contrast-based Linear Scale, Reinhard Spatially Varying Nonlinear Scale

##Examples ####Direction Illumination ####Ambient Occlusion ####Area Light without Tone Mapping ![](https://github.com/hanton/pypyRayTracer/blob/master/Render/Area%20Light without Tone Mapping.png?raw=true) ####Area Light with Tone Mapping ( Erik Reinhard, Mike Stark, Peter Shirley and Jim Ferwerda, 'Photographic Tone Reproduction for Digital Images', ACM Transactions on Graphics, 21(3), pp 267--276, July 2002 (Proceedings of SIGGRAPH 2002).) ####Area Light with Blooming Effect and Tone Mapping (K. Chiu, M. Herf, P. Shirley, S. Swamy, C. Wang, and K. Zimmerman. Spatially nonuniform scaling functions for high contrast images. In Proceedings of Graphics Interface '93, pages 245--253, 1993.) ![](https://github.com/hanton/pypyRayTracer/blob/master/Render/Area%20Light with Blooming Effect.png?raw=true)

##How to Run #####pypy pyTracer - to render a default 740740 with 1 pixel samples picture or #####pypy pyTracer width height pixel_samples - to render a widthheight with number pixel samples picture

If you have not installed PyPy, Python is still OK, but a lot slower... #####python pyTracer - to render a default 740740 with 1 pixel samples picture or #####python pyTracer width height pixel_samples - to render a widthheight with number pixel samples picture

##Reference:

  • Ray Tracing from the Ground Up by Kevin Suffern
  • Physically Based Rendering: From Theory To Implementation by Matt Pharr, Greg Humphreys
  • Advanced Global Illumination by Philip Dutre, Philippe Bekaert and Kavita Bala
  • Mitsuba Renderer : http://www.mitsuba-renderer.org
  • LuxRender : http://www.luxrender.net

GitHub: https://github.com/hanton/pyTracer

About

A Ray Tracer in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages