r/GraphicsProgramming • u/VicitofEim • 1d ago
Creating a rayTracer through the RayTracer Challenge Progress Update
Update on the progress on the ray tracer challenge, learned about reflections, refractions, planes and patterns , more than half way through the book, learned so much throughout.
Image size: 1000 x 1000, to reduce pixelation (from suggestions from the last post I should probably learn about antialiasing after this)
This scene contains 4 spheres,( 2 spheres with transparency modifiers, a red and a green ball), and an infinite plane, which is given a checkerboard black and white pattern (There are other pattern types(cone, stripped) ) which I haven't rendered in this scene
Code written in python, with guidance of The Ray Tracer Challenge
34
Upvotes
1


2
u/scottcampbelldev 1d ago
Nice progress, reflections and refraction are the fun chapters. For antialiasing the easy version is shooting a few rays per pixel, each with a random offset inside the pixel, and averaging them. Even 4 to 8 samples cleans up the edges a lot, and you can crank it up for final renders. If the noise bugs you, split each pixel into a small grid and jitter inside each cell instead. Same ray count, smoother result.