Open masscry opened 5 years ago
Good job, thank you for sharing! One minor comment:
in this place i'd put spherical coordinates instead:
x = int((math.atan2(norm_dir.z, norm_dir, x)/(2*math.pi) + 0.5)*env_width)
y = int(math.acos(norm_dir.y)/math.pi*env_height)
Nice! That is much better!
I used environment map in low resolution, so background becomes too blocky without filtering.
Rendering time skyrocketed (~30 minutes) with duck mesh on scene, but with bounding box I got reasonable ~2 minutes per draw.
Yup, exponential complexity. I give this in my lectures to motivate for the rasterization technique.
I guess that Python makes it a little bit more expensive, C++ implementation takes a couple of minutes without the bounding box.
Hello!
Thank you for very interesting materials!
I ported most of code to Python (except bunny rendering...).
python-tinyraytracer It is a bit dirty and not very pythonic, but it works and produces same results.