indirect fog light #raytracer test

Light Branch Flow. Stunning and at some point shows how is present in tsunami wave travel and lights caustics. I wonder if it should affect how a #raytracer calculates light paths.

https://www.youtube.com/watch?v=6aZ45RNHa6U

#light #branchflow #caustics #raytracing

We Just Discovered Why Light Does This

YouTube

Last year I started to implement the raytracer from the book The Ray-Tracer Challenge from Pragmatic Programmer by Jamis Buck. It describes all concepts very well, and the implementation is done through cucumber test cases, so it can be followed in any language you want.

http://www.raytracerchallenge.com/

My implementation is coded in Rust and renders the images using the game library Macroquad.
https://github.com/ollej/macroquad-raytracer

#Rust #RustLang #Macroquad #raytracer #gfx #RayTracerChallenge

The fifteenth chapter of the ray tracing book is a bit more exciting as it adds the triangle and smooth triangle shapes as well as a parser for OBJ files. This makes it possible to load 3D models and add them to the scene.

I also made an optimization to cache the inverse of the transformation matrix which sped up the calculations a lot.

Here is an image of a smooth high polygon version of the Utah Teapot.

#RayTracer #RayTracerChallenge #Rust #RustLang #PragmaticProgrammer #3DModel

I had to do a lot of refactoring of my ray-tracer to get Chapter 14 working where Groups are added. Making it possible to combine shapes and translate them at the same time.

The end result is not very exciting though. This is a hexagon made up of six cylinders as edges and six spheres as corners.

#RayTracer #RayTracerChallenge #Rust #RustLang #PragmaticProgrammer

In chapter 13 two more shapes are added to the ray tracer. A cylinder and a cone.

#RayTracer #RayTracerChallenge #RayTracing #Rust #RustLang #programming #book #PragmaticProgrammer

In the twelth chapter of the Ray-Tracer Challenge book I've added a new kind of shape: a cube. This new scene is created using only cubes that are scaled and translated to make different shapes.

#RayTracer #RayTracerChallenge #RustLang #Rust #Graphics #RayTracing

My progress has been a bit slower, but I've now finished chapter chapter 11 in the Ray-Tracer Challenge. My raytracer now has both reflection and refraction and it's possible to generate images with mirrored and transparent objects.

#RayTracer #RayTracerChallenge #RustLang #PragmaticProgrammer

I've now finished the tenth chapter of The Ray-Tracer Challenge book from Pragmatic Programmer. This chapter implements multiple different types of patterns to apply to the objects. There are stripes, gradients, rings and a checkerboard pattern. Next up is the chapter on reflections and refractions which is very exciting.

#RayTracer #RayTracerChallenge #RustLang

Chapter nine of the book The Ray-Tracer Challenge introduces a new kind of shape in addition to spheres: infinite planes. These can be used as floors and walls.

#RayTracer #RayTracerChallenge #RustLang