Skip to content

datavorous/tinytracer

TinyTracer

made-with-python Code style: black

TinyTracer is a Python path tracer that simulates light paths to generate realistic images.

This project is part of Winter of Open Source, where contributors can improve the engine, add materials, implement new shapes, optimize performance etc.

Demo Images

Some demos may look noisy due to low sampling for faster renders.

Features

Implemented so far:

  • Sphere and Quadrilateral geometry
  • Four material types: Lambertian, Metal, Dielectric, Emissive
  • Multiprocessing for faster rendering
  • Basic caching optimizations

Table of Contents

Installation

git clone https://github.com/datavorous/tinytracer.git
cd tinytracer

python3 -m venv .venv
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows

pip install -e .
pip install uv pytest

uv run tinytracer/main.py

uv run pytest

The generated image will be in .ppm format, inside the output folder.

How to Contribute

This project has issues prepared for contributors at all levels: Open Issues

Each issue is labeled by difficulty (good-first-issue, easy, medium, hard) and has clear instructions.

Please follow CONTRIBUTING.md for step-by-step guidance on:

  • Setting up your environment
  • Choosing and assigning issues
  • Branching, committing, and creating PRs
  • Code style and formatting rules (using black)
  • PR acceptance criteria and points system

Warning

Work on only one issue at a time.

Code of Conduct

Please follow CODE_OF_CONDUCT.md to ensure a welcoming and productive environment for all contributors.

References

About

A tiny path tracer written in vanilla python to produce realistic renders

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Languages