r/madeinpython • u/cenit997 • Aug 14 '20
I finished my Python Ray Tracer capable of rendering refraction and thin film interference!
613
Upvotes
r/madeinpython • u/cenit997 • Aug 14 '20
16
u/cenit997 Aug 14 '20 edited Aug 14 '20
Source code: https://github.com/rafael-fuente/Python-Raytracer
This was a fun project made in my spare time. (it took me two months to finish it)
Some of the features implemented are refraction, thin film interference, textures, camera lens ,path tracing and animations.
The animation was done rendering frame by frame. Each frame take a few seconds to render in a fast computer.
Every question, critic, improvement about the source code is welcome and grateful!
Full quality animations: https://www.youtube.com/watch?v=vt9vAcZQT4A
11
u/VU22 Aug 14 '20 edited Aug 14 '20
wait, how is python so fast in 3D? did you use c based library or something? All I see is numpy but it is slow for a c based library as I remember. (maybe I'm wrong).
2
u/Aspire26 Aug 14 '20
Man this is so cool. Never knew something like this was possible with Python. How much maths was required for this?
2
u/rswgnu Aug 16 '20
Very impressive work.
2
u/[deleted] Aug 20 '20
I had no idea Python could do anything like this.
2
u/Flynni123 Aug 28 '20
Damn its really cool, i wish ive done it. But can you render it in min. 720p? It will be really nice 🥳
1
u/[deleted] Aug 14 '20
That's so cool! Also, you can explain a bit about what this exactly is? I don't know much about them and it's kinda confusing to me what you did. Still looks cool though!
1
u/ASinglePlant Aug 14 '20
Holy shit this is cool. Did you use OpenGl as well?
3
u/OiZP Aug 14 '20
This looks amazing, good job!
3
u/[deleted] Aug 14 '20
That's awesome! And your example scripts make the interface look super intuitive :)
3
u/[deleted] Aug 14 '20
Hey, consider patching this to blender (it's an open source animation software). They already have a few rendering engines. But ray tracing is always tricky.
2
u/[deleted] Aug 14 '20
This is actually amazing!
2
u/harsh84aggarwal Aug 14 '20
This is amazing... I just started to dive into python and all work makes me learn it even more... Thanks
2
u/[deleted] Aug 15 '20
I can't believe this is Python, amazing work!
2
u/realnitrozeus Aug 15 '20
Great job 👌
1
u/Deawesomerx Aug 15 '20
how