PyTracer : Ray tracing with Python
PyTracer was a fun coding project I worked on back in 2017. The idea was inspired by MelRay which was a ray tracer written completely in Maya’s Mel language and done by my CG supervisor Clinton Downs at New Holland.
Why not write a ray tracer in Python? That was the initial spark that triggered me to accept this challenge.
It took two months of my spare time. I had learned plenty of math and physics through the process. Camera, shadow ray, sampling, dof..... So many topics that I never thought about when I was using renderers in 3D programs.
Of course the final product is not perfect, noisy, slow, can’t render anything but spheres and planes. And I still believe my hemisphere sampling is not correctly implemented. But I’m happy with the journey and the outcome is satisfying.
Again special thanks to Clinton for the resources and inspiration.
If you are interested, grab the code here and give it go on your machine: